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.



30974
30975
30976
30977
30978
30979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30974

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.



30972
30973
30974
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30972

def result
  @result
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30985
30986
30987
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30985

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

#subtype_to_hashObject



30989
30990
30991
30992
30993
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30989

def subtype_to_hash
  {
    :result => result
  }
end

#to_jsonObject



30981
30982
30983
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30981

def to_json
  JSON.dump(to_hash)
end