Class: Io::Flow::V0::Models::ActionUseSdkAdyenV4

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

Overview

Use the Adyen Web Component v4.7 and Checkout.createFromAction. 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_v4. https://docs.adyen.com/online-payments/3d-secure/native-3ds2/web-component?tab=v67-payment-response_1#3ds2-component

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

Returns a new instance of ActionUseSdkAdyenV4.



29203
29204
29205
29206
29207
29208
29209
29210
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29203

def initialize(incoming={})
  super(:type => Action::Types::ACTION_USE_SDK_ADYEN_V4)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:client_key, :action], 'ActionUseSdkAdyenV4')
  @expires_at = (x = opts.delete(:expires_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
  @client_key = HttpClient::Preconditions.assert_class('client_key', opts.delete(:client_key), String)
  @action = HttpClient::Preconditions.assert_class('action', HttpClient::Helper.to_object(opts.delete(:action)), Hash)
end

Instance Attribute Details

#action ⇒ Object (readonly)

Returns the value of attribute action.



29201
29202
29203
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29201

def action
  @action
end

#client_key ⇒ Object (readonly)

Returns the value of attribute client_key.



29201
29202
29203
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29201

def client_key
  @client_key
end

#expires_at ⇒ Object (readonly)

Returns the value of attribute expires_at.



29201
29202
29203
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29201

def expires_at
  @expires_at
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29216
29217
29218
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29216

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

#subtype_to_hash ⇒ Object



29220
29221
29222
29223
29224
29225
29226
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29220

def subtype_to_hash
  {
    :expires_at => expires_at,
    :client_key => client_key,
    :action => action
  }
end

#to_json ⇒ Object



29212
29213
29214
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29212

def to_json
  JSON.dump(to_hash)
end