Class: NewStoreApi::PosnetOnlinePrinterModelEnum
- Inherits:
-
Object
- Object
- NewStoreApi::PosnetOnlinePrinterModelEnum
- Defined in:
- lib/new_store_api/models/posnet_online_printer_model_enum.rb
Overview
Posnet printer model being used.
Constant Summary collapse
- POSNET_ONLINE_PRINTER_MODEL_ENUM =
[ # TODO: Write general description for POSNET_THERMAL_XL2_ONLINE POSNET_THERMAL_XL2_ONLINE = 'posnet_thermal_xl2_online'.freeze, # TODO: Write general description for POSNET_THERMAL_HD_ONLINE POSNET_THERMAL_HD_ONLINE = 'posnet_thermal_hd_online'.freeze, # TODO: Write general description for POSNET_TEMO_ONLINE POSNET_TEMO_ONLINE = 'posnet_temo_online'.freeze, # TODO: Write general description for POSNET_TRIO_ONLINE POSNET_TRIO_ONLINE = 'posnet_trio_online'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = POSNET_THERMAL_XL2_ONLINE) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/new_store_api/models/posnet_online_printer_model_enum.rb', line 29 def self.from_value(value, default_value = POSNET_THERMAL_XL2_ONLINE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'posnet_thermal_xl2_online' then POSNET_THERMAL_XL2_ONLINE when 'posnet_thermal_hd_online' then POSNET_THERMAL_HD_ONLINE when 'posnet_temo_online' then POSNET_TEMO_ONLINE when 'posnet_trio_online' then POSNET_TRIO_ONLINE else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/new_store_api/models/posnet_online_printer_model_enum.rb', line 23 def self.validate(value) return false if value.nil? POSNET_ONLINE_PRINTER_MODEL_ENUM.include?(value) end |