Google Cloud Recommendation Engine V1beta1 Client - Class ProductCatalogItem (0.7.4)

Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class ProductCatalogItem.

ProductCatalogItem captures item metadata specific to retail products.

Generated from protobuf message google.cloud.recommendationengine.v1beta1.ProductCatalogItem

Namespace

Google \ Cloud \ RecommendationEngine \ V1beta1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ exact_price Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\ExactPrice

Optional. The exact product price.

↳ price_range Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\PriceRange

Optional. The product price range.

↳ costs array|Google\Protobuf\Internal\MapField

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 string

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

↳ stock_state int

Optional. Online stock state of the catalog item. Default is IN_STOCK.

↳ available_quantity int|string

Optional. The available quantity of the item.

↳ canonical_product_uri string

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

↳ images array<Google\Cloud\RecommendationEngine\V1beta1\Image>

Optional. Product images for the catalog item.

getExactPrice

Optional. The exact product price.

Returns
Type Description
Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\ExactPrice|null

hasExactPrice

setExactPrice

Optional. The exact product price.

Parameter
Name Description
var Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\ExactPrice
Returns
Type Description
$this

getPriceRange

Optional. The product price range.

Returns
Type Description
Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\PriceRange|null

hasPriceRange

setPriceRange

Optional. The product price range.

Parameter
Name Description
var Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\PriceRange
Returns
Type Description
$this

getCosts

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
Type Description
Google\Protobuf\Internal\MapField

setCosts

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)
Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getCurrencyCode

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

Returns
Type Description
string

setCurrencyCode

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

Parameter
Name Description
var string
Returns
Type Description
$this

getStockState

Optional. Online stock state of the catalog item. Default is IN_STOCK.

Returns
Type Description
int

setStockState

Optional. Online stock state of the catalog item. Default is IN_STOCK.

Parameter
Name Description
var int
Returns
Type Description
$this

getAvailableQuantity

Optional. The available quantity of the item.

Returns
Type Description
int|string

setAvailableQuantity

Optional. The available quantity of the item.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getCanonicalProductUri

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

Generated from protobuf field string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
string

setCanonicalProductUri

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

Generated from protobuf field string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
var string
Returns
Type Description
$this

getImages

Optional. Product images for the catalog item.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setImages

Optional. Product images for the catalog item.

Parameter
Name Description
var array<Google\Cloud\RecommendationEngine\V1beta1\Image>
Returns
Type Description
$this

getPrice

Returns
Type Description
string