Class: ThePlaidApi::WalletStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::WalletStatus
- Defined in:
- lib/the_plaid_api/models/wallet_status.rb
Overview
The status of the wallet. ‘UNKNOWN`: The wallet status is unknown. `ACTIVE`: The wallet is active and ready to send money to and receive money from. `CLOSED`: The wallet is closed. Any transactions made to or from this wallet will error.
Constant Summary collapse
- WALLET_STATUS =
[ # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze, # TODO: Write general description for ACTIVE ACTIVE = 'ACTIVE'.freeze, # TODO: Write general description for CLOSED CLOSED = 'CLOSED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = UNKNOWN) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/wallet_status.rb', line 29 def self.from_value(value, default_value = UNKNOWN) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'unknown' then UNKNOWN when 'active' then ACTIVE when 'closed' then CLOSED else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/wallet_status.rb', line 23 def self.validate(value) return false if value.nil? WALLET_STATUS.include?(value) end |