Class: ThePlaidApi::Status1
- Inherits:
-
Object
- Object
- ThePlaidApi::Status1
- Defined in:
- lib/the_plaid_api/models/status1.rb
Overview
The status of the incident.
Constant Summary collapse
- STATUS1 =
[ # TODO: Write general description for INVESTIGATING INVESTIGATING = 'INVESTIGATING'.freeze, # TODO: Write general description for IDENTIFIED IDENTIFIED = 'IDENTIFIED'.freeze, # TODO: Write general description for SCHEDULED SCHEDULED = 'SCHEDULED'.freeze, # TODO: Write general description for RESOLVED RESOLVED = 'RESOLVED'.freeze, # TODO: Write general description for UNKNOWN UNKNOWN = 'UNKNOWN'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = INVESTIGATING) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/status1.rb', line 32 def self.from_value(value, default_value = INVESTIGATING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'investigating' then INVESTIGATING when 'identified' then IDENTIFIED when 'scheduled' then SCHEDULED when 'resolved' then RESOLVED when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/the_plaid_api/models/status1.rb', line 26 def self.validate(value) return false if value.nil? STATUS1.include?(value) end |