Class: Io::Flow::V0::Models::PaymentActionType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentActionType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of PaymentActionType for this value, creating a new instance for an unknown value.
-
.display_inline_window ⇒ Object
Render a visible window or iframe to load the payment provider’s url.
-
.execute_script ⇒ Object
Render the returned HTML script from the payment provider.
-
.from_string(value) ⇒ Object
Returns the instance of PaymentActionType for this value, or nil if not found.
-
.redirect ⇒ Object
Redirect the customer to the payment provider’s url.
-
.redirect_get ⇒ Object
Redirect the customer to the payment provider’s url using the GET method.
-
.redirect_post ⇒ Object
Redirect the customer to the payment provider’s url using the POST method.
-
.select_payment_option ⇒ Object
Display a list of options for the user to select from.
-
.use_sdk_adyen_v3 ⇒ Object
Use the Adyen Web Component (v3) to manage card 3ds.
-
.use_sdk_adyen_v4 ⇒ Object
Use the Adyen Web Component (v4) to manage card 3ds.
-
.use_sdk_applepay_js ⇒ Object
Use the Apple Pay Javscript SDK to render the Apple Pay experience.
-
.use_sdk_googlepay ⇒ Object
Use a Google Pay SDK to render the Google Pay button and experience.
-
.use_sdk_klarna_v1 ⇒ Object
Use the Klarna Payment SDK (v1) to render the Klarna widgets for each type of payment offering.
-
.use_sdk_paypal ⇒ Object
Use a Paypal Checkout SDK to render the Paypal button and experience.
-
.use_sdk_stripe_v3 ⇒ Object
Use the Stripe SDK (v3) to manage card 3ds.
Instance Method Summary collapse
-
#initialize(value) ⇒ PaymentActionType
constructor
A new instance of PaymentActionType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ PaymentActionType
Returns a new instance of PaymentActionType.
22185 22186 22187 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22185 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
22183 22184 22185 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22183 def value @value end |
Class Method Details
.ALL ⇒ Object
22205 22206 22207 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22205 def PaymentActionType.ALL @@all ||= [PaymentActionType.redirect, PaymentActionType.redirect_get, PaymentActionType.redirect_post, PaymentActionType.select_payment_option, 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
22190 22191 22192 22193 22194 22195 22196 22197 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22190 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_window ⇒ Object
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.
22293 22294 22295 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22293 def PaymentActionType.display_inline_window @@_display_inline_window ||= PaymentActionType.new('display_inline_window') end |
.execute_script ⇒ Object
Render the returned HTML script from the payment provider. After a decision has been made, the payment request will be updated asynchronously.
22286 22287 22288 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22286 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
22200 22201 22202 22203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22200 def PaymentActionType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) PaymentActionType.ALL.find { |v| v.value == value } end |
.redirect ⇒ Object
Redirect the customer to the payment provider’s url. After the payment process is finished, the customer will be redirected back to the ‘returnUrl. This is an alias for `redirect_get` and will never return a POST. Deprecated: Replaced by redirect_get and redirect_post.
22213 22214 22215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22213 def PaymentActionType.redirect @@_redirect ||= PaymentActionType.new('redirect') end |
.redirect_get ⇒ Object
Redirect the customer to the payment provider’s url using the GET method. After the payment process is finished, the customer will be redirected back to the ‘returnUrl`.
22220 22221 22222 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22220 def PaymentActionType.redirect_get @@_redirect_get ||= PaymentActionType.new('redirect_get') end |
.redirect_post ⇒ Object
Redirect the customer to the payment provider’s url using the POST method. After the payment process is finished, the customer will be redirected back to the ‘returnUrl`.
22227 22228 22229 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22227 def PaymentActionType.redirect_post @@_redirect_post ||= PaymentActionType.new('redirect_post') end |
.select_payment_option ⇒ Object
Display a list of options for the user to select from. This is required for certain payment process where the user is required to select from a list of options
22234 22235 22236 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22234 def PaymentActionType.select_payment_option @@_select_payment_option ||= PaymentActionType.new('select_payment_option') end |
.use_sdk_adyen_v3 ⇒ Object
Use the Adyen Web Component (v3) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.
22274 22275 22276 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22274 def PaymentActionType.use_sdk_adyen_v3 @@_use_sdk_adyen_v3 ||= PaymentActionType.new('use_sdk_adyen_v3') end |
.use_sdk_adyen_v4 ⇒ Object
Use the Adyen Web Component (v4) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.
22280 22281 22282 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22280 def PaymentActionType.use_sdk_adyen_v4 @@_use_sdk_adyen_v4 ||= PaymentActionType.new('use_sdk_adyen_v4') end |
.use_sdk_applepay_js ⇒ Object
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`.
22248 22249 22250 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22248 def PaymentActionType.use_sdk_applepay_js @@_use_sdk_applepay_js ||= PaymentActionType.new('use_sdk_applepay_js') end |
.use_sdk_googlepay ⇒ Object
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`.
22255 22256 22257 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22255 def PaymentActionType.use_sdk_googlepay @@_use_sdk_googlepay ||= PaymentActionType.new('use_sdk_googlepay') end |
.use_sdk_klarna_v1 ⇒ Object
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.
22241 22242 22243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22241 def PaymentActionType.use_sdk_klarna_v1 @@_use_sdk_klarna_v1 ||= PaymentActionType.new('use_sdk_klarna_v1') end |
.use_sdk_paypal ⇒ Object
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`
22262 22263 22264 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22262 def PaymentActionType.use_sdk_paypal @@_use_sdk_paypal ||= PaymentActionType.new('use_sdk_paypal') end |
.use_sdk_stripe_v3 ⇒ Object
Use the Stripe SDK (v3) to manage card 3ds. After the decision has been made, the payment request will update asynchronously.
22268 22269 22270 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22268 def PaymentActionType.use_sdk_stripe_v3 @@_use_sdk_stripe_v3 ||= PaymentActionType.new('use_sdk_stripe_v3') end |
Instance Method Details
#to_hash ⇒ Object
22297 22298 22299 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22297 def to_hash value end |