Class: PaypalServerSdk::VaultUserAction
- Inherits:
-
Object
- Object
- PaypalServerSdk::VaultUserAction
- Defined in:
- lib/paypal_server_sdk/models/vault_user_action.rb
Overview
User Action on action to be performed after a successful payer approval.
Constant Summary collapse
- VAULT_USER_ACTION =
[ # After you redirect the customer to the PayPal payment page, a Setup Now # button appears. Use this option when no additional inputs are needed # from merchant site and to create the billing agreement immediately when # the customer clicks Setup Now. SETUP_NOW = 'SETUP_NOW'.freeze, # After you redirect the customer to the PayPal payment page, a Continue # button appears. Use this option when you want to redirect the customer # from the completed payment page to the merchant site for additional # inputs without immediately creating the billing agreement. CONTINUE = 'CONTINUE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SETUP_NOW) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/vault_user_action.rb', line 29 def self.from_value(value, default_value = SETUP_NOW) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'setup_now' then SETUP_NOW when 'continue' then CONTINUE else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/paypal_server_sdk/models/vault_user_action.rb', line 23 def self.validate(value) return false if value.nil? true end |