Class: ThePlaidApi::TransferIntentStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::TransferIntentStatus
- Defined in:
- lib/the_plaid_api/models/transfer_intent_status.rb
Overview
The status of the transfer intent. ‘PENDING`: The transfer intent is pending. `SUCCEEDED`: The transfer intent was successfully created. `FAILED`: The transfer intent was unable to be created.
Constant Summary collapse
- TRANSFER_INTENT_STATUS =
[ # TODO: Write general description for PENDING PENDING = 'PENDING'.freeze, # TODO: Write general description for SUCCEEDED SUCCEEDED = 'SUCCEEDED'.freeze, # TODO: Write general description for FAILED FAILED = 'FAILED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PENDING) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/the_plaid_api/models/transfer_intent_status.rb', line 28 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 'succeeded' then SUCCEEDED when 'failed' then FAILED else default_value end end |
.validate(value) ⇒ Object
22 23 24 25 26 |
# File 'lib/the_plaid_api/models/transfer_intent_status.rb', line 22 def self.validate(value) return false if value.nil? TRANSFER_INTENT_STATUS.include?(value) end |