Class: Io::Flow::V0::Models::ActionUseSdkAdyenV3

Inherits:
Action
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Use the Adyen Web Component v3.1 and Checkout.create. The results of this operation will be used to update the payment request with a ‘payment_method_data` of type `complete_authorization_card` and a `card_authorization_action_result` type of `adyen_v3`. docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration#get-the-3d-secure-2-device-fingerprint

Instance Attribute Summary collapse

Attributes inherited from Action

#type

Instance Method Summary collapse

Methods inherited from Action

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ActionUseSdkAdyenV3

Returns a new instance of ActionUseSdkAdyenV3.



29167
29168
29169
29170
29171
29172
29173
29174
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29167

def initialize(incoming={})
  super(:type => Action::Types::ACTION_USE_SDK_ADYEN_V3)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:origin_key, :authentication_token], 'ActionUseSdkAdyenV3')
  @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
  @origin_key = HttpClient::Preconditions.assert_class('origin_key', opts.delete(:origin_key), String)
  @authentication_token = (x = opts.delete(:authentication_token); x.is_a?(::Io::Flow::V0::Models::SdkAdyenV3AuthenticationToken) ? x : ::Io::Flow::V0::Models::SdkAdyenV3AuthenticationToken.from_json(x))
end

Instance Attribute Details

#authentication_tokenObject (readonly)

Returns the value of attribute authentication_token.



29165
29166
29167
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29165

def authentication_token
  @authentication_token
end

#expires_atObject (readonly)

Returns the value of attribute expires_at.



29165
29166
29167
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29165

def expires_at
  @expires_at
end

#origin_keyObject (readonly)

Returns the value of attribute origin_key.



29165
29166
29167
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29165

def origin_key
  @origin_key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29180
29181
29182
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29180

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

#subtype_to_hashObject



29184
29185
29186
29187
29188
29189
29190
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29184

def subtype_to_hash
  {
    :expires_at => expires_at,
    :origin_key => origin_key,
    :authentication_token => authentication_token.to_hash
  }
end

#to_jsonObject



29176
29177
29178
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29176

def to_json
  JSON.dump(to_hash)
end