Class: Io::Flow::V0::Models::PaymentActionType

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ PaymentActionType

Returns a new instance of PaymentActionType.



21177
21178
21179
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21177

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21175
21176
21177
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21175

def value
  @value
end

Class Method Details

.ALLObject



21197
21198
21199
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21197

def PaymentActionType.ALL
  @@all ||= [PaymentActionType.redirect, PaymentActionType.use_sdk_klarna_v1, PaymentActionType.use_sdk_applepay_js, PaymentActionType.use_sdk_googlepay, PaymentActionType.use_sdk_paypal, PaymentActionType.use_sdk_stripe_v3, PaymentActionType.use_sdk_adyen_v3, PaymentActionType.use_sdk_adyen_v4, PaymentActionType.execute_script, PaymentActionType.display_inline_window]
end

.apply(value) ⇒ Object

Returns the instance of PaymentActionType for this value, creating a new instance for an unknown value



21182
21183
21184
21185
21186
21187
21188
21189
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21182

def PaymentActionType.apply(value)
  if value.instance_of?(PaymentActionType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PaymentActionType.new(value))
  end
end

.display_inline_windowObject

Render a visible window or iframe to load the payment provider’s url. After the payment process is finished, the payment request will be updated asynchronously.



21262
21263
21264
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21262

def PaymentActionType.display_inline_window
  @@_display_inline_window ||= PaymentActionType.new('display_inline_window')
end

.execute_scriptObject

Render the returned HTML script from the payment provider. After a decision has been made, the payment request will be updated asynchronously.



21255
21256
21257
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21255

def PaymentActionType.execute_script
  @@_execute_script ||= PaymentActionType.new('execute_script')
end

.from_string(value) ⇒ Object

Returns the instance of PaymentActionType for this value, or nil if not found



21192
21193
21194
21195
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21192

def PaymentActionType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PaymentActionType.ALL.find { |v| v.value == value }
end

.redirectObject

Redirect the customer to the payment provider’s url. After the payment process is finished, the customer will be redirected back to the ‘returnUrl`.



21203
21204
21205
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21203

def PaymentActionType.redirect
  @@_redirect ||= PaymentActionType.new('redirect')
end

.use_sdk_adyen_v3Object

Use the Adyen Web Component (v3) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.



21243
21244
21245
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21243

def PaymentActionType.use_sdk_adyen_v3
  @@_use_sdk_adyen_v3 ||= PaymentActionType.new('use_sdk_adyen_v3')
end

.use_sdk_adyen_v4Object

Use the Adyen Web Component (v4) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.



21249
21250
21251
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21249

def PaymentActionType.use_sdk_adyen_v4
  @@_use_sdk_adyen_v4 ||= PaymentActionType.new('use_sdk_adyen_v4')
end

.use_sdk_applepay_jsObject

Use the Apple Pay Javscript SDK to render the Apple Pay experience. To finish the process, you will update the ‘payment_method_data` to `authorize_applepay`.



21217
21218
21219
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21217

def PaymentActionType.use_sdk_applepay_js
  @@_use_sdk_applepay_js ||= PaymentActionType.new('use_sdk_applepay_js')
end

.use_sdk_googlepayObject

Use a Google Pay SDK to render the Google Pay button and experience. To finish the process, you will update the ‘payment_method_data` to `authorize_googlepay`.



21224
21225
21226
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21224

def PaymentActionType.use_sdk_googlepay
  @@_use_sdk_googlepay ||= PaymentActionType.new('use_sdk_googlepay')
end

.use_sdk_klarna_v1Object

Use the Klarna Payment SDK (v1) to render the Klarna widgets for each type of payment offering. After the decision has been made, the payment request will be updated asynchronously.



21210
21211
21212
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21210

def PaymentActionType.use_sdk_klarna_v1
  @@_use_sdk_klarna_v1 ||= PaymentActionType.new('use_sdk_klarna_v1')
end

.use_sdk_paypalObject

Use a Paypal Checkout SDK to render the Paypal button and experience. To finish the process, you will update the ‘payment_method_data` to `authorize_paypal`



21231
21232
21233
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21231

def PaymentActionType.use_sdk_paypal
  @@_use_sdk_paypal ||= PaymentActionType.new('use_sdk_paypal')
end

.use_sdk_stripe_v3Object

Use the Stripe SDK (v3) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.



21237
21238
21239
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21237

def PaymentActionType.use_sdk_stripe_v3
  @@_use_sdk_stripe_v3 ||= PaymentActionType.new('use_sdk_stripe_v3')
end

Instance Method Details

#to_hashObject



21266
21267
21268
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21266

def to_hash
  value
end