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 = {}) ⇒ InlineResponse20020
get a transaction Get a transaction from the system.
-
#get_transaction_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20020, Fixnum, Hash)>
get a transaction Get a transaction from the system.
-
#get_transactions(opts = {}) ⇒ InlineResponse20020
search transactions Get transactions that match search criteria.
-
#get_transactions_with_http_info(opts = {}) ⇒ Array<(InlineResponse20020, 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 = {}) ⇒ InlineResponse20020
get a transaction Get a transaction from the system.
28 29 30 31 |
# File 'lib/treezor_client/api/transaction_api.rb', line 28 def get_transaction(id, opts = {}) data, _status_code, _headers = get_transaction_with_http_info(id, opts) return data end |
#get_transaction_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20020, Fixnum, Hash)>
get a transaction Get a transaction from the system.
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 76 |
# File 'lib/treezor_client/api/transaction_api.rb', line 38 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 => 'InlineResponse20020') 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 = {}) ⇒ InlineResponse20020
search transactions Get transactions that match search criteria.
102 103 104 105 |
# File 'lib/treezor_client/api/transaction_api.rb', line 102 def get_transactions(opts = {}) data, _status_code, _headers = get_transactions_with_http_info(opts) return data end |
#get_transactions_with_http_info(opts = {}) ⇒ Array<(InlineResponse20020, Fixnum, Hash)>
search transactions Get transactions that match search criteria.
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 184 185 |
# File 'lib/treezor_client/api/transaction_api.rb', line 131 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 => 'InlineResponse20020') 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 |