class Io::Flow::V0::Models::SdkAdyenV3AuthenticationToken
Attributes
type[R]
Public Class Methods
from_json(hash)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 15133 def SdkAdyenV3AuthenticationToken.from_json(hash) HttpClient::Preconditions.assert_class('hash', hash, Hash) discriminator = HttpClient::Helper.symbolize_keys(hash)[:type].to_s.strip if discriminator.empty? raise "Union type[sdk_adyen_v3_authentication_token] requires a field named 'type'" end case discriminator when Types::ADYEN_V3_FINGERPRINT_TOKEN; AdyenV3FingerprintToken.new(hash) when Types::ADYEN_V3_CHALLENGE_TOKEN; AdyenV3ChallengeToken.new(hash) else SdkAdyenV3AuthenticationTokenUndefinedType.new(:type => discriminator) end end
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 15119 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type], 'SdkAdyenV3AuthenticationToken') @type = HttpClient::Preconditions.assert_class('type', opts.delete(:type), String) end
Public Instance Methods
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 15125 def subtype_to_hash raise 'Cannot serialize an instance of sdk_adyen_v3_authentication_token directly - must use one of the specific types: adyen_v3_fingerprint_token, adyen_v3_challenge_token' end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 15129 def to_hash subtype_to_hash.merge(:type => @type) end