Class: UnivapayClientSdk::TransactionTokenPaymentType
- Inherits:
-
Object
- Object
- UnivapayClientSdk::TransactionTokenPaymentType
- Defined in:
- lib/univapay_client_sdk/models/transaction_token_payment_type.rb
Overview
Transaction Token Payment Type schema.
Constant Summary collapse
- TRANSACTION_TOKEN_PAYMENT_TYPE =
[ # TODO: Write general description for CARD CARD = 'card'.freeze, # TODO: Write general description for PAIDY PAIDY = 'paidy'.freeze, # TODO: Write general description for ONLINE ONLINE = 'online'.freeze, # TODO: Write general description for KONBINI KONBINI = 'konbini'.freeze, # TODO: Write general description for BANK_TRANSFER BANK_TRANSFER = 'bank_transfer'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CARD) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/univapay_client_sdk/models/transaction_token_payment_type.rb', line 32 def self.from_value(value, default_value = CARD) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'card' then CARD when 'paidy' then PAIDY when 'online' then ONLINE when 'konbini' then KONBINI when 'bank_transfer' then BANK_TRANSFER else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/univapay_client_sdk/models/transaction_token_payment_type.rb', line 26 def self.validate(value) return false if value.nil? TRANSACTION_TOKEN_PAYMENT_TYPE.include?(value) end |