Class: ThePlaidApi::CreditBankIncomeWarningCode
- Inherits:
-
Object
- Object
- ThePlaidApi::CreditBankIncomeWarningCode
- Defined in:
- lib/the_plaid_api/models/credit_bank_income_warning_code.rb
Overview
The warning code identifies a specific kind of warning. ‘IDENTITY_UNAVAILABLE`: Unable to extract identity for the Item `TRANSACTIONS_UNAVAILABLE`: Unable to extract transactions for the Item `ITEM_UNAPPROVED`: User exited flow before giving permission to share data for the Item `REPORT_DELETED`: Report deleted due to customer or consumer request `DATA_UNAVAILABLE`: No relevant data was found for the Item
Constant Summary collapse
- CREDIT_BANK_INCOME_WARNING_CODE =
[ # TODO: Write general description for IDENTITY_UNAVAILABLE IDENTITY_UNAVAILABLE = 'IDENTITY_UNAVAILABLE'.freeze, # TODO: Write general description for TRANSACTIONS_UNAVAILABLE TRANSACTIONS_UNAVAILABLE = 'TRANSACTIONS_UNAVAILABLE'.freeze, # TODO: Write general description for ITEM_UNAPPROVED ITEM_UNAPPROVED = 'ITEM_UNAPPROVED'.freeze, # TODO: Write general description for REPORT_DELETED REPORT_DELETED = 'REPORT_DELETED'.freeze, # TODO: Write general description for DATA_UNAVAILABLE DATA_UNAVAILABLE = 'DATA_UNAVAILABLE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = IDENTITY_UNAVAILABLE) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/credit_bank_income_warning_code.rb', line 37 def self.from_value(value, default_value = IDENTITY_UNAVAILABLE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'identity_unavailable' then IDENTITY_UNAVAILABLE when 'transactions_unavailable' then TRANSACTIONS_UNAVAILABLE when 'item_unapproved' then ITEM_UNAPPROVED when 'report_deleted' then REPORT_DELETED when 'data_unavailable' then DATA_UNAVAILABLE else default_value end end |
.validate(value) ⇒ Object
31 32 33 34 35 |
# File 'lib/the_plaid_api/models/credit_bank_income_warning_code.rb', line 31 def self.validate(value) return false if value.nil? CREDIT_BANK_INCOME_WARNING_CODE.include?(value) end |