Class: Lithic::Resources::ThreeDS::Authentication
- Inherits:
-
Object
- Object
- Lithic::Resources::ThreeDS::Authentication
- Defined in:
- lib/lithic/resources/three_ds/authentication.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Authentication
constructor
private
A new instance of Authentication.
-
#retrieve(three_ds_authentication_token, request_options: {}) ⇒ Lithic::Models::ThreeDSAuthentication
Get 3DS Authentication by token.
-
#simulate(merchant:, pan:, transaction:, card_expiry_check: nil, request_options: {}) ⇒ Lithic::Models::ThreeDS::AuthenticationSimulateResponse
Some parameter documentations has been truncated, see Models::ThreeDS::AuthenticationSimulateParams for more details.
-
#simulate_otp_entry(token:, otp:, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::ThreeDS::AuthenticationSimulateOtpEntryParams for more details.
Constructor Details
#initialize(client:) ⇒ Authentication
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 Authentication.
97 98 99 |
# File 'lib/lithic/resources/three_ds/authentication.rb', line 97 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(three_ds_authentication_token, request_options: {}) ⇒ Lithic::Models::ThreeDSAuthentication
Get 3DS Authentication by token
18 19 20 21 22 23 24 25 |
# File 'lib/lithic/resources/three_ds/authentication.rb', line 18 def retrieve(three_ds_authentication_token, params = {}) @client.request( method: :get, path: ["v1/three_ds_authentication/%1$s", three_ds_authentication_token], model: Lithic::ThreeDSAuthentication, options: params[:request_options] ) end |
#simulate(merchant:, pan:, transaction:, card_expiry_check: nil, request_options: {}) ⇒ Lithic::Models::ThreeDS::AuthenticationSimulateResponse
Some parameter documentations has been truncated, see Models::ThreeDS::AuthenticationSimulateParams for more details.
Simulates a 3DS authentication request from the payment network as if it came from an ACS. If you’re configured for 3DS Customer Decisioning, simulating authentications requires your customer decisioning endpoint to be set up properly (respond with a valid JSON). If the authentication decision is to challenge, ensure that the account holder associated with the card transaction has a valid phone number configured to receive the OTP code via SMS.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/lithic/resources/three_ds/authentication.rb', line 52 def simulate(params) parsed, = Lithic::ThreeDS::AuthenticationSimulateParams.dump_request(params) @client.request( method: :post, path: "v1/three_ds_authentication/simulate", body: parsed, model: Lithic::Models::ThreeDS::AuthenticationSimulateResponse, options: ) end |
#simulate_otp_entry(token:, otp:, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::ThreeDS::AuthenticationSimulateOtpEntryParams for more details.
Endpoint for simulating entering OTP into 3DS Challenge UI. A call to [/v1/three_ds_authentication/simulate](docs.lithic.com/reference/postsimulateauthentication) that resulted in triggered SMS-OTP challenge must precede. Only a single attempt is supported; upon entering OTP, the challenge is either approved or declined.
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/lithic/resources/three_ds/authentication.rb', line 83 def simulate_otp_entry(params) parsed, = Lithic::ThreeDS::AuthenticationSimulateOtpEntryParams.dump_request(params) @client.request( method: :post, path: "v1/three_ds_decisioning/simulate/enter_otp", body: parsed, model: NilClass, options: ) end |