Class: Io::Flow::V0::Models::AdyenChallengeShopperData

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

Overview

Data required to assist in challenging a customer natively.

Instance Attribute Summary collapse

Attributes inherited from AdyenNativeData

#discriminator

Instance Method Summary collapse

Methods inherited from AdyenNativeData

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AdyenChallengeShopperData

Returns a new instance of AdyenChallengeShopperData.



22508
22509
22510
22511
22512
22513
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22508

def initialize(incoming={})
  super(:discriminator => AdyenNativeData::Types::ADYEN_CHALLENGE_SHOPPER_DATA)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:challenge_token], 'AdyenChallengeShopperData')
  @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.



22506
22507
22508
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22506

def challenge_token
  @challenge_token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22519
22520
22521
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22519

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

#subtype_to_hashObject



22523
22524
22525
22526
22527
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22523

def subtype_to_hash
  {
    :challenge_token => challenge_token
  }
end

#to_jsonObject



22515
22516
22517
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22515

def to_json
  JSON.dump(to_hash)
end