Class: ThePlaidApi::VerificationStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::VerificationStatus
- Defined in:
- lib/the_plaid_api/models/verification_status.rb
Overview
The verification status. One of the following: ‘“VERIFIED”`: The information was successfully verified. `“UNVERIFIED”`: The verification has not yet been performed. `“NEEDS_INFO”`: The verification was attempted but could not be completed due to missing information. “`UNABLE_TO_VERIFY`”: The verification was performed and the information could not be verified. `“UNKNOWN”`: The verification status is unknown.
Constant Summary collapse
- VERIFICATION_STATUS =
[ # TODO: Write general description for VERIFIED VERIFIED = 'VERIFIED'.freeze, # TODO: Write general description for UNVERIFIED UNVERIFIED = 'UNVERIFIED'.freeze, # TODO: Write general description for NEEDS_INFO NEEDS_INFO = 'NEEDS_INFO'.freeze, # TODO: Write general description for UNABLE_TO_VERIFY UNABLE_TO_VERIFY = 'UNABLE_TO_VERIFY'.freeze, # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = VERIFIED) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/the_plaid_api/models/verification_status.rb', line 37 def self.from_value(value, default_value = VERIFIED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'verified' then VERIFIED when 'unverified' then UNVERIFIED when 'needs_info' then NEEDS_INFO when 'unable_to_verify' then UNABLE_TO_VERIFY when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
31 32 33 34 35 |
# File 'lib/the_plaid_api/models/verification_status.rb', line 31 def self.validate(value) return false if value.nil? VERIFICATION_STATUS.include?(value) end |