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.



27742
27743
27744
27745
27746
27747
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27742

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.



27740
27741
27742
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27740

def data
  @data
end

#origin_keyObject (readonly)

Returns the value of attribute origin_key.



27740
27741
27742
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27740

def origin_key
  @origin_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



27753
27754
27755
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27753

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

#subtype_to_hashObject



27757
27758
27759
27760
27761
27762
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27757

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

#to_jsonObject



27749
27750
27751
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27749

def to_json
  JSON.dump(to_hash)
end