Class: Io::Flow::V0::Models::AttributeIntent

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ AttributeIntent

Returns a new instance of AttributeIntent.



12807
12808
12809
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12807

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12805
12806
12807
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12805

def value
  @value
end

Class Method Details

.ALLObject



12827
12828
12829
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12827

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, AttributeIntent.facet, AttributeIntent.eccn, AttributeIntent.returnable, AttributeIntent.searchable]
end

.apply(value) ⇒ Object

Returns the instance of AttributeIntent for this value, creating a new instance for an unknown value



12812
12813
12814
12815
12816
12817
12818
12819
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12812

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

.brandObject

A brand name of the item (for retailers that sell multiple brands)



12832
12833
12834
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12832

def AttributeIntent.brand
  @@_brand ||= AttributeIntent.new('brand')
end

.colorObject

The color of the item



12837
12838
12839
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12837

def AttributeIntent.color
  @@_color ||= AttributeIntent.new('color')
end

.consumer_urlObject

A URL of the product detail page of the item



12884
12885
12886
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12884

def AttributeIntent.consumer_url
  @@_consumer_url ||= AttributeIntent.new('consumer_url')
end

.countries_of_originObject

A space separated list of the countries of origin for this item



12842
12843
12844
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12842

def AttributeIntent.countries_of_origin
  @@_countries_of_origin ||= AttributeIntent.new('countries_of_origin')
end

.eccnObject

An Export Control Classification Number (ECCN) is a five-character alphanumeric key used in the Commerce Control List (CCL) to classify U.S. exports and determine whether an export license is needed from the Department of Commerce. If exempt, then EAR99 is used as the item’s ECCN. EAR99 is a classification that indicates that an item is subject to the Export Administration Regulations (EAR), but not listed with a specific Export Control Classification Number (ECCN) on the Commerce Control List (CCL).



12910
12911
12912
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12910

def AttributeIntent.eccn
  @@_eccn ||= AttributeIntent.new('eccn')
end

.facetObject

Identifies a facet.



12899
12900
12901
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12899

def AttributeIntent.facet
  @@_facet ||= AttributeIntent.new('facet')
end

.from_string(value) ⇒ Object

Returns the instance of AttributeIntent for this value, or nil if not found



12822
12823
12824
12825
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12822

def AttributeIntent.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  AttributeIntent.ALL.find { |v| v.value == value }
end

.fulfillment_methodObject

Identifies whether the item is a physical or digital good



12853
12854
12855
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12853

def AttributeIntent.fulfillment_method
  @@_fulfillment_method ||= AttributeIntent.new('fulfillment_method')
end

.gtinObject

The Global Trade Item Number of this item.



12889
12890
12891
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12889

def AttributeIntent.gtin
  @@_gtin ||= AttributeIntent.new('gtin')
end

.hazardousObject

Identifies whether this item may contain hazardous materials



12858
12859
12860
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12858

def AttributeIntent.hazardous
  @@_hazardous ||= AttributeIntent.new('hazardous')
end

.mpnObject

The Manufacturer Part Number of this item.



12894
12895
12896
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12894

def AttributeIntent.mpn
  @@_mpn ||= AttributeIntent.new('mpn')
end

.priceObject

A price for the item in the organization’s base currency (will be localized based on each Experience’s pricing policy)



12864
12865
12866
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12864

def AttributeIntent.price
  @@_price ||= AttributeIntent.new('price')
end

.product_idObject

An identifier used to group items that are variations of the same product, such as different sizes or colors of the same shirt



12848
12849
12850
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12848

def AttributeIntent.product_id
  @@_product_id ||= AttributeIntent.new('product_id')
end

.returnableObject

Identifies whether the item can be returned. If not present on an item, it is assumed to be returnable.



12916
12917
12918
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12916

def AttributeIntent.returnable
  @@_returnable ||= AttributeIntent.new('returnable')
end

.searchableObject

Identifies whether the attribute can be used to search for an item.



12921
12922
12923
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12921

def AttributeIntent.searchable
  @@_searchable ||= AttributeIntent.new('searchable')
end

.sizeObject

A size label of the item



12869
12870
12871
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12869

def AttributeIntent.size
  @@_size ||= AttributeIntent.new('size')
end

.skuObject

An SKU for the item



12874
12875
12876
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12874

def AttributeIntent.sku
  @@_sku ||= AttributeIntent.new('sku')
end

.taxabilityObject

Identifies whether taxes are applicable to an item



12879
12880
12881
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12879

def AttributeIntent.taxability
  @@_taxability ||= AttributeIntent.new('taxability')
end

Instance Method Details

#to_hashObject



12925
12926
12927
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12925

def to_hash
  value
end