def txn(value, options = {})
      # Verify the given value for the transaction
      transaction_verification(value)
      # Will return 409 if transaction was rolled back
      custom_params = []
      custom_params << dc(options)
      custom_params << transaction_consistency(options)
      raw = send_put_request(@conn_no_err, ['/v1/txn'], options, value, custom_params)
      transaction_return JSON.parse(raw.body), options
    end
def txn(value, options = {})
      # Verify the given value for the transaction
      transaction_verification(value)
      # Will return 409 if transaction was rolled back
      custom_params = []
      custom_params << dc(options)
      custom_params << transaction_consistency(options)
      raw = send_put_request(@conn_no_err, ['/v1/txn'], options, value, custom_params)
      transaction_return JSON.parse(raw.body), options
    end
Perform a key/value store transaction.

 @since 1.3.0
 @see https://www.consul.io/docs/agent/http/kv.html#txn Transaction key/value store API documentation
 @example Valid key/value store transaction format
   [
     {
       'KV' => {
         'Verb' => 'get',
         'Key' => 'hello/world'
       }
     }
   ]
 @raise [Diplomat::InvalidTransaction] if transaction format is invalid
 @param value [Array] an array of transaction hashes
 @param [Hash] options transaction params
 @option options [Boolean] :decode_values of any GET requests, default: true
 @option options [String] :dc Target datacenter
 @option options [String] :consistency the accepted staleness level of the transaction.
   Can be 'stale' or 'consistent'
 @return [OpenStruct] result of the transaction