class Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItem

ProductCatalogItem captures item metadata specific to retail products.

Attributes

available_quantity[RW]

Optional. The available quantity of the item. Corresponds to the JSON property `availableQuantity` @return [Fixnum]

canonical_product_uri[RW]

Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB.. Corresponds to the JSON property `canonicalProductUri` @return [String]

costs[RW]

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` @return [Hash<String,Float>]

currency_code[RW]

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` @return [String]

exact_price[RW]

Exact product price. Corresponds to the JSON property `exactPrice` @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice]

images[RW]

Optional. Product images for the catalog item. Corresponds to the JSON property `images` @return [Array<Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1Image>]

price_range[RW]

Product price range when there are a range of prices for different variations of the same product. Corresponds to the JSON property `priceRange` @return [Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange]

stock_state[RW]

Optional. Online stock state of the catalog item. Default is `IN_STOCK`. Corresponds to the JSON property `stockState` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/recommendationengine_v1beta1/classes.rb, line 1213
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/recommendationengine_v1beta1/classes.rb, line 1218
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