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.



24028
24029
24030
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24028

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

Instance Attribute Details

#value ⇒ Object (readonly)

Returns the value of attribute value.



24026
24027
24028
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24026

def value
  @value
end

Class Method Details

.ALL ⇒ Object



24048
24049
24050
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24048

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



24033
24034
24035
24036
24037
24038
24039
24040
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24033

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.



24136
24137
24138
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24136

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.



24129
24130
24131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24129

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



24043
24044
24045
24046
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24043

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.



24056
24057
24058
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24056

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.



24063
24064
24065
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24063

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.



24070
24071
24072
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24070

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



24077
24078
24079
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24077

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.



24117
24118
24119
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24117

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.



24123
24124
24125
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24123

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.



24091
24092
24093
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24091

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.



24098
24099
24100
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24098

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.



24084
24085
24086
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24084

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



24105
24106
24107
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24105

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.



24111
24112
24113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24111

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

Instance Method Details

#to_hash ⇒ Object



24140
24141
24142
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24140

def to_hash
  value
end