Class: ThePlaidApi::DocumentNameMatchCode
- Inherits:
-
Object
- Object
- ThePlaidApi::DocumentNameMatchCode
- Defined in:
- lib/the_plaid_api/models/document_name_match_code.rb
Overview
A match summary describing the cross comparison between the subject’s name, extracted from the document image, and the name they separately provided to identity verification attempt.
Constant Summary collapse
- DOCUMENT_NAME_MATCH_CODE =
[ # TODO: Write general description for MATCH MATCH = 'match'.freeze, # TODO: Write general description for PARTIAL_MATCH PARTIAL_MATCH = 'partial_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
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/document_name_match_code.rb', line 31 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 'partial_match' then PARTIAL_MATCH when 'no_match' then NO_MATCH when 'no_data' then NO_DATA else default_value end end |
.validate(value) ⇒ Object
25 26 27 28 29 |
# File 'lib/the_plaid_api/models/document_name_match_code.rb', line 25 def self.validate(value) return false if value.nil? DOCUMENT_NAME_MATCH_CODE.include?(value) end |