Class: Increase::Resources::Simulations::CardAuthorizations
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardAuthorizations
- Defined in:
- lib/increase/resources/simulations/card_authorizations.rb,
sig/increase/resources/simulations/card_authorizations.rbs
Instance Method Summary collapse
-
#create(amount:, authenticated_card_payment_id: nil, card_id: nil, decline_reason: nil, digital_wallet_token_id: nil, event_subscription_id: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_city: nil, merchant_country: nil, merchant_descriptor: nil, merchant_state: nil, network_details: nil, network_risk_score: nil, physical_card_id: nil, processing_category: nil, terminal_id: nil, request_options: {}) ⇒ Increase::Models::Simulations::CardAuthorizationCreateResponse
Some parameter documentations has been truncated, see Models::Simulations::CardAuthorizationCreateParams for more details.
-
#initialize(client:) ⇒ CardAuthorizations
constructor
private
A new instance of CardAuthorizations.
Constructor Details
#initialize(client:) ⇒ CardAuthorizations
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CardAuthorizations.
76 77 78 |
# File 'lib/increase/resources/simulations/card_authorizations.rb', line 76 def initialize(client:) @client = client end |
Instance Method Details
#create(amount:, authenticated_card_payment_id: nil, card_id: nil, decline_reason: nil, digital_wallet_token_id: nil, event_subscription_id: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_city: nil, merchant_country: nil, merchant_descriptor: nil, merchant_state: nil, network_details: nil, network_risk_score: nil, physical_card_id: nil, processing_category: nil, terminal_id: nil, request_options: {}) ⇒ Increase::Models::Simulations::CardAuthorizationCreateResponse
Some parameter documentations has been truncated, see Models::Simulations::CardAuthorizationCreateParams for more details.
Simulates a purchase authorization on a Card. Depending on the balance
available to the card and the amount submitted, the authorization activity
will result in a Pending Transaction of type
card_authorization or a Declined Transaction of type
card_decline. You can pass either a Card id or a
Digital Wallet Token id to simulate the two different
ways purchases can be made. The response will contain either a
pending_transaction or a declined_transaction; the other attribute will be
null. If the authorization is declined, the reason is available on the Declined
Transaction at source.card_decline.reason.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/increase/resources/simulations/card_authorizations.rb', line 62 def create(params) parsed, = Increase::Simulations::CardAuthorizationCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_authorizations", body: parsed, model: Increase::Models::Simulations::CardAuthorizationCreateResponse, options: ) end |