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.



12713
12714
12715
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12713

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12711
12712
12713
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12711

def value
  @value
end

Class Method Details

.ALLObject



12733
12734
12735
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12733

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]
end

.apply(value) ⇒ Object

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



12718
12719
12720
12721
12722
12723
12724
12725
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12718

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)



12738
12739
12740
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12738

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

.colorObject

The color of the item



12743
12744
12745
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12743

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

.consumer_urlObject

A URL of the product detail page of the item



12790
12791
12792
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12790

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



12748
12749
12750
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12748

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



12816
12817
12818
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12816

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

.facetObject

Identifies a facet.



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

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



12728
12729
12730
12731
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12728

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



12759
12760
12761
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12759

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

.gtinObject

The Global Trade Item Number of this item.



12795
12796
12797
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12795

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

.hazardousObject

Identifies whether this item may contain hazardous materials



12764
12765
12766
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12764

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

.mpnObject

The Manufacturer Part Number of this item.



12800
12801
12802
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12800

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)



12770
12771
12772
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12770

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



12754
12755
12756
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12754

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.



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

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

.sizeObject

A size label of the item



12775
12776
12777
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12775

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

.skuObject

An SKU for the item



12780
12781
12782
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12780

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

.taxabilityObject

Identifies whether taxes are applicable to an item



12785
12786
12787
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12785

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

Instance Method Details

#to_hashObject



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

def to_hash
  value
end