Class: ThePlaidApi::VerificationStatus4

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

Overview

The current verification status of an Auth Item initiated through Automated or Manual micro-deposits. Returned for Auth Items only. ‘pending_automatic_verification`: The Item is pending automatic verification `pending_manual_verification`: The Item is pending manual micro-deposit verification. Items remain in this state until the user successfully verifies the micro-deposit. `automatically_verified`: The Item has successfully been automatically verified `manually_verified`: The Item has successfully been manually verified `verification_expired`: Plaid was unable to automatically verify the deposit within 7 calendar days and will no longer attempt to validate the Item. Users may retry by submitting their information again through Link. `verification_failed`: The Item failed manual micro-deposit verification because the user exhausted all 3 verification attempts. Users may retry by submitting their information again through Link. `database_matched`: The Item has successfully been verified using Plaid’s data sources. Note: Database Match is currently a beta feature, please contact your account manager for more information.

Constant Summary collapse

VERIFICATION_STATUS4 =
[
  # TODO: Write general description for AUTOMATICALLY_VERIFIED
  AUTOMATICALLY_VERIFIED = 'automatically_verified'.freeze,

  # TODO: Write general description for PENDING_AUTOMATIC_VERIFICATION
  PENDING_AUTOMATIC_VERIFICATION = 'pending_automatic_verification'.freeze,

  # TODO: Write general description for PENDING_MANUAL_VERIFICATION
  PENDING_MANUAL_VERIFICATION = 'pending_manual_verification'.freeze,

  # TODO: Write general description for MANUALLY_VERIFIED
  MANUALLY_VERIFIED = 'manually_verified'.freeze,

  # TODO: Write general description for VERIFICATION_EXPIRED
  VERIFICATION_EXPIRED = 'verification_expired'.freeze,

  # TODO: Write general description for VERIFICATION_FAILED
  VERIFICATION_FAILED = 'verification_failed'.freeze,

  # TODO: Write general description for DATABASE_MATCHED
  DATABASE_MATCHED = 'database_matched'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = AUTOMATICALLY_VERIFIED) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/the_plaid_api/models/verification_status4.rb', line 53

def self.from_value(value, default_value = AUTOMATICALLY_VERIFIED)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'automatically_verified' then AUTOMATICALLY_VERIFIED
  when 'pending_automatic_verification' then PENDING_AUTOMATIC_VERIFICATION
  when 'pending_manual_verification' then PENDING_MANUAL_VERIFICATION
  when 'manually_verified' then MANUALLY_VERIFIED
  when 'verification_expired' then VERIFICATION_EXPIRED
  when 'verification_failed' then VERIFICATION_FAILED
  when 'database_matched' then DATABASE_MATCHED
  else
    default_value
  end
end

.validate(value) ⇒ Object



47
48
49
50
51
# File 'lib/the_plaid_api/models/verification_status4.rb', line 47

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

  VERIFICATION_STATUS4.include?(value)
end