Class: Io::Flow::V0::Models::AttributeIntent
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AttributeIntent
- 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 AttributeIntent for this value, creating a new instance for an unknown value.
-
.brand ⇒ Object
A brand name of the item (for retailers that sell multiple brands).
-
.color ⇒ Object
The color of the item.
-
.consumer_url ⇒ Object
A URL of the product detail page of the item.
-
.countries_of_origin ⇒ Object
A space separate list of the countries of origin for this item.
-
.from_string(value) ⇒ Object
Returns the instance of AttributeIntent for this value, or nil if not found.
-
.fulfillment_method ⇒ Object
Identifies whether the item is a physical or digital good.
-
.gtin ⇒ Object
The Global Trade Item Number of this item.
-
.hazardous ⇒ Object
Identifies whether this item may contain hazardous materials.
-
.mpn ⇒ Object
The Manufacturer Part Number of this item.
-
.price ⇒ Object
A price for the item in the organization’s base currency (will be localized based on each Experience’s pricing policy).
-
.product_id ⇒ Object
An identifier used to group items that are variations of the same product, such as different sizes or colors of the same shirt.
-
.size ⇒ Object
A size label of the item.
-
.sku ⇒ Object
An SKU for the item.
-
.taxability ⇒ Object
Identifies whether taxes are applicable to an item.
Instance Method Summary collapse
-
#initialize(value) ⇒ AttributeIntent
constructor
A new instance of AttributeIntent.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ AttributeIntent
Returns a new instance of AttributeIntent.
9902 9903 9904 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9902 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
9900 9901 9902 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9900 def value @value end |
Class Method Details
.ALL ⇒ Object
9922 9923 9924 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9922 def AttributeIntent.ALL @@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn] end |
.apply(value) ⇒ Object
Returns the instance of AttributeIntent for this value, creating a new instance for an unknown value
9907 9908 9909 9910 9911 9912 9913 9914 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9907 def AttributeIntent.apply(value) if value.instance_of?(AttributeIntent) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || AttributeIntent.new(value)) end end |
.brand ⇒ Object
A brand name of the item (for retailers that sell multiple brands)
9927 9928 9929 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9927 def AttributeIntent.brand @@_brand ||= AttributeIntent.new('brand') end |
.color ⇒ Object
The color of the item
9932 9933 9934 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9932 def AttributeIntent.color @@_color ||= AttributeIntent.new('color') end |
.consumer_url ⇒ Object
A URL of the product detail page of the item
9979 9980 9981 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9979 def AttributeIntent.consumer_url @@_consumer_url ||= AttributeIntent.new('consumer_url') end |
.countries_of_origin ⇒ Object
A space separate list of the countries of origin for this item
9937 9938 9939 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9937 def AttributeIntent.countries_of_origin @@_countries_of_origin ||= AttributeIntent.new('countries_of_origin') end |
.from_string(value) ⇒ Object
Returns the instance of AttributeIntent for this value, or nil if not found
9917 9918 9919 9920 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9917 def AttributeIntent.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) AttributeIntent.ALL.find { |v| v.value == value } end |
.fulfillment_method ⇒ Object
Identifies whether the item is a physical or digital good
9948 9949 9950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9948 def AttributeIntent.fulfillment_method @@_fulfillment_method ||= AttributeIntent.new('fulfillment_method') end |
.gtin ⇒ Object
The Global Trade Item Number of this item.
9984 9985 9986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9984 def AttributeIntent.gtin @@_gtin ||= AttributeIntent.new('gtin') end |
.hazardous ⇒ Object
Identifies whether this item may contain hazardous materials
9953 9954 9955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9953 def AttributeIntent.hazardous @@_hazardous ||= AttributeIntent.new('hazardous') end |
.mpn ⇒ Object
The Manufacturer Part Number of this item.
9989 9990 9991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9989 def AttributeIntent.mpn @@_mpn ||= AttributeIntent.new('mpn') end |
.price ⇒ Object
A price for the item in the organization’s base currency (will be localized based on each Experience’s pricing policy)
9959 9960 9961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9959 def AttributeIntent.price @@_price ||= AttributeIntent.new('price') end |
.product_id ⇒ Object
An identifier used to group items that are variations of the same product, such as different sizes or colors of the same shirt
9943 9944 9945 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9943 def AttributeIntent.product_id @@_product_id ||= AttributeIntent.new('product_id') end |
.size ⇒ Object
A size label of the item
9964 9965 9966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9964 def AttributeIntent.size @@_size ||= AttributeIntent.new('size') end |
.sku ⇒ Object
An SKU for the item
9969 9970 9971 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9969 def AttributeIntent.sku @@_sku ||= AttributeIntent.new('sku') end |
.taxability ⇒ Object
Identifies whether taxes are applicable to an item
9974 9975 9976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9974 def AttributeIntent.taxability @@_taxability ||= AttributeIntent.new('taxability') end |
Instance Method Details
#to_hash ⇒ Object
9993 9994 9995 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9993 def to_hash value end |