Class: TreezorClient::TransactionApi
- Inherits:
-
Object
- Object
- TreezorClient::TransactionApi
- Defined in:
- lib/treezor_client/api/transaction_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_transaction(id, opts = {}) ⇒ InlineResponse20022
get a transaction Get a transaction from the system.
-
#get_transaction_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20022, Fixnum, Hash)>
get a transaction Get a transaction from the system.
-
#get_transactions(opts = {}) ⇒ InlineResponse20022
search transactions Get transactions that match search criteria.
-
#get_transactions_with_http_info(opts = {}) ⇒ Array<(InlineResponse20022, Fixnum, Hash)>
search transactions Get transactions that match search criteria.
-
#initialize(api_client = ApiClient.default) ⇒ TransactionApi
constructor
A new instance of TransactionApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TransactionApi
Returns a new instance of TransactionApi.
19 20 21 |
# File 'lib/treezor_client/api/transaction_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/treezor_client/api/transaction_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_transaction(id, opts = {}) ⇒ InlineResponse20022
get a transaction Get a transaction from the system.
27 28 29 30 |
# File 'lib/treezor_client/api/transaction_api.rb', line 27 def get_transaction(id, opts = {}) data, _status_code, _headers = get_transaction_with_http_info(id, opts) data end |
#get_transaction_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20022, Fixnum, Hash)>
get a transaction Get a transaction from the system.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/treezor_client/api/transaction_api.rb', line 37 def get_transaction_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.get_transaction ...' 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 TransactionApi.get_transaction" end # resource path local_var_path = '/transactions/{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 => 'InlineResponse20022') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#get_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_transactions(opts = {}) ⇒ InlineResponse20022
search transactions Get transactions that match search criteria.
100 101 102 103 |
# File 'lib/treezor_client/api/transaction_api.rb', line 100 def get_transactions(opts = {}) data, _status_code, _headers = get_transactions_with_http_info(opts) data end |
#get_transactions_with_http_info(opts = {}) ⇒ Array<(InlineResponse20022, Fixnum, Hash)>
search transactions Get transactions that match search criteria.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/treezor_client/api/transaction_api.rb', line 129 def get_transactions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionApi.get_transactions ...' end # resource path local_var_path = '/transactions' # 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[:'transactionId'] = opts[:'transaction_id'] if !opts[:'transaction_id'].nil? query_params[:'transactionType'] = opts[:'transaction_type'] if !opts[:'transaction_type'].nil? query_params[:'walletId'] = opts[:'wallet_id'] if !opts[:'wallet_id'].nil? query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil? query_params[:'amount'] = opts[:'amount'] if !opts[:'amount'].nil? query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil? query_params[:'valueDate'] = opts[:'value_date'] if !opts[:'value_date'].nil? query_params[:'executionDate'] = opts[:'execution_date'] if !opts[:'execution_date'].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? query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'createdDateFrom'] = opts[:'created_date_from'] if !opts[:'created_date_from'].nil? query_params[:'createdDateTo'] = opts[:'created_date_to'] if !opts[:'created_date_to'].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 => 'InlineResponse20022') if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionApi#get_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |