Class: ThePlaidApi::CreditBankIncomeErrorType
- Inherits:
-
Object
- Object
- ThePlaidApi::CreditBankIncomeErrorType
- Defined in:
- lib/the_plaid_api/models/credit_bank_income_error_type.rb
Overview
A broad categorization of the error. Safe for programmatic use.
Constant Summary collapse
- CREDIT_BANK_INCOME_ERROR_TYPE =
[ # TODO: Write general description for INTERNAL_SERVER_ERROR INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'.freeze, # TODO: Write general description for INSUFFICIENT_CREDENTIALS INSUFFICIENT_CREDENTIALS = 'INSUFFICIENT_CREDENTIALS'.freeze, # TODO: Write general description for ITEM_LOCKED ITEM_LOCKED = 'ITEM_LOCKED'.freeze, # TODO: Write general description for USER_SETUP_REQUIRED USER_SETUP_REQUIRED = 'USER_SETUP_REQUIRED'.freeze, # TODO: Write general description for COUNTRY_NOT_SUPPORTED COUNTRY_NOT_SUPPORTED = 'COUNTRY_NOT_SUPPORTED'.freeze, # TODO: Write general description for INSTITUTION_DOWN INSTITUTION_DOWN = 'INSTITUTION_DOWN'.freeze, # TODO: Write general description for INSTITUTION_NO_LONGER_SUPPORTED INSTITUTION_NO_LONGER_SUPPORTED = 'INSTITUTION_NO_LONGER_SUPPORTED'.freeze, # TODO: Write general description for INSTITUTION_NOT_RESPONDING INSTITUTION_NOT_RESPONDING = 'INSTITUTION_NOT_RESPONDING'.freeze, # TODO: Write general description for INVALID_CREDENTIALS INVALID_CREDENTIALS = 'INVALID_CREDENTIALS'.freeze, # TODO: Write general description for INVALID_MFA INVALID_MFA = 'INVALID_MFA'.freeze, # TODO: Write general description for INVALID_SEND_METHOD INVALID_SEND_METHOD = 'INVALID_SEND_METHOD'.freeze, # TODO: Write general description for ITEM_LOGIN_REQUIRED ITEM_LOGIN_REQUIRED = 'ITEM_LOGIN_REQUIRED'.freeze, # TODO: Write general description for MFA_NOT_SUPPORTED MFA_NOT_SUPPORTED = 'MFA_NOT_SUPPORTED'.freeze, # TODO: Write general description for NO_ACCOUNTS NO_ACCOUNTS = 'NO_ACCOUNTS'.freeze, # TODO: Write general description for ITEM_NOT_SUPPORTED ITEM_NOT_SUPPORTED = 'ITEM_NOT_SUPPORTED'.freeze, # TODO: Write general description for ACCESS_NOT_GRANTED ACCESS_NOT_GRANTED = 'ACCESS_NOT_GRANTED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = INTERNAL_SERVER_ERROR) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/the_plaid_api/models/credit_bank_income_error_type.rb', line 65 def self.from_value(value, default_value = INTERNAL_SERVER_ERROR) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'internal_server_error' then INTERNAL_SERVER_ERROR when 'insufficient_credentials' then INSUFFICIENT_CREDENTIALS when 'item_locked' then ITEM_LOCKED when 'user_setup_required' then USER_SETUP_REQUIRED when 'country_not_supported' then COUNTRY_NOT_SUPPORTED when 'institution_down' then INSTITUTION_DOWN when 'institution_no_longer_supported' then INSTITUTION_NO_LONGER_SUPPORTED when 'institution_not_responding' then INSTITUTION_NOT_RESPONDING when 'invalid_credentials' then INVALID_CREDENTIALS when 'invalid_mfa' then INVALID_MFA when 'invalid_send_method' then INVALID_SEND_METHOD when 'item_login_required' then ITEM_LOGIN_REQUIRED when 'mfa_not_supported' then MFA_NOT_SUPPORTED when 'no_accounts' then NO_ACCOUNTS when 'item_not_supported' then ITEM_NOT_SUPPORTED when 'access_not_granted' then ACCESS_NOT_GRANTED else default_value end end |
.validate(value) ⇒ Object
59 60 61 62 63 |
# File 'lib/the_plaid_api/models/credit_bank_income_error_type.rb', line 59 def self.validate(value) return false if value.nil? CREDIT_BANK_INCOME_ERROR_TYPE.include?(value) end |