Class: PaypalServerSdk::SubscriptionPlanStatus
- Inherits:
-
Object
- Object
- PaypalServerSdk::SubscriptionPlanStatus
- Defined in:
- lib/paypal_server_sdk/models/subscription_plan_status.rb
Overview
The plan status.
Constant Summary collapse
- SUBSCRIPTION_PLAN_STATUS =
[ # The plan was created. You cannot create subscriptions for a plan in this # state. CREATED = 'CREATED'.freeze, # The plan is inactive. INACTIVE = 'INACTIVE'.freeze, # The plan is active. You can only create subscriptions for a plan in this # state. ACTIVE = 'ACTIVE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CREATED) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/subscription_plan_status.rb', line 28 def self.from_value(value, default_value = CREATED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'created' then CREATED when 'inactive' then INACTIVE when 'active' then ACTIVE else default_value end end |
.validate(value) ⇒ Object
22 23 24 25 26 |
# File 'lib/paypal_server_sdk/models/subscription_plan_status.rb', line 22 def self.validate(value) return false if value.nil? true end |