Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItem

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/recommendationengine_v1beta1/classes.rb,
generated/google/apis/recommendationengine_v1beta1/representations.rb,
generated/google/apis/recommendationengine_v1beta1/representations.rb

Overview

ProductCatalogItem captures item metadata specific to retail products.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1ProductCatalogItem

Returns a new instance of GoogleCloudRecommendationengineV1beta1ProductCatalogItem.



1205
1206
1207
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1205

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#available_quantityFixnum

Optional. The available quantity of the item. Corresponds to the JSON property availableQuantity

Returns:

  • (Fixnum)


1162
1163
1164
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1162

def available_quantity
  @available_quantity
end

#canonical_product_uriString

Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB.. Corresponds to the JSON property canonicalProductUri

Returns:

  • (String)


1168
1169
1170
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1168

def canonical_product_uri
  @canonical_product_uri
end

#costsHash<String,Float>

Optional. A map to pass the costs associated with the product. For example: " manufacturing": 45.5 The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If ' priceRange' is provided, profit = minPrice - sum(costs) Corresponds to the JSON property costs

Returns:

  • (Hash<String,Float>)


1176
1177
1178
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1176

def costs
  @costs
end

#currency_codeString

Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code. Corresponds to the JSON property currencyCode

Returns:

  • (String)


1182
1183
1184
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1182

def currency_code
  @currency_code
end

#exact_priceGoogle::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice

Exact product price. Corresponds to the JSON property exactPrice



1187
1188
1189
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1187

def exact_price
  @exact_price
end

#imagesArray<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Image>

Optional. Product images for the catalog item. Corresponds to the JSON property images



1192
1193
1194
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1192

def images
  @images
end

#price_rangeGoogle::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange

Product price range when there are a range of prices for different variations of the same product. Corresponds to the JSON property priceRange



1198
1199
1200
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1198

def price_range
  @price_range
end

#stock_stateString

Optional. Online stock state of the catalog item. Default is IN_STOCK. Corresponds to the JSON property stockState

Returns:

  • (String)


1203
1204
1205
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1203

def stock_state
  @stock_state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'generated/google/apis/recommendationengine_v1beta1/classes.rb', line 1210

def update!(**args)
  @available_quantity = args[:available_quantity] if args.key?(:available_quantity)
  @canonical_product_uri = args[:canonical_product_uri] if args.key?(:canonical_product_uri)
  @costs = args[:costs] if args.key?(:costs)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @exact_price = args[:exact_price] if args.key?(:exact_price)
  @images = args[:images] if args.key?(:images)
  @price_range = args[:price_range] if args.key?(:price_range)
  @stock_state = args[:stock_state] if args.key?(:stock_state)
end