Class: UnivapayClientSdk::TerminateWithStatus
- Inherits:
-
Object
- Object
- UnivapayClientSdk::TerminateWithStatus
- Defined in:
- lib/univapay_client_sdk/models/terminate_with_status.rb
Overview
The status the subscription would transition to on this payment's due date,
if a termination is scheduled. null when no termination applies.
Constant Summary collapse
- TERMINATE_WITH_STATUS =
[ # TODO: Write general description for SUSPENDED SUSPENDED = 'suspended'.freeze, # TODO: Write general description for CANCELED CANCELED = 'canceled'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SUSPENDED) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/univapay_client_sdk/models/terminate_with_status.rb', line 24 def self.from_value(value, default_value = SUSPENDED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'suspended' then SUSPENDED when 'canceled' then CANCELED else default_value end end |
.validate(value) ⇒ Object
18 19 20 21 22 |
# File 'lib/univapay_client_sdk/models/terminate_with_status.rb', line 18 def self.validate(value) return false if value.nil? TERMINATE_WITH_STATUS.include?(value) end |