Class: Plaid::ProductDataType
- Inherits:
-
Object
- Object
- Plaid::ProductDataType
- Defined in:
- lib/plaid/models/product_data_type.rb
Overview
ProductDataType.
Constant Summary collapse
- PRODUCT_DATA_TYPE =
[ # TODO: Write general description for ACCOUNT_BALANCE ACCOUNT_BALANCE = 'ACCOUNT_BALANCE'.freeze, # TODO: Write general description for ACCOUNT_USER_INFO ACCOUNT_USER_INFO = 'ACCOUNT_USER_INFO'.freeze, # TODO: Write general description for ACCOUNT_TRANSACTIONS ACCOUNT_TRANSACTIONS = 'ACCOUNT_TRANSACTIONS'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACCOUNT_BALANCE) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/plaid/models/product_data_type.rb', line 26 def self.from_value(value, default_value = ACCOUNT_BALANCE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'account_balance' then ACCOUNT_BALANCE when 'account_user_info' then ACCOUNT_USER_INFO when 'account_transactions' then ACCOUNT_TRANSACTIONS else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/plaid/models/product_data_type.rb', line 20 def self.validate(value) return false if value.nil? true end |