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.



13074
13075
13076
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13074

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Class Method Details

.ALLObject



13094
13095
13096
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13094

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, AttributeIntent.barcode, AttributeIntent.min_days_to_ship, AttributeIntent.max_days_to_ship]
end

.apply(value) ⇒ Object

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



13079
13080
13081
13082
13083
13084
13085
13086
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13079

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

.barcodeObject

The barcode of this item.



13193
13194
13195
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13193

def AttributeIntent.barcode
  @@_barcode ||= AttributeIntent.new('barcode')
end

.brandObject

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



13099
13100
13101
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13099

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

.colorObject

The color of the item



13104
13105
13106
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13104

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

.consumer_urlObject

A URL of the product detail page of the item



13151
13152
13153
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13151

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



13109
13110
13111
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13109

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



13177
13178
13179
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13177

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

.facetObject

Identifies a facet.



13166
13167
13168
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13166

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



13089
13090
13091
13092
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13089

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



13120
13121
13122
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13120

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

.gtinObject

The Global Trade Item Number of this item.



13156
13157
13158
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13156

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

.hazardousObject

Identifies whether this item may contain hazardous materials



13125
13126
13127
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13125

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

.max_days_to_shipObject

Indicates a lead time to prepare an item for shipment. If specified, we will include this lead time in the delivery window calculation



13205
13206
13207
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13205

def AttributeIntent.max_days_to_ship
  @@_max_days_to_ship ||= AttributeIntent.new('max_days_to_ship')
end

.min_days_to_shipObject

Indicates a lead time to prepare an item for shipment. If specified, we will include this lead time in the delivery window calculation



13199
13200
13201
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13199

def AttributeIntent.min_days_to_ship
  @@_min_days_to_ship ||= AttributeIntent.new('min_days_to_ship')
end

.mpnObject

The Manufacturer Part Number of this item.



13161
13162
13163
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13161

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)



13131
13132
13133
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13131

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



13115
13116
13117
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13115

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.



13183
13184
13185
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13183

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

.searchableObject

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



13188
13189
13190
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13188

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

.sizeObject

A size label of the item



13136
13137
13138
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13136

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

.skuObject

An SKU for the item



13141
13142
13143
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13141

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

.taxabilityObject

Identifies whether taxes are applicable to an item



13146
13147
13148
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13146

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

Instance Method Details

#to_hashObject



13209
13210
13211
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13209

def to_hash
  value
end