Class: Io::Flow::V0::Models::ThreedsIdentifyAction
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ThreedsIdentifyAction
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Different version sets of 3ds identify actions.
Direct Known Subclasses
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ ThreedsIdentifyAction
constructor
A new instance of ThreedsIdentifyAction.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ThreedsIdentifyAction
Returns a new instance of ThreedsIdentifyAction.
15933 15934 15935 15936 15937 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15933 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsIdentifyAction') @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String) end |
Instance Attribute Details
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
15931 15932 15933 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15931 def discriminator @discriminator end |
Class Method Details
.from_json(hash) ⇒ Object
15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15947 def ThreedsIdentifyAction.from_json(hash) HttpClient::Preconditions.assert_class('hash', hash, Hash) discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip if discriminator.empty? raise "Union type[threeds_identify_action] requires a field named 'discriminator'" end case discriminator when Types::THREEDS_TWO_METHOD; ThreedsTwoMethod.new(hash) else ThreedsIdentifyActionUndefinedType.new(:discriminator => discriminator) end end |
Instance Method Details
#subtype_to_hash ⇒ Object
15939 15940 15941 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15939 def subtype_to_hash raise 'Cannot serialize an instance of threeds_identify_action directly - must use one of the specific types: threeds_two_method' end |
#to_hash ⇒ Object
15943 15944 15945 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15943 def to_hash subtype_to_hash.merge(:discriminator => @discriminator) end |