Class: Io::Flow::V0::Models::FlowFieldName
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FlowFieldName
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of FlowFieldName for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of FlowFieldName for this value, or nil if not found.
-
.item_number ⇒ Object
The Flow catalog item number.
-
.product_id_attribute ⇒ Object
A Flow catalog attribute named ‘product_id’.
-
.sku_attribute ⇒ Object
A Flow catalog attribute named ‘sku’.
Instance Method Summary collapse
-
#initialize(value) ⇒ FlowFieldName
constructor
A new instance of FlowFieldName.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FlowFieldName
Returns a new instance of FlowFieldName.
14456 14457 14458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14456 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14454 14455 14456 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14454 def value @value end |
Class Method Details
.ALL ⇒ Object
14476 14477 14478 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14476 def FlowFieldName.ALL @@all ||= [FlowFieldName.item_number, FlowFieldName.sku_attribute, FlowFieldName.product_id_attribute] end |
.apply(value) ⇒ Object
Returns the instance of FlowFieldName for this value, creating a new instance for an unknown value
14461 14462 14463 14464 14465 14466 14467 14468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14461 def FlowFieldName.apply(value) if value.instance_of?(FlowFieldName) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FlowFieldName.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of FlowFieldName for this value, or nil if not found
14471 14472 14473 14474 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14471 def FlowFieldName.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FlowFieldName.ALL.find { |v| v.value == value } end |
.item_number ⇒ Object
The Flow catalog item number
14481 14482 14483 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14481 def FlowFieldName.item_number @@_item_number ||= FlowFieldName.new('item-number') end |
.product_id_attribute ⇒ Object
A Flow catalog attribute named ‘product_id’
14491 14492 14493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14491 def FlowFieldName.product_id_attribute @@_product_id_attribute ||= FlowFieldName.new('product_id-attribute') end |
.sku_attribute ⇒ Object
A Flow catalog attribute named ‘sku’
14486 14487 14488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14486 def FlowFieldName.sku_attribute @@_sku_attribute ||= FlowFieldName.new('sku-attribute') end |
Instance Method Details
#to_hash ⇒ Object
14495 14496 14497 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14495 def to_hash value end |