Google Cloud Recommendation Engine V1beta1 Client - Class ProductCatalogItem (0.6.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
NameDescription
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
TypeDescription
Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\ExactPrice|null

hasExactPrice

setExactPrice

Optional. The exact product price.

Parameter
NameDescription
var Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\ExactPrice
Returns
TypeDescription
$this

getPriceRange

Optional. The product price range.

Returns
TypeDescription
Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\PriceRange|null

hasPriceRange

setPriceRange

Optional. The product price range.

Parameter
NameDescription
var Google\Cloud\RecommendationEngine\V1beta1\ProductCatalogItem\PriceRange
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getCurrencyCode

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

Returns
TypeDescription
string

setCurrencyCode

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStockState

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

Returns
TypeDescription
int

setStockState

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAvailableQuantity

Optional. The available quantity of the item.

Returns
TypeDescription
int|string

setAvailableQuantity

Optional. The available quantity of the item.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getImages

Optional. Product images for the catalog item.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setImages

Optional. Product images for the catalog item.

Parameter
NameDescription
var array<Google\Cloud\RecommendationEngine\V1beta1\Image>
Returns
TypeDescription
$this

getPrice

Returns
TypeDescription
string