Class: Io::Flow::V0::Models::AdyenV3ChallengeToken

Inherits:
SdkAdyenV3AuthenticationToken show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

This will load a visible window from the card issuer where the customer will need to authenticate to complete the transaction. Used to initiate Checkout.create using the ‘threeDS2Challenge` operation.

Instance Attribute Summary collapse

Attributes inherited from SdkAdyenV3AuthenticationToken

#type

Instance Method Summary collapse

Methods inherited from SdkAdyenV3AuthenticationToken

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AdyenV3ChallengeToken

Returns a new instance of AdyenV3ChallengeToken.



29977
29978
29979
29980
29981
29982
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29977

def initialize(incoming={})
  super(:type => SdkAdyenV3AuthenticationToken::Types::ADYEN_V3_CHALLENGE_TOKEN)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:challenge_token], 'AdyenV3ChallengeToken')
  @challenge_token = HttpClient::Preconditions.assert_class('challenge_token', opts.delete(:challenge_token), String)
end

Instance Attribute Details

#challenge_tokenObject (readonly)

Returns the value of attribute challenge_token.



29975
29976
29977
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29975

def challenge_token
  @challenge_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29988
29989
29990
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29988

def copy(incoming={})
  AdyenV3ChallengeToken.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



29992
29993
29994
29995
29996
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29992

def subtype_to_hash
  {
    :challenge_token => challenge_token
  }
end

#to_jsonObject



29984
29985
29986
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29984

def to_json
  JSON.dump(to_hash)
end