Class: Io::Flow::V0::Models::AuthorizationActionResultAdyenV3

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

Overview

Used to complete a ‘use_sdk_adyen_v3` action after the `onComplete()` function passed to Adyen SDK’s is invoked with a parameter containing the result data.

Instance Attribute Summary collapse

Attributes inherited from CardAuthorizationActionResult

#type

Instance Method Summary collapse

Methods inherited from CardAuthorizationActionResult

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AuthorizationActionResultAdyenV3

Returns a new instance of AuthorizationActionResultAdyenV3.



28712
28713
28714
28715
28716
28717
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28712

def initialize(incoming={})
  super(:type => CardAuthorizationActionResult::Types::AUTHORIZATION_ACTION_RESULT_ADYEN_V3)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:result], 'AuthorizationActionResultAdyenV3')
  @result = HttpClient::Preconditions.assert_class('result', HttpClient::Helper.to_object(opts.delete(:result)), Hash)
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



28710
28711
28712
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28710

def result
  @result
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



28723
28724
28725
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28723

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

#subtype_to_hashObject



28727
28728
28729
28730
28731
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28727

def subtype_to_hash
  {
    :result => result
  }
end

#to_jsonObject



28719
28720
28721
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28719

def to_json
  JSON.dump(to_hash)
end