Class: ThePlaidApi::IncomeVerificationPrecheckConfidence

Inherits:
Object
  • Object
show all
Defined in:
lib/the_plaid_api/models/income_verification_precheck_confidence.rb

Overview

The confidence that Plaid can support the user in the digital income verification flow instead of requiring a manual paystub upload. One of the following: ‘“HIGH”`: It is very likely that this user can use the digital income verification flow. “`LOW`”: It is unlikely that this user can use the digital income verification flow. `“UNKNOWN”`: It was not possible to determine if the user is supportable with the information passed.

Constant Summary collapse

INCOME_VERIFICATION_PRECHECK_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/the_plaid_api/models/income_verification_precheck_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/the_plaid_api/models/income_verification_precheck_confidence.rb', line 25

def self.validate(value)
  return false if value.nil?

  INCOME_VERIFICATION_PRECHECK_CONFIDENCE.include?(value)
end