Class: Plaid::Confidence
- Inherits:
-
Object
- Object
- Plaid::Confidence
- Defined in:
- lib/plaid/models/confidence.rb
Overview
The confidence that Plaid can support the user in the income verification flow. One of the following: ‘“HIGH”`: This precheck information submitted is definitively tied to a Plaid-supported integration. “`LOW`”: This precheck information submitted is known not to be supported by Plaid. `“UNKNOWN”`: It was not possible to determine if the user is supportable with the information passed.
Constant Summary collapse
- CONFIDENCE =
[ # TODO: Write general description for HIGH HIGH = 'HIGH'.freeze, # TODO: Write general description for LOW LOW = 'LOW'.freeze, # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = HIGH) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/plaid/models/confidence.rb', line 31 def self.from_value(value, default_value = HIGH) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'high' then HIGH when 'low' then LOW when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
25 26 27 28 29 |
# File 'lib/plaid/models/confidence.rb', line 25 def self.validate(value) return false if value.nil? true end |