Class: WalmartApIs::ProcessingStatus1
- Inherits:
-
Object
- Object
- WalmartApIs::ProcessingStatus1
- Defined in:
- lib/walmart_ap_is/models/processing_status1.rb
Overview
Current processing status of the feed
Constant Summary collapse
- PROCESSING_STATUS1 =
[ # TODO: Write general description for RECEIVED RECEIVED = 'RECEIVED'.freeze, # TODO: Write general description for IN_PROGRESS IN_PROGRESS = 'IN_PROGRESS'.freeze, # TODO: Write general description for DONE DONE = 'DONE'.freeze, # TODO: Write general description for ERROR ERROR = 'ERROR'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = RECEIVED) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/walmart_ap_is/models/processing_status1.rb', line 29 def self.from_value(value, default_value = RECEIVED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'received' then RECEIVED when 'in_progress' then IN_PROGRESS when 'done' then DONE when 'error' then ERROR else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/walmart_ap_is/models/processing_status1.rb', line 23 def self.validate(value) return false if value.nil? PROCESSING_STATUS1.include?(value) end |