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.



12354
12355
12356
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12354

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



12352
12353
12354
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12352

def value
  @value
end

Class Method Details

.ALLObject



12374
12375
12376
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12374

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

.apply(value) ⇒ Object

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



12359
12360
12361
12362
12363
12364
12365
12366
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12359

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)



12379
12380
12381
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12379

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

.colorObject

The color of the item



12384
12385
12386
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12384

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

.consumer_urlObject

A URL of the product detail page of the item



12431
12432
12433
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12431

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



12389
12390
12391
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12389

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



12457
12458
12459
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12457

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

.facetObject

Identifies a facet.



12446
12447
12448
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12446

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



12369
12370
12371
12372
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12369

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



12400
12401
12402
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12400

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

.gtinObject

The Global Trade Item Number of this item.



12436
12437
12438
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12436

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

.hazardousObject

Identifies whether this item may contain hazardous materials



12405
12406
12407
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12405

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

.mpnObject

The Manufacturer Part Number of this item.



12441
12442
12443
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12441

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)



12411
12412
12413
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12411

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



12395
12396
12397
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12395

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

.sizeObject

A size label of the item



12416
12417
12418
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12416

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

.skuObject

An SKU for the item



12421
12422
12423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12421

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

.taxabilityObject

Identifies whether taxes are applicable to an item



12426
12427
12428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12426

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

Instance Method Details

#to_hashObject



12461
12462
12463
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12461

def to_hash
  value
end