Class: ThePlaidApi::WeakAliasDetermination
- Inherits:
-
Object
- Object
- ThePlaidApi::WeakAliasDetermination
- Defined in:
- lib/the_plaid_api/models/weak_alias_determination.rb
Overview
Names that are explicitly marked as low quality either by their ‘source` list, or by `plaid` by a series of additional checks done by Plaid. Plaid does not ever surface a hit as a result of a weak name alone. If a name has no quality issues, this value will be `none`.
Constant Summary collapse
- WEAK_ALIAS_DETERMINATION =
[ # TODO: Write general description for NONE NONE = 'none'.freeze, # TODO: Write general description for SOURCE SOURCE = 'source'.freeze, # TODO: Write general description for PLAID PLAID = 'plaid'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = NONE) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/weak_alias_determination.rb', line 29 def self.from_value(value, default_value = NONE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'none' then NONE when 'source' then SOURCE when 'plaid' then PLAID else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/weak_alias_determination.rb', line 23 def self.validate(value) return false if value.nil? WEAK_ALIAS_DETERMINATION.include?(value) end |