Class: Io::Flow::V0::Models::AuthorizationActionResultAdyenV4

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

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 = {}) ⇒ AuthorizationActionResultAdyenV4

Returns a new instance of AuthorizationActionResultAdyenV4.



28739
28740
28741
28742
28743
28744
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28739

def initialize(incoming={})
  super(:type => CardAuthorizationActionResult::Types::AUTHORIZATION_ACTION_RESULT_ADYEN_V4)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:result], 'AuthorizationActionResultAdyenV4')
  @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.



28737
28738
28739
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28737

def result
  @result
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



28750
28751
28752
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28750

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

#subtype_to_hashObject



28754
28755
28756
28757
28758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28754

def subtype_to_hash
  {
    :result => result
  }
end

#to_jsonObject



28746
28747
28748
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28746

def to_json
  JSON.dump(to_hash)
end