Class: ThePlaidApi::IssuingCountry
- Inherits:
-
Object
- Object
- ThePlaidApi::IssuingCountry
- Defined in:
- lib/the_plaid_api/models/issuing_country.rb
Overview
A binary match indicator specifying whether the country that issued the provided document matches the country that the user separately provided to Plaid. Note: You can configure whether a ‘no_match` on `issuing_country` fails the `documentary_verification` by editing your Plaid Template.
Constant Summary collapse
- ISSUING_COUNTRY =
[ # TODO: Write general description for MATCH MATCH = 'match'.freeze, # TODO: Write general description for NO_MATCH NO_MATCH = 'no_match'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MATCH) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/the_plaid_api/models/issuing_country.rb', line 26 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 else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/the_plaid_api/models/issuing_country.rb', line 20 def self.validate(value) return false if value.nil? ISSUING_COUNTRY.include?(value) end |