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.



26196
26197
26198
26199
26200
26201
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26196

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.



26194
26195
26196
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26194

def challenge_token
  @challenge_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



26207
26208
26209
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26207

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

#subtype_to_hashObject



26211
26212
26213
26214
26215
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26211

def subtype_to_hash
  {
    :challenge_token => challenge_token
  }
end

#to_jsonObject



26203
26204
26205
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26203

def to_json
  JSON.dump(to_hash)
end