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.



12963
12964
12965
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12963

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12961
12962
12963
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12961

def value
  @value
end

Class Method Details

.ALLObject



12983
12984
12985
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12983

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



12968
12969
12970
12971
12972
12973
12974
12975
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12968

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)



12988
12989
12990
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12988

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

.colorObject

The color of the item



12993
12994
12995
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12993

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

.consumer_urlObject

A URL of the product detail page of the item



13040
13041
13042
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13040

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



12998
12999
13000
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12998

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).



13066
13067
13068
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13066

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

.facetObject

Identifies a facet.



13055
13056
13057
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13055

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



12978
12979
12980
12981
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12978

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



13009
13010
13011
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13009

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

.gtinObject

The Global Trade Item Number of this item.



13045
13046
13047
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13045

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

.hazardousObject

Identifies whether this item may contain hazardous materials



13014
13015
13016
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13014

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

.mpnObject

The Manufacturer Part Number of this item.



13050
13051
13052
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13050

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)



13020
13021
13022
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13020

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



13004
13005
13006
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13004

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.



13072
13073
13074
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13072

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

.searchableObject

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



13077
13078
13079
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13077

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

.sizeObject

A size label of the item



13025
13026
13027
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13025

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

.skuObject

An SKU for the item



13030
13031
13032
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13030

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

.taxabilityObject

Identifies whether taxes are applicable to an item



13035
13036
13037
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13035

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

Instance Method Details

#to_hashObject



13081
13082
13083
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13081

def to_hash
  value
end