Class: SyncteraRubySdk::TransactionsApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::TransactionsApi
- Defined in:
- lib/synctera_ruby_sdk/api/transactions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_pending_transaction_by_id(id, opts = {}) ⇒ PendingTransaction
Get a pending transaction Get a pending transaction by its uuid.
-
#get_pending_transaction_by_id_with_http_info(id, opts = {}) ⇒ Array<(PendingTransaction, Integer, Hash)>
Get a pending transaction Get a pending transaction by its uuid.
-
#get_posted_transaction_by_id(id, opts = {}) ⇒ PostedTransaction
Get a posted transaction Get a posted transaction by its uuid.
-
#get_posted_transaction_by_id_with_http_info(id, opts = {}) ⇒ Array<(PostedTransaction, Integer, Hash)>
Get a posted transaction Get a posted transaction by its uuid.
-
#initialize(api_client = ApiClient.default) ⇒ TransactionsApi
constructor
A new instance of TransactionsApi.
-
#list_pending_transactions(opts = {}) ⇒ PendingTransactions
List pending transactions Get paginated list of pending transactions matching the provided filters.
-
#list_pending_transactions_with_http_info(opts = {}) ⇒ Array<(PendingTransactions, Integer, Hash)>
List pending transactions Get paginated list of pending transactions matching the provided filters.
-
#list_posted_transactions(opts = {}) ⇒ PostedTransactions
List posted transactions Get paginated list of posted transactions matching the provided filters.
-
#list_posted_transactions_with_http_info(opts = {}) ⇒ Array<(PostedTransactions, Integer, Hash)>
List posted transactions Get paginated list of posted transactions matching the provided filters.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TransactionsApi
Returns a new instance of TransactionsApi.
19 20 21 |
# File 'lib/synctera_ruby_sdk/api/transactions_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/synctera_ruby_sdk/api/transactions_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_pending_transaction_by_id(id, opts = {}) ⇒ PendingTransaction
Get a pending transaction Get a pending transaction by its uuid
27 28 29 30 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 27 def get_pending_transaction_by_id(id, opts = {}) data, _status_code, _headers = get_pending_transaction_by_id_with_http_info(id, opts) data end |
#get_pending_transaction_by_id_with_http_info(id, opts = {}) ⇒ Array<(PendingTransaction, Integer, Hash)>
Get a pending transaction Get a pending transaction by its uuid
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 76 77 78 79 80 81 82 83 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 37 def get_pending_transaction_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionsApi.get_pending_transaction_by_id ...' 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 TransactionsApi.get_pending_transaction_by_id" end # resource path local_var_path = '/transactions/pending/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PendingTransaction' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TransactionsApi.get_pending_transaction_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionsApi#get_pending_transaction_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_posted_transaction_by_id(id, opts = {}) ⇒ PostedTransaction
Get a posted transaction Get a posted transaction by its uuid
90 91 92 93 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 90 def get_posted_transaction_by_id(id, opts = {}) data, _status_code, _headers = get_posted_transaction_by_id_with_http_info(id, opts) data end |
#get_posted_transaction_by_id_with_http_info(id, opts = {}) ⇒ Array<(PostedTransaction, Integer, Hash)>
Get a posted transaction Get a posted transaction by its uuid
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 100 def get_posted_transaction_by_id_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionsApi.get_posted_transaction_by_id ...' 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 TransactionsApi.get_posted_transaction_by_id" end # resource path local_var_path = '/transactions/posted/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PostedTransaction' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TransactionsApi.get_posted_transaction_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionsApi#get_posted_transaction_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_pending_transactions(opts = {}) ⇒ PendingTransactions
List pending transactions Get paginated list of pending transactions matching the provided filters
167 168 169 170 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 167 def list_pending_transactions(opts = {}) data, _status_code, _headers = list_pending_transactions_with_http_info(opts) data end |
#list_pending_transactions_with_http_info(opts = {}) ⇒ Array<(PendingTransactions, Integer, Hash)>
List pending transactions Get paginated list of pending transactions matching the provided filters
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 191 def list_pending_transactions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionsApi.list_pending_transactions ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionsApi.list_pending_transactions, must be greater than or equal to 1.' end # resource path local_var_path = '/transactions/pending' # query parameters query_params = opts[:query_params] || {} query_params[:'idempotency_key'] = @api_client.build_collection_param(opts[:'idempotency_key'], :csv) if !opts[:'idempotency_key'].nil? query_params[:'account_no'] = opts[:'account_no'] if !opts[:'account_no'].nil? query_params[:'reference_id'] = opts[:'reference_id'] if !opts[:'reference_id'].nil? query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'card_id'] = opts[:'card_id'] if !opts[:'card_id'].nil? query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil? query_params[:'status'] = @api_client.build_collection_param(opts[:'status'], :csv) if !opts[:'status'].nil? query_params[:'transaction_id'] = opts[:'transaction_id'] if !opts[:'transaction_id'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'subtype'] = opts[:'subtype'] if !opts[:'subtype'].nil? query_params[:'include_child_transactions'] = opts[:'include_child_transactions'] if !opts[:'include_child_transactions'].nil? query_params[:'exclude_jit_transactions'] = opts[:'exclude_jit_transactions'] if !opts[:'exclude_jit_transactions'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PendingTransactions' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TransactionsApi.list_pending_transactions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionsApi#list_pending_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_posted_transactions(opts = {}) ⇒ PostedTransactions
List posted transactions Get paginated list of posted transactions matching the provided filters
272 273 274 275 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 272 def list_posted_transactions(opts = {}) data, _status_code, _headers = list_posted_transactions_with_http_info(opts) data end |
#list_posted_transactions_with_http_info(opts = {}) ⇒ Array<(PostedTransactions, Integer, Hash)>
List posted transactions Get paginated list of posted transactions matching the provided filters
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/synctera_ruby_sdk/api/transactions_api.rb', line 295 def list_posted_transactions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TransactionsApi.list_posted_transactions ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransactionsApi.list_posted_transactions, must be greater than or equal to 1.' end # resource path local_var_path = '/transactions/posted' # query parameters query_params = opts[:query_params] || {} query_params[:'uuid'] = @api_client.build_collection_param(opts[:'uuid'], :csv) if !opts[:'uuid'].nil? query_params[:'idempotency_key'] = @api_client.build_collection_param(opts[:'idempotency_key'], :csv) if !opts[:'idempotency_key'].nil? query_params[:'account_no'] = opts[:'account_no'] if !opts[:'account_no'].nil? query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil? query_params[:'card_id'] = opts[:'card_id'] if !opts[:'card_id'].nil? query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil? query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'subtype'] = opts[:'subtype'] if !opts[:'subtype'].nil? query_params[:'reference_id'] = opts[:'reference_id'] if !opts[:'reference_id'].nil? query_params[:'include_child_transactions'] = opts[:'include_child_transactions'] if !opts[:'include_child_transactions'].nil? query_params[:'exclude_jit_transactions'] = opts[:'exclude_jit_transactions'] if !opts[:'exclude_jit_transactions'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PostedTransactions' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"TransactionsApi.list_posted_transactions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TransactionsApi#list_posted_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |