Class: Plaid::Products
- Inherits:
-
Object
- Object
- Plaid::Products
- Defined in:
- lib/plaid/models/products.rb
Overview
A list of products that an institution can support. All Items must be initialized with at least one product. The Balance product is always available and does not need to be specified during initialization.
Constant Summary collapse
- PRODUCTS =
[ # TODO: Write general description for ASSETS ASSETS = 'assets'.freeze, # TODO: Write general description for AUTH AUTH = 'auth'.freeze, # TODO: Write general description for BALANCE BALANCE = 'balance'.freeze, # TODO: Write general description for IDENTITY IDENTITY = 'identity'.freeze, # TODO: Write general description for INVESTMENTS INVESTMENTS = 'investments'.freeze, # TODO: Write general description for LIABILITIES LIABILITIES = 'liabilities'.freeze, # TODO: Write general description for PAYMENT_INITIATION PAYMENT_INITIATION = 'payment_initiation'.freeze, # TODO: Write general description for TRANSACTIONS TRANSACTIONS = 'transactions'.freeze, # TODO: Write general description for CREDIT_DETAILS CREDIT_DETAILS = 'credit_details'.freeze, # TODO: Write general description for INCOME INCOME = 'income'.freeze, # TODO: Write general description for INCOME_VERIFICATION INCOME_VERIFICATION = 'income_verification'.freeze, # TODO: Write general description for DEPOSIT_SWITCH DEPOSIT_SWITCH = 'deposit_switch'.freeze, # TODO: Write general description for STANDING_ORDERS STANDING_ORDERS = 'standing_orders'.freeze, # TODO: Write general description for TRANSFER TRANSFER = 'transfer'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ASSETS) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/plaid/models/products.rb', line 61 def self.from_value(value, default_value = ASSETS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'assets' then ASSETS when 'auth' then AUTH when 'balance' then BALANCE when 'identity' then IDENTITY when 'investments' then INVESTMENTS when 'liabilities' then LIABILITIES when 'payment_initiation' then PAYMENT_INITIATION when 'transactions' then TRANSACTIONS when 'credit_details' then CREDIT_DETAILS when 'income' then INCOME when 'income_verification' then INCOME_VERIFICATION when 'deposit_switch' then DEPOSIT_SWITCH when 'standing_orders' then STANDING_ORDERS when 'transfer' then TRANSFER else default_value end end |
.validate(value) ⇒ Object
55 56 57 58 59 |
# File 'lib/plaid/models/products.rb', line 55 def self.validate(value) return false if value.nil? true end |