Class: PaypalServerSdk::VenmoPaymentTokenUsagePattern
- Inherits:
-
Object
- Object
- PaypalServerSdk::VenmoPaymentTokenUsagePattern
- Defined in:
- lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb
Overview
Expected business/pricing model for the billing agreement.
Constant Summary collapse
- VENMO_PAYMENT_TOKEN_USAGE_PATTERN =
[ # On-demand instant payments – non-recurring, pre-paid, variable amount, # variable frequency. IMMEDIATE = 'IMMEDIATE'.freeze, # Pay after use, non-recurring post-paid, variable amount, irregular # frequency. DEFERRED = 'DEFERRED'.freeze, # Pay upfront fixed or variable amount on a fixed date before the # goods/service is delivered. RECURRING_PREPAID = 'RECURRING_PREPAID'.freeze, # Pay on a fixed date based on usage or consumption after the # goods/service is delivered. RECURRING_POSTPAID = 'RECURRING_POSTPAID'.freeze, # Charge payer when the set amount is reached or monthly billing cycle, # whichever comes first, before the goods/service is delivered. THRESHOLD_PREPAID = 'THRESHOLD_PREPAID'.freeze, # Charge payer when the set amount is reached or monthly billing cycle, # whichever comes first, after the goods/service is delivered. THRESHOLD_POSTPAID = 'THRESHOLD_POSTPAID'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = IMMEDIATE) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb', line 41 def self.from_value(value, default_value = IMMEDIATE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'immediate' then IMMEDIATE when 'deferred' then DEFERRED when 'recurring_prepaid' then RECURRING_PREPAID when 'recurring_postpaid' then RECURRING_POSTPAID when 'threshold_prepaid' then THRESHOLD_PREPAID when 'threshold_postpaid' then THRESHOLD_POSTPAID else default_value end end |
.validate(value) ⇒ Object
35 36 37 38 39 |
# File 'lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb', line 35 def self.validate(value) return false if value.nil? true end |