class Io::Flow::V0::Models::InventoryStatus
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21661 def InventoryStatus.ALL @@all ||= [InventoryStatus.has_inventory, InventoryStatus.no_inventory] end
apply(value)
click to toggle source
Returns the instance of InventoryStatus
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 21646 def InventoryStatus.apply(value) if value.instance_of?(InventoryStatus) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || InventoryStatus.new(value)) end end
from_string(value)
click to toggle source
Returns the instance of InventoryStatus
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 21656 def InventoryStatus.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) InventoryStatus.ALL.find { |v| v.value == value } end
has_inventory()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21665 def InventoryStatus.has_inventory @@_has_inventory ||= InventoryStatus.new('has_inventory') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21641 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
no_inventory()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21669 def InventoryStatus.no_inventory @@_no_inventory ||= InventoryStatus.new('no_inventory') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21673 def to_hash value end