# Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem (v0.18.0)

0.18.0 (latest) 0.17.1 0.16.0 0.15.1 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.2 0.8.2 0.7.0 0.6.1 0.5.0 0.4.1 0.3.7 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

    def available_quantity() -> ::Integer

**Returns**

- (::Integer) --- Optional. The available quantity of the item.

### #available_quantity=

    def available_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

    def canonical_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=

    def canonical_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..

### #costs

    def costs() -> ::Google::Protobuf::Map{::String => ::Float}

**Returns**

- (::Google::Protobuf::Map{::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)

### #costs=

    def costs=(value) -> ::Google::Protobuf::Map{::String => ::Float}

**Parameter**

- **value** (::Google::Protobuf::Map{::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)
**Returns**

- (::Google::Protobuf::Map{::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)

### #currency_code

    def currency_code() -> ::String

**Returns**

- (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.

### #currency_code=

    def currency_code=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.
**Returns**

- (::String) --- Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.

### #exact_price

    def exact_price() -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice

**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.


  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.

### #exact_price=

    def exact_price=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice

**Parameter**

- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.


  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.
**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::ExactPrice](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-ExactPrice)) --- Optional. The exact product price.


  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.

### #images

    def images() -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::Image>

**Returns**

- (::Array\<[::Google::Cloud::RecommendationEngine::V1beta1::Image](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-Image)\>) --- Optional. Product images for the catalog item.

### #images=

    def images=(value) -> ::Array<::Google::Cloud::RecommendationEngine::V1beta1::Image>

**Parameter**

- **value** (::Array\<[::Google::Cloud::RecommendationEngine::V1beta1::Image](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-Image)\>) --- Optional. Product images for the catalog item.
**Returns**

- (::Array\<[::Google::Cloud::RecommendationEngine::V1beta1::Image](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-Image)\>) --- Optional. Product images for the catalog item.

### #price_range

    def price_range() -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange

**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.


  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.

### #price_range=

    def price_range=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange

**Parameter**

- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.


  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.
**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::PriceRange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-PriceRange)) --- Optional. The product price range.


  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.

### #stock_state

    def stock_state() -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState

**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`.

### #stock_state=

    def stock_state=(value) -> ::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState

**Parameter**

- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
**Returns**

- ([::Google::Cloud::RecommendationEngine::V1beta1::ProductCatalogItem::StockState](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-ProductCatalogItem-StockState)) --- Optional. Online stock state of the catalog item. Default is `IN_STOCK`.