Class: Increase::Resources::Simulations::CardAuthorizations
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardAuthorizations
- Defined in:
- lib/increase/resources/simulations/card_authorizations.rb
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.
73 74 75 |
# File 'lib/increase/resources/simulations/card_authorizations.rb', line 73 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](#cards). Depending on the balance available to the card and the ‘amount` submitted, the authorization activity will result in a [Pending Transaction](#pending-transactions) of type `card_authorization` or a [Declined Transaction](#declined-transactions) of type `card_decline`. You can pass either a Card id or a [Digital Wallet Token](#digital-wallet-tokens) id to simulate the two different ways purchases can be made.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/increase/resources/simulations/card_authorizations.rb', line 59 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 |