Class: ThePlaidApi::DocType
- Inherits:
-
Object
- Object
- ThePlaidApi::DocType
- Defined in:
- lib/the_plaid_api/models/doc_type.rb
Overview
The type of document. ‘DOCUMENT_TYPE_PAYSTUB`: A paystub. `DOCUMENT_TYPE_BANK_STATEMENT`: A bank statement. `DOCUMENT_TYPE_US_TAX_W2`: A W-2 wage and tax statement provided by a US employer reflecting wages earned by the employee. `DOCUMENT_TYPE_US_MILITARY_ERAS`: An electronic Retirement Account Statement (eRAS) issued by the US military. `DOCUMENT_TYPE_US_MILITARY_LES`: A Leave and Earnings Statement (LES) issued by the US military. `DOCUMENT_TYPE_US_MILITARY_CLES`: A Civilian Leave and Earnings Statement (CLES) issued by the US military. `DOCUMENT_TYPE_GIG`: Used to indicate that the income is related to gig work. Does not necessarily correspond to a specific document type. `DOCUMENT_TYPE_NONE`: Used to indicate that there is no underlying document for the data. `DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF`: Used to indicate that the PDF for the paystub was generated by Plaid. `UNKNOWN`: Document type could not be determined.
Constant Summary collapse
- DOC_TYPE =
[ # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze, # TODO: Write general description for DOCUMENT_TYPE_PAYSTUB DOCUMENT_TYPE_PAYSTUB = 'DOCUMENT_TYPE_PAYSTUB'.freeze, # TODO: Write general description for DOCUMENT_TYPE_BANK_STATEMENT DOCUMENT_TYPE_BANK_STATEMENT = 'DOCUMENT_TYPE_BANK_STATEMENT'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_TAX_W2 DOCUMENT_TYPE_US_TAX_W2 = 'DOCUMENT_TYPE_US_TAX_W2'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_MILITARY_ERAS DOCUMENT_TYPE_US_MILITARY_ERAS = 'DOCUMENT_TYPE_US_MILITARY_ERAS'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_MILITARY_LES DOCUMENT_TYPE_US_MILITARY_LES = 'DOCUMENT_TYPE_US_MILITARY_LES'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_MILITARY_CLES DOCUMENT_TYPE_US_MILITARY_CLES = 'DOCUMENT_TYPE_US_MILITARY_CLES'.freeze, # TODO: Write general description for DOCUMENT_TYPE_GIG DOCUMENT_TYPE_GIG = 'DOCUMENT_TYPE_GIG'.freeze, # TODO: Write general description for DOCUMENT_TYPE_NONE DOCUMENT_TYPE_NONE = 'DOCUMENT_TYPE_NONE'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_TAX_1099_MISC DOCUMENT_TYPE_US_TAX_1099_MISC = 'DOCUMENT_TYPE_US_TAX_1099_MISC'.freeze, # TODO: Write general description for DOCUMENT_TYPE_US_TAX_1099_K DOCUMENT_TYPE_US_TAX_1099_K = 'DOCUMENT_TYPE_US_TAX_1099_K'.freeze, # TODO: Write general description for # DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF = 'DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = UNKNOWN) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/the_plaid_api/models/doc_type.rb', line 67 def self.from_value(value, default_value = UNKNOWN) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'unknown' then UNKNOWN when 'document_type_paystub' then DOCUMENT_TYPE_PAYSTUB when 'document_type_bank_statement' then DOCUMENT_TYPE_BANK_STATEMENT when 'document_type_us_tax_w2' then DOCUMENT_TYPE_US_TAX_W2 when 'document_type_us_military_eras' then DOCUMENT_TYPE_US_MILITARY_ERAS when 'document_type_us_military_les' then DOCUMENT_TYPE_US_MILITARY_LES when 'document_type_us_military_cles' then DOCUMENT_TYPE_US_MILITARY_CLES when 'document_type_gig' then DOCUMENT_TYPE_GIG when 'document_type_none' then DOCUMENT_TYPE_NONE when 'document_type_us_tax_1099_misc' then DOCUMENT_TYPE_US_TAX_1099_MISC when 'document_type_us_tax_1099_k' then DOCUMENT_TYPE_US_TAX_1099_K when 'document_type_plaid_generated_paystub_pdf' then DOCUMENT_TYPE_PLAID_GENERATED_PAYSTUB_PDF else default_value end end |
.validate(value) ⇒ Object
61 62 63 64 65 |
# File 'lib/the_plaid_api/models/doc_type.rb', line 61 def self.validate(value) return false if value.nil? DOC_TYPE.include?(value) end |