Class: UnivapayClientSdk::TransactionTokenListType
- Inherits:
-
Object
- Object
- UnivapayClientSdk::TransactionTokenListType
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_list_type.rb
Overview
Filterable token types for token listings. one_time tokens cannot be
filtered on and are excluded from this enum.
Constant Summary collapse
- TRANSACTION_TOKEN_LIST_TYPE =
[ # TODO: Write general description for SUBSCRIPTION SUBSCRIPTION = 'subscription'.freeze, # TODO: Write general description for RECURRING RECURRING = 'recurring'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SUBSCRIPTION) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_type.rb', line 24 def self.from_value(value, default_value = SUBSCRIPTION) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'subscription' then SUBSCRIPTION when 'recurring' then RECURRING else default_value end end |
.validate(value) ⇒ Object
18 19 20 21 22 |
# File 'lib/univapay_client_sdk/models/transaction_token_list_type.rb', line 18 def self.validate(value) return false if value.nil? TRANSACTION_TOKEN_LIST_TYPE.include?(value) end |