Class: Lithic::Resources::ThreeDS::Decisioning

Inherits:
Object
  • Object
show all
Defined in:
lib/lithic/resources/three_ds/decisioning.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Decisioning

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 Decisioning.

Parameters:



86
87
88
# File 'lib/lithic/resources/three_ds/decisioning.rb', line 86

def initialize(client:)
  @client = client
end

Instance Method Details

#challenge_response(token:, challenge_response:, request_options: {}) ⇒ nil

Some parameter documentations has been truncated, see Models::ThreeDS::DecisioningChallengeResponseParams for more details.

Card program’s response to a 3DS Challenge Request. Challenge Request is emitted as a webhook [three_ds_authentication.challenge](docs.lithic.com/reference/post_three-ds-authentication-challenge) and your Card Program needs to be configured with Out of Band (OOB) Challenges in order to receive it (see docs.lithic.com/docs/3ds-challenge-flow for more information).

Parameters:

  • token (String)

    Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALL

  • challenge_response (Symbol, Lithic::Models::ThreeDS::ChallengeResult)

    Whether the Cardholder has approved or declined the issued Challenge

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/lithic/resources/three_ds/decisioning.rb', line 28

def challenge_response(params)
  parsed, options = Lithic::ThreeDS::DecisioningChallengeResponseParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/three_ds_decisioning/challenge_response",
    body: parsed,
    model: NilClass,
    options: options
  )
end

#retrieve_secret(request_options: {}) ⇒ Lithic::Models::ThreeDS::DecisioningRetrieveSecretResponse

Retrieve the 3DS Decisioning HMAC secret key. If one does not exist for your program yet, calling this endpoint will create one for you. The headers (which you can use to verify 3DS Decisioning requests) will begin appearing shortly after calling this endpoint for the first time. See [this page](docs.lithic.com/docs/3ds-decisioning#3ds-decisioning-hmac-secrets) for more detail about verifying 3DS Decisioning requests.



53
54
55
56
57
58
59
60
# File 'lib/lithic/resources/three_ds/decisioning.rb', line 53

def retrieve_secret(params = {})
  @client.request(
    method: :get,
    path: "v1/three_ds_decisioning/secret",
    model: Lithic::Models::ThreeDS::DecisioningRetrieveSecretResponse,
    options: params[:request_options]
  )
end

#rotate_secret(request_options: {}) ⇒ nil

Generate a new 3DS Decisioning HMAC secret key. The old secret key will be deactivated 24 hours after a successful request to this endpoint. Make a [‘GET /three_ds_decisioning/secret`](docs.lithic.com/reference/getthreedsdecisioningsecret) request to retrieve the new secret key.

Parameters:

Returns:

  • (nil)

See Also:



74
75
76
77
78
79
80
81
# File 'lib/lithic/resources/three_ds/decisioning.rb', line 74

def rotate_secret(params = {})
  @client.request(
    method: :post,
    path: "v1/three_ds_decisioning/secret/rotate",
    model: NilClass,
    options: params[:request_options]
  )
end