Class: Io::Flow::V0::Models::AdyenNativeActionDetails

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

Overview

Provides details for how to acquire additional information from the customer natively in the browser for Adyen (e.g. 3DS2)

Instance Attribute Summary collapse

Attributes inherited from AuthorizationResultActionDetails

#discriminator

Instance Method Summary collapse

Methods inherited from AuthorizationResultActionDetails

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AdyenNativeActionDetails

Returns a new instance of AdyenNativeActionDetails.



29946
29947
29948
29949
29950
29951
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29946

def initialize(incoming={})
  super(:discriminator => AuthorizationResultActionDetails::Types::ADYEN_NATIVE_ACTION_DETAILS)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @origin_key = (x = opts.delete(:origin_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin_key', x, String))
  @data = (x = opts.delete(:data); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AdyenNativeData) ? x : ::Io::Flow::V0::Models::AdyenNativeData.from_json(x)))
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



29944
29945
29946
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29944

def data
  @data
end

#origin_keyObject (readonly)

Returns the value of attribute origin_key.



29944
29945
29946
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29944

def origin_key
  @origin_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29957
29958
29959
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29957

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

#subtype_to_hashObject



29961
29962
29963
29964
29965
29966
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29961

def subtype_to_hash
  {
    :origin_key => origin_key,
    :data => data.nil? ? nil : data.to_hash
  }
end

#to_jsonObject



29953
29954
29955
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29953

def to_json
  JSON.dump(to_hash)
end