class TreezorClient::CardtransactionApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/treezor_client/api/cardtransaction_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_cardtransaction(id, opts = {}) click to toggle source

get a card transaction get a card transaction @param id Card transactions's internal id. @param [Hash] opts the optional parameters @return [InlineResponse20010]

# File lib/treezor_client/api/cardtransaction_api.rb, line 27
def get_cardtransaction(id, opts = {})
  data, _status_code, _headers = get_cardtransaction_with_http_info(id, opts)
  data
end
get_cardtransaction_with_http_info(id, opts = {}) click to toggle source

get a card transaction get a card transaction @param id Card transactions&#39;s internal id. @param [Hash] opts the optional parameters @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers

# File lib/treezor_client/api/cardtransaction_api.rb, line 37
def get_cardtransaction_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardtransactionApi.get_cardtransaction ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CardtransactionApi.get_cardtransaction"
  end
  # resource path
  local_var_path = '/cardtransactions/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse20010')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CardtransactionApi#get_cardtransaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
read_card_transaction(opts = {}) click to toggle source

search for card transactions Search for documents. The request must contain at least one of those inputs - cardId, paymentId, publicToken, walletId @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Integer] :cardtransaction_id Card transaction&#39;s Id @option opts [Integer] :card_id Card&#39;s Id @option opts [Integer] :wallet_id Card&#39;s wallet Id @option opts [Integer] :merchant_id Merchant&#39;s Id @option opts [String] :public_token Card&#39;s public token @option opts [Integer] :payment_id Payment&#39;s Id @option opts [Integer] :page_number Pagination page number. More info [here](agent.treezor.com/lists). @option opts [Integer] :page_count The number of items per page. More info [here](agent.treezor.com/lists). @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists). required: false @return [InlineResponse2009]

# File lib/treezor_client/api/cardtransaction_api.rb, line 93
def read_card_transaction(opts = {})
  data, _status_code, _headers = read_card_transaction_with_http_info(opts)
  data
end
read_card_transaction_with_http_info(opts = {}) click to toggle source

search for card transactions Search for documents. The request must contain at least one of those inputs - cardId, paymentId, publicToken, walletId @param [Hash] opts the optional parameters @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication). @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](agent.treezor.com/basics). @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics). @option opts [Integer] :cardtransaction_id Card transaction&#39;s Id @option opts [Integer] :card_id Card&#39;s Id @option opts [Integer] :wallet_id Card&#39;s wallet Id @option opts [Integer] :merchant_id Merchant&#39;s Id @option opts [String] :public_token Card&#39;s public token @option opts [Integer] :payment_id Payment&#39;s Id @option opts [Integer] :page_number Pagination page number. More info [here](agent.treezor.com/lists). @option opts [Integer] :page_count The number of items per page. More info [here](agent.treezor.com/lists). @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : createdDate. More info [here](agent.treezor.com/lists). required: false @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers

# File lib/treezor_client/api/cardtransaction_api.rb, line 115
def read_card_transaction_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardtransactionApi.read_card_transaction ...'
  end
  # resource path
  local_var_path = '/cardtransactions'

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
  query_params[:'cardtransactionId'] = opts[:'cardtransaction_id'] if !opts[:'cardtransaction_id'].nil?
  query_params[:'cardId'] = opts[:'card_id'] if !opts[:'card_id'].nil?
  query_params[:'walletId'] = opts[:'wallet_id'] if !opts[:'wallet_id'].nil?
  query_params[:'merchantId'] = opts[:'merchant_id'] if !opts[:'merchant_id'].nil?
  query_params[:'publicToken'] = opts[:'public_token'] if !opts[:'public_token'].nil?
  query_params[:'paymentId'] = opts[:'payment_id'] if !opts[:'payment_id'].nil?
  query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2009')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CardtransactionApi#read_card_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end