Class: UnivapayClientSdk::TransactionTokenActiveFilter
- Inherits:
-
Object
- Object
- UnivapayClientSdk::TransactionTokenActiveFilter
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_active_filter.rb
Overview
Filter recurring tokens by active status.
Constant Summary collapse
- TRANSACTION_TOKEN_ACTIVE_FILTER =
[ # TODO: Write general description for ACTIVE ACTIVE = 'active'.freeze, # TODO: Write general description for INACTIVE INACTIVE = 'inactive'.freeze, # TODO: Write general description for ALL ALL = 'all'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACTIVE) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/univapay_client_sdk/models/transaction_token_active_filter.rb', line 26 def self.from_value(value, default_value = ACTIVE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'active' then ACTIVE when 'inactive' then INACTIVE when 'all' then ALL else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/univapay_client_sdk/models/transaction_token_active_filter.rb', line 20 def self.validate(value) return false if value.nil? TRANSACTION_TOKEN_ACTIVE_FILTER.include?(value) end |