Class: ThePlaidApi::BankTransferDirection
- Inherits:
-
Object
- Object
- ThePlaidApi::BankTransferDirection
- Defined in:
- lib/the_plaid_api/models/bank_transfer_direction.rb
Overview
Indicates the direction of the transfer: ‘outbound` for API-initiated transfers, or `inbound` for payments received by the FBO account.
Constant Summary collapse
- BANK_TRANSFER_DIRECTION =
[ # TODO: Write general description for OUTBOUND OUTBOUND = 'outbound'.freeze, # TODO: Write general description for INBOUND INBOUND = 'inbound'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = OUTBOUND) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/the_plaid_api/models/bank_transfer_direction.rb', line 24 def self.from_value(value, default_value = OUTBOUND) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'outbound' then OUTBOUND when 'inbound' then INBOUND else default_value end end |
.validate(value) ⇒ Object
18 19 20 21 22 |
# File 'lib/the_plaid_api/models/bank_transfer_direction.rb', line 18 def self.validate(value) return false if value.nil? BANK_TRANSFER_DIRECTION.include?(value) end |