Class: SyncteraRubySdk::CardTransactionSimulationsApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::CardTransactionSimulationsApi
- Defined in:
- lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ CardTransactionSimulationsApi
constructor
A new instance of CardTransactionSimulationsApi.
-
#simulate_authorization(opts = {}) ⇒ Object
Simulate authorization Simulate an ‘authorization` type transaction by including the `card_token` and other authorization details in your request.
-
#simulate_authorization_advice(opts = {}) ⇒ Object
Simulate authorization advice An authorization advice allows an amount to be decreased after the authorization.
-
#simulate_authorization_advice_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate authorization advice An authorization advice allows an amount to be decreased after the authorization.
-
#simulate_authorization_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate authorization Simulate an `authorization` type transaction by including the `card_token` and other authorization details in your request.
-
#simulate_balance_inquiry(balance_inquiry_request_model, opts = {}) ⇒ Object
Simulate balance inquiry Simulate a ‘pindebit.balanceinquiry` type transaction by sending a POST request to the `/simulate/financial/balanceinquiry` endpoint.
-
#simulate_balance_inquiry_with_http_info(balance_inquiry_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate balance inquiry Simulate a `pindebit.balanceinquiry` type transaction by sending a POST request to the `/simulate/financial/balanceinquiry` endpoint.
-
#simulate_clearing(opts = {}) ⇒ Object
Simulate clearing or refund Simulate an ‘authorization.clearing` type transaction by including the `original_transaction_token` and `amount` in your request.
-
#simulate_clearing_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate clearing or refund Simulate an `authorization.clearing` type transaction by including the `original_transaction_token` and `amount` in your request.
-
#simulate_financial(financial_request_model, opts = {}) ⇒ Object
Simulate financial A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries.
-
#simulate_financial_advice(authorization_advice_model, opts = {}) ⇒ Object
Simulate financial advice Simulate a financial advice by including the ‘original_transaction_token` and other authorization details in JSON format in the body of the request.
-
#simulate_financial_advice_with_http_info(authorization_advice_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate financial advice Simulate a financial advice by including the `original_transaction_token` and other authorization details in JSON format in the body of the request.
-
#simulate_financial_with_http_info(financial_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate financial A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries.
-
#simulate_original_credit(original_credit_request_model, opts = {}) ⇒ Object
Simulate OCT This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network.
-
#simulate_original_credit_with_http_info(original_credit_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate OCT This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network.
-
#simulate_reversal(reversal_model, opts = {}) ⇒ Object
Simulate reversal A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account.
-
#simulate_reversal_with_http_info(reversal_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate reversal A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account.
-
#simulate_withdrawal(withdrawal_request_model, opts = {}) ⇒ Object
Simulate ATM withdrawal Simulate a ‘pindebit.atm.withdrawal` type transaction by including the `card_token` and `amount` in your request.
-
#simulate_withdrawal_with_http_info(withdrawal_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate ATM withdrawal Simulate a `pindebit.atm.withdrawal` type transaction by including the `card_token` and `amount` in your request.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CardTransactionSimulationsApi
Returns a new instance of CardTransactionSimulationsApi.
19 20 21 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_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/card_transaction_simulations_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#simulate_authorization(opts = {}) ⇒ Object
Simulate authorization Simulate an ‘authorization` type transaction by including the `card_token` and other authorization details in your request.
27 28 29 30 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 27 def (opts = {}) data, _status_code, _headers = (opts) data end |
#simulate_authorization_advice(opts = {}) ⇒ Object
Simulate authorization advice An authorization advice allows an amount to be decreased after the authorization. This endpoint allows you to simulate post-swipe adjustments. Simulate an ‘authorization.advice` type transaction by including the `original_transaction_token` and other authorization details in your request.
91 92 93 94 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 91 def (opts = {}) data, _status_code, _headers = (opts) data end |
#simulate_authorization_advice_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate authorization advice An authorization advice allows an amount to be decreased after the authorization. This endpoint allows you to simulate post-swipe adjustments. Simulate an `authorization.advice` type transaction by including the `original_transaction_token` and other authorization details in your request.
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 147 148 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 101 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_authorization_advice ...' end # resource path local_var_path = '/cards/transaction_simulations/authorization/advice' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'authorization_advice_model']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_authorization_advice", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_authorization_advice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_authorization_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate authorization Simulate an `authorization` type transaction by including the `card_token` and other authorization details in your request.
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 84 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 37 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_authorization ...' end # resource path local_var_path = '/cards/transaction_simulations/authorization' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auth_request_model']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_authorization", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_authorization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_balance_inquiry(balance_inquiry_request_model, opts = {}) ⇒ Object
Simulate balance inquiry Simulate a ‘pindebit.balanceinquiry` type transaction by sending a POST request to the `/simulate/financial/balanceinquiry` endpoint.
155 156 157 158 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 155 def simulate_balance_inquiry(balance_inquiry_request_model, opts = {}) data, _status_code, _headers = simulate_balance_inquiry_with_http_info(balance_inquiry_request_model, opts) data end |
#simulate_balance_inquiry_with_http_info(balance_inquiry_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate balance inquiry Simulate a `pindebit.balanceinquiry` type transaction by sending a POST request to the `/simulate/financial/balanceinquiry` endpoint.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 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 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 165 def simulate_balance_inquiry_with_http_info(balance_inquiry_request_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_balance_inquiry ...' end # verify the required parameter 'balance_inquiry_request_model' is set if @api_client.config.client_side_validation && balance_inquiry_request_model.nil? fail ArgumentError, "Missing the required parameter 'balance_inquiry_request_model' when calling CardTransactionSimulationsApi.simulate_balance_inquiry" end # resource path local_var_path = '/cards/transaction_simulations/financial/balance_inquiry' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(balance_inquiry_request_model) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_balance_inquiry", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_balance_inquiry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_clearing(opts = {}) ⇒ Object
Simulate clearing or refund Simulate an ‘authorization.clearing` type transaction by including the `original_transaction_token` and `amount` in your request. To simulate a refund type transaction, set the `is_refund` field to true.
223 224 225 226 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 223 def simulate_clearing(opts = {}) data, _status_code, _headers = simulate_clearing_with_http_info(opts) data end |
#simulate_clearing_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate clearing or refund Simulate an `authorization.clearing` type transaction by including the `original_transaction_token` and `amount` in your request. To simulate a refund type transaction, set the `is_refund` field to true.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 233 def simulate_clearing_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_clearing ...' end # resource path local_var_path = '/cards/transaction_simulations/clearing' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'clearing_model']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_clearing", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_clearing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_financial(financial_request_model, opts = {}) ⇒ Object
Simulate financial A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries. Simulate a ‘pindebit` type transaction by including the `card_token` and `amount` in your request.
287 288 289 290 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 287 def simulate_financial(financial_request_model, opts = {}) data, _status_code, _headers = simulate_financial_with_http_info(financial_request_model, opts) data end |
#simulate_financial_advice(authorization_advice_model, opts = {}) ⇒ Object
Simulate financial advice Simulate a financial advice by including the ‘original_transaction_token` and other authorization details in JSON format in the body of the request.
355 356 357 358 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 355 def simulate_financial_advice(, opts = {}) data, _status_code, _headers = simulate_financial_advice_with_http_info(, opts) data end |
#simulate_financial_advice_with_http_info(authorization_advice_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate financial advice Simulate a financial advice by including the `original_transaction_token` and other authorization details in JSON format in the body of the request.
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 365 def simulate_financial_advice_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_financial_advice ...' end # verify the required parameter 'authorization_advice_model' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization_advice_model' when calling CardTransactionSimulationsApi.simulate_financial_advice" end # resource path local_var_path = '/cards/transaction_simulations/financial/advice' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_financial_advice", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_financial_advice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_financial_with_http_info(financial_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate financial A "financial" is a transaction message class that includes ATM transactions, PIN-debit transactions, and balance inquiries. Simulate a `pindebit` type transaction by including the `card_token` and `amount` in your request.
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 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 297 def simulate_financial_with_http_info(financial_request_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_financial ...' end # verify the required parameter 'financial_request_model' is set if @api_client.config.client_side_validation && financial_request_model.nil? fail ArgumentError, "Missing the required parameter 'financial_request_model' when calling CardTransactionSimulationsApi.simulate_financial" end # resource path local_var_path = '/cards/transaction_simulations/financial' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(financial_request_model) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_financial", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_financial\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_original_credit(original_credit_request_model, opts = {}) ⇒ Object
Simulate OCT This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network. Use this endpoint to simulate a transaction that is similar to a wire transfer and not linked to any purchase. Simulate an OCT by including the ‘card_token`, `amount`, `mid`, and `type` in your request.
423 424 425 426 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 423 def simulate_original_credit(original_credit_request_model, opts = {}) data, _status_code, _headers = simulate_original_credit_with_http_info(original_credit_request_model, opts) data end |
#simulate_original_credit_with_http_info(original_credit_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate OCT This Original Credit Transaction (OCT) enables the cardholder to receive funds on the specified card from an external source via the card network. Use this endpoint to simulate a transaction that is similar to a wire transfer and not linked to any purchase. Simulate an OCT by including the `card_token`, `amount`, `mid`, and `type` in your request.
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 433 def simulate_original_credit_with_http_info(original_credit_request_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_original_credit ...' end # verify the required parameter 'original_credit_request_model' is set if @api_client.config.client_side_validation && original_credit_request_model.nil? fail ArgumentError, "Missing the required parameter 'original_credit_request_model' when calling CardTransactionSimulationsApi.simulate_original_credit" end # resource path local_var_path = '/cards/transaction_simulations/financial/original_credit' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(original_credit_request_model) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_original_credit", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_original_credit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_reversal(reversal_model, opts = {}) ⇒ Object
Simulate reversal A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account. Simulate an ‘authorization.reversal` type transaction by including the `original_transaction_token` and `amount` in your request.
491 492 493 494 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 491 def simulate_reversal(reversal_model, opts = {}) data, _status_code, _headers = simulate_reversal_with_http_info(reversal_model, opts) data end |
#simulate_reversal_with_http_info(reversal_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate reversal A reversal releases the hold that was placed on account funds by an authorization, thus returning the funds to the account. Simulate an `authorization.reversal` type transaction by including the `original_transaction_token` and `amount` in your request.
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 501 def simulate_reversal_with_http_info(reversal_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_reversal ...' end # verify the required parameter 'reversal_model' is set if @api_client.config.client_side_validation && reversal_model.nil? fail ArgumentError, "Missing the required parameter 'reversal_model' when calling CardTransactionSimulationsApi.simulate_reversal" end # resource path local_var_path = '/cards/transaction_simulations/reversal' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(reversal_model) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_reversal", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_reversal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#simulate_withdrawal(withdrawal_request_model, opts = {}) ⇒ Object
Simulate ATM withdrawal Simulate a ‘pindebit.atm.withdrawal` type transaction by including the `card_token` and `amount` in your request.
559 560 561 562 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 559 def simulate_withdrawal(withdrawal_request_model, opts = {}) data, _status_code, _headers = simulate_withdrawal_with_http_info(withdrawal_request_model, opts) data end |
#simulate_withdrawal_with_http_info(withdrawal_request_model, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Simulate ATM withdrawal Simulate a `pindebit.atm.withdrawal` type transaction by including the `card_token` and `amount` in your request.
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
# File 'lib/synctera_ruby_sdk/api/card_transaction_simulations_api.rb', line 569 def simulate_withdrawal_with_http_info(withdrawal_request_model, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CardTransactionSimulationsApi.simulate_withdrawal ...' end # verify the required parameter 'withdrawal_request_model' is set if @api_client.config.client_side_validation && withdrawal_request_model.nil? fail ArgumentError, "Missing the required parameter 'withdrawal_request_model' when calling CardTransactionSimulationsApi.simulate_withdrawal" end # resource path local_var_path = '/cards/transaction_simulations/financial/withdrawal' # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(withdrawal_request_model) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"CardTransactionSimulationsApi.simulate_withdrawal", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CardTransactionSimulationsApi#simulate_withdrawal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |