Reference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem.
ProductCatalogItem captures item metadata specific to retail products.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#available_quantity
defavailable_quantity()->::Integer
Returns
(::Integer) — Optional. The available quantity of the item.
#available_quantity=
defavailable_quantity=(value)->::Integer
Parameter
value (::Integer) — Optional. The available quantity of the item.
Returns
(::Integer) — Optional. The available quantity of the item.
#canonical_product_uri
defcanonical_product_uri()->::String
Returns
(::String) — Optional. Canonical URL directly linking to the item detail page with a
length limit of 5 KiB..
#canonical_product_uri=
defcanonical_product_uri=(value)->::String
Parameter
value (::String) — Optional. Canonical URL directly linking to the item detail page with a
length limit of 5 KiB..
Returns
(::String) — Optional. Canonical URL directly linking to the item detail page with a
length limit of 5 KiB..
Note: The following fields are mutually exclusive: exact_price, price_range. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: exact_price, price_range. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: exact_price, price_range. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: price_range, exact_price. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: price_range, exact_price. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: price_range, exact_price. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem (v0.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.0 (latest)](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.12.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.12.1/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.11.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.11.0/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.10.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.10.0/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.9.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.9.2/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.8.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.8.2/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.7.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.7.0/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.6.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.6.1/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.5.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.5.0/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.4.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.4.1/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem)\n- [0.3.7](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.3.7/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem) \nReference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem.\n\nProductCatalogItem captures item metadata specific to retail products. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #available_quantity\n\n def available_quantity() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Optional. The available quantity of the item.\n\n### #available_quantity=\n\n def available_quantity=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Optional. The available quantity of the item. \n**Returns**\n\n- (::Integer) --- Optional. The available quantity of the item.\n\n### #canonical_product_uri\n\n def canonical_product_uri() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..\n\n### #canonical_product_uri=\n\n def canonical_product_uri=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB.. \n**Returns**\n\n- (::String) --- Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..\n\n### #costs\n\n def costs() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Float}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Float}) --- Optional. A map to pass the costs associated with the product.\n\n For example:\n {\"manufacturing\": 45.5} The profit of selling this item is computed like\n so:\n - If 'exactPrice' is provided, profit = displayPrice - sum(costs)\n - If 'priceRange' is provided, profit = minPrice - sum(costs)\n\n### #costs=\n\n def costs=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::Float}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::Float}) ---\n\n Optional. A map to pass the costs associated with the product.\n\n For example:\n {\"manufacturing\": 45.5} The profit of selling this item is computed like\n so:\n - If 'exactPrice' is provided, profit = displayPrice - sum(costs)\n- If 'priceRange' is provided, profit = minPrice - sum(costs) \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Float}) --- Optional. A map to pass the costs associated with the product.\n\n For example:\n {\"manufacturing\": 45.5} The profit of selling this item is computed like\n so:\n - If 'exactPrice' is provided, profit = displayPrice - sum(costs)\n - If 'priceRange' is provided, profit = minPrice - sum(costs)\n\n### #currency_code\n\n def currency_code() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.\n\n### #currency_code=\n\n def currency_code=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code. \n**Returns**\n\n- (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.\n\n### #exact_price\n\n def exact_price() -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice\n\n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.\n\n\n Note: The following fields are mutually exclusive: `exact_price`, `price_range`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #exact_price=\n\n def exact_price=(value) -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice\n\n**Parameter**\n\n- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.\n\n\nNote: The following fields are mutually exclusive: `exact_price`, `price_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.\n\n\n Note: The following fields are mutually exclusive: `exact_price`, `price_range`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #images\n\n def images() -\u003e ::Array\u003c::Google::Cloud::RecommendationEngine::V1beta1::Image\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::RecommendationEngine::V1beta1::Image](./Google-Cloud-RecommendationEngine-V1beta1-Image)\\\u003e) --- Optional. Product images for the catalog item.\n\n### #images=\n\n def images=(value) -\u003e ::Array\u003c::Google::Cloud::RecommendationEngine::V1beta1::Image\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::RecommendationEngine::V1beta1::Image](./Google-Cloud-RecommendationEngine-V1beta1-Image)\\\u003e) --- Optional. Product images for the catalog item. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::RecommendationEngine::V1beta1::Image](./Google-Cloud-RecommendationEngine-V1beta1-Image)\\\u003e) --- Optional. Product images for the catalog item.\n\n### #price_range\n\n def price_range() -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange\n\n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.\n\n\n Note: The following fields are mutually exclusive: `price_range`, `exact_price`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #price_range=\n\n def price_range=(value) -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange\n\n**Parameter**\n\n- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.\n\n\nNote: The following fields are mutually exclusive: `price_range`, `exact_price`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.\n\n\n Note: The following fields are mutually exclusive: `price_range`, `exact_price`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #stock_state\n\n def stock_state() -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState\n\n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`.\n\n### #stock_state=\n\n def stock_state=(value) -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState\n\n**Parameter**\n\n- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`. \n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](./Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`."]]