Class: Increase::Resources::Simulations::CardAuthentications
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardAuthentications
- Defined in:
- lib/increase/resources/simulations/card_authentications.rb
Instance Method Summary collapse
-
#challenge_attempts(card_payment_id, one_time_code:, request_options: {}) ⇒ Increase::Models::CardPayment
Simulates an attempt at a Card Authentication Challenge.
-
#challenges(card_payment_id, request_options: {}) ⇒ Increase::Models::CardPayment
Simulates starting a Card Authentication Challenge for an existing Card Authentication.
-
#create(card_id:, category: nil, device_channel: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_country: nil, merchant_name: nil, purchase_amount: nil, request_options: {}) ⇒ Increase::Models::CardPayment
Some parameter documentations has been truncated, see Models::Simulations::CardAuthenticationCreateParams for more details.
-
#initialize(client:) ⇒ CardAuthentications
constructor
private
A new instance of CardAuthentications.
Constructor Details
#initialize(client:) ⇒ CardAuthentications
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 CardAuthentications.
104 105 106 |
# File 'lib/increase/resources/simulations/card_authentications.rb', line 104 def initialize(client:) @client = client end |
Instance Method Details
#challenge_attempts(card_payment_id, one_time_code:, request_options: {}) ⇒ Increase::Models::CardPayment
Simulates an attempt at a Card Authentication Challenge. This updates the ‘card_authentications` object under the [Card Payment](#card_payments). You can also attempt the challenge by navigating to dashboard.increase.com/card_authentication_simulation/:card_payment_id.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/increase/resources/simulations/card_authentications.rb', line 65 def challenge_attempts(card_payment_id, params) parsed, = Increase::Simulations::CardAuthenticationChallengeAttemptsParams.dump_request(params) @client.request( method: :post, path: ["simulations/card_authentications/%1$s/challenge_attempts", card_payment_id], body: parsed, model: Increase::CardPayment, options: ) end |
#challenges(card_payment_id, request_options: {}) ⇒ Increase::Models::CardPayment
Simulates starting a Card Authentication Challenge for an existing Card Authentication. This updates the ‘card_authentications` object under the [Card Payment](#card_payments). To attempt the challenge, use the `/simulations/card_authentications/:card_payment_id/challenge_attempts` endpoint or navigate to dashboard.increase.com/card_authentication_simulation/:card_payment_id.
92 93 94 95 96 97 98 99 |
# File 'lib/increase/resources/simulations/card_authentications.rb', line 92 def challenges(card_payment_id, params = {}) @client.request( method: :post, path: ["simulations/card_authentications/%1$s/challenges", card_payment_id], model: Increase::CardPayment, options: params[:request_options] ) end |
#create(card_id:, category: nil, device_channel: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_country: nil, merchant_name: nil, purchase_amount: nil, request_options: {}) ⇒ Increase::Models::CardPayment
Some parameter documentations has been truncated, see Models::Simulations::CardAuthenticationCreateParams for more details.
Simulates a Card Authentication attempt on a [Card](#cards). The attempt always results in a [Card Payment](#card_payments) being created, either with a status that allows further action or a terminal failed status.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/increase/resources/simulations/card_authentications.rb', line 38 def create(params) parsed, = Increase::Simulations::CardAuthenticationCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_authentications", body: parsed, model: Increase::CardPayment, options: ) end |