Class: ThePlaidApi::IdentityVerificationStatus

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

Overview

The status of this Identity Verification attempt. ‘active` - The Identity Verification attempt is incomplete. The user may have completed part of the session, but has neither failed or passed. `success` - The Identity Verification attempt has completed, passing all steps defined to the associated Identity Verification template `failed` - The user failed one or more steps in the session and was told to contact support. `expired` - The Identity Verification attempt was active for a long period of time without being completed and was automatically marked as expired. Note that sessions currently do not expire. Automatic expiration is expected to be enabled in the future. `canceled` - The Identity Verification attempt was canceled, either via the dashboard by a user, or via API. The user may have completed part of the session, but has neither failed or passed. `pending_review` - The Identity Verification attempt template was configured to perform a screening that had one or more hits needing review.

Constant Summary collapse

IDENTITY_VERIFICATION_STATUS =
[
  # TODO: Write general description for ACTIVE
  ACTIVE = 'active'.freeze,

  # TODO: Write general description for SUCCESS
  SUCCESS = 'success'.freeze,

  # TODO: Write general description for FAILED
  FAILED = 'failed'.freeze,

  # TODO: Write general description for EXPIRED
  EXPIRED = 'expired'.freeze,

  # TODO: Write general description for CANCELED
  CANCELED = 'canceled'.freeze,

  # TODO: Write general description for PENDING_REVIEW
  PENDING_REVIEW = 'pending_review'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ACTIVE) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/the_plaid_api/models/identity_verification_status.rb', line 48

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

  str = value.to_s.strip

  case str.downcase
  when 'active' then ACTIVE
  when 'success' then SUCCESS
  when 'failed' then FAILED
  when 'expired' then EXPIRED
  when 'canceled' then CANCELED
  when 'pending_review' then PENDING_REVIEW
  else
    default_value
  end
end

.validate(value) ⇒ Object



42
43
44
45
46
# File 'lib/the_plaid_api/models/identity_verification_status.rb', line 42

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

  IDENTITY_VERIFICATION_STATUS.include?(value)
end