Class: ThePlaidApi::WalletTransactionStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::WalletTransactionStatus
- Defined in:
- lib/the_plaid_api/models/wallet_transaction_status.rb
Overview
The status of the transaction. ‘AUTHORISING`: The transaction is being processed for validation and compliance. `INITIATED`: The transaction has been initiated and is currently being processed. `EXECUTED`: The transaction has been successfully executed and is considered complete. This is only applicable for debit transactions. `SETTLED`: The transaction has settled and funds are available for use. This is only applicable for credit transactions. A transaction will typically settle within seconds to several days, depending on which payment rail is used. `FAILED`: The transaction failed to process successfully. This is a terminal status. `BLOCKED`: The transaction has been blocked for violating compliance rules. This is a terminal status.
Constant Summary collapse
- WALLET_TRANSACTION_STATUS =
[ # TODO: Write general description for AUTHORISING AUTHORISING = 'AUTHORISING'.freeze, # TODO: Write general description for INITIATED INITIATED = 'INITIATED'.freeze, # TODO: Write general description for EXECUTED EXECUTED = 'EXECUTED'.freeze, # TODO: Write general description for SETTLED SETTLED = 'SETTLED'.freeze, # TODO: Write general description for BLOCKED BLOCKED = 'BLOCKED'.freeze, # TODO: Write general description for FAILED FAILED = 'FAILED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = AUTHORISING) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/the_plaid_api/models/wallet_transaction_status.rb', line 45 def self.from_value(value, default_value = AUTHORISING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'authorising' then AUTHORISING when 'initiated' then INITIATED when 'executed' then EXECUTED when 'settled' then SETTLED when 'blocked' then BLOCKED when 'failed' then FAILED else default_value end end |
.validate(value) ⇒ Object
39 40 41 42 43 |
# File 'lib/the_plaid_api/models/wallet_transaction_status.rb', line 39 def self.validate(value) return false if value.nil? WALLET_TRANSACTION_STATUS.include?(value) end |