Class: ThePlaidApi::PrismInsightsVersion
- Inherits:
-
Object
- Object
- ThePlaidApi::PrismInsightsVersion
- Defined in:
- lib/the_plaid_api/models/prism_insights_version.rb
Overview
The version of Prism Insights. If not specified, will default to v3.
Constant Summary collapse
- PRISM_INSIGHTS_VERSION =
[ # TODO: Write general description for ENUM_41 ENUM_41 = 0, # TODO: Write general description for ENUM_4 ENUM_4 = 4, # TODO: Write general description for ENUM_3 ENUM_3 = 3 ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ENUM_41) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/the_plaid_api/models/prism_insights_version.rb', line 26 def self.from_value(value, default_value = ENUM_41) return default_value if value.nil? str = value.to_s.strip if str.match?(/\A\d+\z/) num = str.to_i return num if PRISM_INSIGHTS_VERSION.include?(num) return default_value end case str.downcase when 'enum_41' then ENUM_41 when 'enum_4' then ENUM_4 when 'enum_3' then ENUM_3 else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/the_plaid_api/models/prism_insights_version.rb', line 20 def self.validate(value) return false if value.nil? PRISM_INSIGHTS_VERSION.include?(value) end |