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.



22565
22566
22567
22568
22569
22570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22565

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.



22563
22564
22565
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22563

def data
  @data
end

#origin_keyObject (readonly)

Returns the value of attribute origin_key.



22563
22564
22565
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22563

def origin_key
  @origin_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22576
22577
22578
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22576

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

#subtype_to_hashObject



22580
22581
22582
22583
22584
22585
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22580

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

#to_jsonObject



22572
22573
22574
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22572

def to_json
  JSON.dump(to_hash)
end