Class: ThePlaidApi::AamvaMatchResult
- Inherits:
-
Object
- Object
- ThePlaidApi::AamvaMatchResult
- Defined in:
- lib/the_plaid_api/models/aamva_match_result.rb
Overview
The outcome of checking the particular field against state databases. ‘match` - The field is an exact match with the state database. `no_match` - The field is not an exact match with the state database. `no_data` - The field was unable to be checked against state databases.
Constant Summary collapse
- AAMVA_MATCH_RESULT =
[ # TODO: Write general description for MATCH MATCH = 'match'.freeze, # TODO: Write general description for NO_MATCH NO_MATCH = 'no_match'.freeze, # TODO: Write general description for NO_DATA NO_DATA = 'no_data'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MATCH) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/aamva_match_result.rb', line 29 def self.from_value(value, default_value = MATCH) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'match' then MATCH when 'no_match' then NO_MATCH when 'no_data' then NO_DATA else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/aamva_match_result.rb', line 23 def self.validate(value) return false if value.nil? AAMVA_MATCH_RESULT.include?(value) end |