Google Cloud Retail V2 Client - Class Promotion (2.0.0-RC1)

Reference documentation and code samples for the Google Cloud Retail V2 Client class Promotion.

Promotion information.

Generated from protobuf message google.cloud.retail.v2.Promotion

Namespace

Google \ Cloud \ Retail \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ promotion_id string

ID of the promotion. For example, "free gift". The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property promotion_id.

getPromotionId

ID of the promotion. For example, "free gift".

The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property promotion_id.

Returns
Type Description
string

setPromotionId

ID of the promotion. For example, "free gift".

The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: [a-zA-Z][a-zA-Z0-9_]*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property promotion_id.

Parameter
Name Description
var string
Returns
Type Description
$this