Class: ThePlaidApi::BaseReportWarningCode
- Inherits:
-
Object
- Object
- ThePlaidApi::BaseReportWarningCode
- Defined in:
- lib/the_plaid_api/models/base_report_warning_code.rb
Overview
The warning code identifies a specific kind of warning. ‘IDENTITY_UNAVAILABLE`: Account-owner information is not available. `TRANSACTIONS_UNAVAILABLE`: Transactions information associated with Credit and Depository accounts are unavailable. `USER_FRAUD_ALERT`: The User has placed a fraud alert on their Plaid Check consumer report due to suspected fraud. Note: when a fraud alert is in place, the recipient of the consumer report has an obligation to verify the consumer’s identity.
Constant Summary collapse
- BASE_REPORT_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 USER_FRAUD_ALERT USER_FRAUD_ALERT = 'USER_FRAUD_ALERT'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = IDENTITY_UNAVAILABLE) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/base_report_warning_code.rb', line 32 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 'user_fraud_alert' then USER_FRAUD_ALERT else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/the_plaid_api/models/base_report_warning_code.rb', line 26 def self.validate(value) return false if value.nil? BASE_REPORT_WARNING_CODE.include?(value) end |