Class: ThePlaidApi::LoanIdentifierType
- Inherits:
-
Object
- Object
- ThePlaidApi::LoanIdentifierType
- Defined in:
- lib/the_plaid_api/models/loan_identifier_type.rb
Overview
A value from a MISMO prescribed list that specifies the type of loan identifier.
Constant Summary collapse
- LOAN_IDENTIFIER_TYPE =
[ # TODO: Write general description for LENDERLOAN LENDERLOAN = 'LenderLoan'.freeze, # TODO: Write general description for UNIVERSALLOAN UNIVERSALLOAN = 'UniversalLoan'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = LENDERLOAN) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/the_plaid_api/models/loan_identifier_type.rb', line 24 def self.from_value(value, default_value = LENDERLOAN) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'lenderloan' then LENDERLOAN when 'universalloan' then UNIVERSALLOAN else default_value end end |
.validate(value) ⇒ Object
18 19 20 21 22 |
# File 'lib/the_plaid_api/models/loan_identifier_type.rb', line 18 def self.validate(value) return false if value.nil? LOAN_IDENTIFIER_TYPE.include?(value) end |