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.



27773
27774
27775
27776
27777
27778
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27773

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.



27771
27772
27773
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27771

def challenge_token
  @challenge_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



27784
27785
27786
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27784

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

#subtype_to_hashObject



27788
27789
27790
27791
27792
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27788

def subtype_to_hash
  {
    :challenge_token => challenge_token
  }
end

#to_jsonObject



27780
27781
27782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27780

def to_json
  JSON.dump(to_hash)
end