Class: MistApi::OrgE911ReportStatusEnum
- Inherits:
-
Object
- Object
- MistApi::OrgE911ReportStatusEnum
- Defined in:
- lib/mist_api/models/org_e911_report_status_enum.rb
Overview
Current status of E911 report generation. enum: ‘disabled`, `scheduled`, `available`
Constant Summary collapse
- ORG_E911_REPORT_STATUS_ENUM =
[ # TODO: Write general description for DISABLED DISABLED = 'disabled'.freeze, # TODO: Write general description for SCHEDULED SCHEDULED = 'scheduled'.freeze, # TODO: Write general description for AVAILABLE AVAILABLE = 'available'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = DISABLED) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/mist_api/models/org_e911_report_status_enum.rb', line 27 def self.from_value(value, default_value = DISABLED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'disabled' then DISABLED when 'scheduled' then SCHEDULED when 'available' then AVAILABLE else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/mist_api/models/org_e911_report_status_enum.rb', line 21 def self.validate(value) return false if value.nil? ORG_E911_REPORT_STATUS_ENUM.include?(value) end |