class Io::Flow::V0::Models::ItemIdentifier
Attributes
value[R]
Public Class Methods
ALL()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21798 def ItemIdentifier.ALL @@all ||= [ItemIdentifier.item_number, ItemIdentifier.sku] end
apply(value)
click to toggle source
Returns the instance of ItemIdentifier
for this value, creating a new instance for an unknown value
# File lib/flow_commerce/flow_api_v0_client.rb, line 21783 def ItemIdentifier.apply(value) if value.instance_of?(ItemIdentifier) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ItemIdentifier.new(value)) end end
from_string(value)
click to toggle source
Returns the instance of ItemIdentifier
for this value, or nil if not found
# File lib/flow_commerce/flow_api_v0_client.rb, line 21793 def ItemIdentifier.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ItemIdentifier.ALL.find { |v| v.value == value } end
item_number()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21802 def ItemIdentifier.item_number @@_item_number ||= ItemIdentifier.new('item_number') end
new(value)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21778 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end
sku()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21806 def ItemIdentifier.sku @@_sku ||= ItemIdentifier.new('sku') end
Public Instance Methods
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 21810 def to_hash value end