Class: UnivapayClientSdk::TransactionHistoryStatus
- Inherits:
-
Object
- Object
- UnivapayClientSdk::TransactionHistoryStatus
- Defined in:
- lib/univapay_client_sdk/models/transaction_history_status.rb
Overview
Status of the underlying resource. Charge rows use the full set of values;
refund rows only ever report pending, successful, failed, or error.
Constant Summary collapse
- TRANSACTION_HISTORY_STATUS =
[ # TODO: Write general description for PENDING PENDING = 'pending'.freeze, # TODO: Write general description for AUTHORIZED AUTHORIZED = 'authorized'.freeze, # TODO: Write general description for SUCCESSFUL SUCCESSFUL = 'successful'.freeze, # TODO: Write general description for FAILED FAILED = 'failed'.freeze, # TODO: Write general description for ERROR ERROR = 'error'.freeze, # TODO: Write general description for CANCELED CANCELED = 'canceled'.freeze, # TODO: Write general description for AWAITING AWAITING = 'awaiting'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PENDING) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/univapay_client_sdk/models/transaction_history_status.rb', line 39 def self.from_value(value, default_value = PENDING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'pending' then PENDING when 'authorized' then AUTHORIZED when 'successful' then SUCCESSFUL when 'failed' then FAILED when 'error' then ERROR when 'canceled' then CANCELED when 'awaiting' then AWAITING else default_value end end |
.validate(value) ⇒ Object
33 34 35 36 37 |
# File 'lib/univapay_client_sdk/models/transaction_history_status.rb', line 33 def self.validate(value) return false if value.nil? TRANSACTION_HISTORY_STATUS.include?(value) end |