Class: ThePlaidApi::ConsumerReportPermissiblePurpose

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

Overview

Describes the reason you are generating a Consumer Report for this user. When calling ‘/link/token/create`, this field is required when using Plaid Check (CRA) products; invalid if not using Plaid Check (CRA) products. `ACCOUNT_REVIEW_CREDIT`: In connection with a consumer credit transaction for the review or collection of an account pursuant to FCRA Section 604(a)(3)(A). `ACCOUNT_REVIEW_NON_CREDIT`: For a legitimate business need of the information to review a non-credit account provided primarily for personal, family, or household purposes to determine whether the consumer continues to meet the terms of the account pursuant to FCRA Section 604(a)(3)(F)(2). `EXTENSION_OF_CREDIT`: In connection with a credit transaction initiated by and involving the consumer pursuant to FCRA Section 604(a)(3)(A). `LEGITIMATE_BUSINESS_NEED_TENANT_SCREENING`: For a legitimate business need in connection with a business transaction initiated by the consumer primarily for personal, family, or household purposes in connection with a property rental assessment pursuant to FCRA Section 604(a)(3)(F)(i). `LEGITIMATE_BUSINESS_NEED_OTHER`: For a legitimate business need in connection with a business transaction made primarily for personal, family, or household initiated by the consumer pursuant to FCRA Section 604(a)(3)(F)(i). `WRITTEN_INSTRUCTION_PREQUALIFICATION`: In accordance with the written instructions of the consumer pursuant to FCRA Section 604(a)(2), to evaluate an application’s profile to make an offer to the consumer. `WRITTEN_INSTRUCTION_OTHER`: In accordance with the written instructions of the consumer pursuant to FCRA Section 604(a)(2), such as when an individual agrees to act as a guarantor or assumes personal liability for a consumer, business, or commercial loan. `ELIGIBILITY_FOR_GOVT_BENEFITS`: In connection with an eligibility determination for a government benefit where the entity is required to consider an applicant’s financial status pursuant to FCRA Section 604(a)(3)(D).

Constant Summary collapse

CONSUMER_REPORT_PERMISSIBLE_PURPOSE =
[
  # TODO: Write general description for ACCOUNT_REVIEW_CREDIT
  ACCOUNT_REVIEW_CREDIT = 'ACCOUNT_REVIEW_CREDIT'.freeze,

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

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

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

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

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

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

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

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ACCOUNT_REVIEW_CREDIT) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/the_plaid_api/models/consumer_report_permissible_purpose.rb', line 69

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

  str = value.to_s.strip

  case str.downcase
  when 'account_review_credit' then ACCOUNT_REVIEW_CREDIT
  when 'account_review_non_credit' then ACCOUNT_REVIEW_NON_CREDIT
  when 'extension_of_credit' then EXTENSION_OF_CREDIT
  when 'legitimate_business_need_tenant_screening' then LEGITIMATE_BUSINESS_NEED_TENANT_SCREENING
  when 'legitimate_business_need_other' then LEGITIMATE_BUSINESS_NEED_OTHER
  when 'written_instruction_prequalification' then WRITTEN_INSTRUCTION_PREQUALIFICATION
  when 'written_instruction_other' then WRITTEN_INSTRUCTION_OTHER
  when 'eligibility_for_govt_benefits' then ELIGIBILITY_FOR_GOVT_BENEFITS
  else
    default_value
  end
end

.validate(value) ⇒ Object



63
64
65
66
67
# File 'lib/the_plaid_api/models/consumer_report_permissible_purpose.rb', line 63

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

  CONSUMER_REPORT_PERMISSIBLE_PURPOSE.include?(value)
end