Reference documentation and code samples for the Google Shopping Merchant Promotions V1beta Client class Attributes.
Attributes.
Generated from protobuf message google.shopping.merchant.promotions.v1beta.Attributes
Namespace
Google \ Shopping \ Merchant \ Promotions \ V1betaMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ product_applicability |
int
Required. Applicability of the promotion to either all products or only specific products. |
↳ offer_type |
int
Required. Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion. |
↳ generic_redemption_code |
string
Optional. Generic redemption code for the promotion. To be used with the |
↳ long_title |
string
Required. Long title for the promotion. |
↳ coupon_value_type |
int
Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required. |
↳ promotion_destinations |
array
Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default. You may have previously submitted the following values as destinations for your products: Shopping Actions, Surfaces across Google, Local surfaces across Google. To represent these values use |
↳ item_id_inclusion |
array
Optional. Product filter by item ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ brand_inclusion |
array
Optional. Product filter by brand for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ item_group_id_inclusion |
array
Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products. |
↳ product_type_inclusion |
array
Optional. Product filter by product type for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ item_id_exclusion |
array
Optional. Product filter by item ID exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ brand_exclusion |
array
Optional. Product filter by brand exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ item_group_id_exclusion |
array
Optional. Product filter by item group ID. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ product_type_exclusion |
array
Optional. Product filter by product type exclusion for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability |
↳ minimum_purchase_amount |
Google\Shopping\Type\Price
Optional. Minimum purchase amount for the promotion. |
↳ minimum_purchase_quantity |
int|string
Optional. Minimum purchase quantity for the promotion. |
↳ limit_quantity |
int|string
Optional. Maximum purchase quantity for the promotion. |
↳ limit_value |
Google\Shopping\Type\Price
Optional. Maximum product price for promotion. |
↳ percent_off |
int|string
Optional. The percentage discount offered in the promotion. |
↳ money_off_amount |
Google\Shopping\Type\Price
Optional. The money off amount offered in the promotion. |
↳ get_this_quantity_discounted |
int|string
Optional. The number of items discounted in the promotion. The attribute is set when |
↳ free_gift_value |
Google\Shopping\Type\Price
Optional. Free gift value for the promotion. |
↳ free_gift_description |
string
Optional. Free gift description for the promotion. |
↳ free_gift_item_id |
string
Optional. Free gift item ID for the promotion. |
↳ promotion_effective_time_period |
Google\Type\Interval
Required. |
↳ promotion_display_time_period |
Google\Type\Interval
Optional. |
↳ store_applicability |
int
Optional. Whether the promotion applies to all stores, or only specified stores. Local Inventory ads promotions throw an error if no store applicability is included. An |
↳ store_codes_inclusion |
array
Optional. Store codes to include for the promotion. The store filter attributes only applies when the |
↳ store_codes_exclusion |
array
Optional. Store codes to exclude for the promotion. The store filter attributes only applies when the |
↳ promotion_url |
string
Optional. URL to the page on the merchant's site where the promotion shows. Local Inventory ads promotions throw an error if no |
getProductApplicability
Required. Applicability of the promotion to either all products or only specific products.
Returns | |
---|---|
Type | Description |
int |
setProductApplicability
Required. Applicability of the promotion to either all products or only specific products.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getOfferType
Required.
Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.
Returns | |
---|---|
Type | Description |
int |
setOfferType
Required.
Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getGenericRedemptionCode
Optional. Generic redemption code for the promotion. To be used with the
offerType
field and must meet the minimum
requirements.
Returns | |
---|---|
Type | Description |
string |
setGenericRedemptionCode
Optional. Generic redemption code for the promotion. To be used with the
offerType
field and must meet the minimum
requirements.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getLongTitle
Required. Long title for the promotion.
Returns | |
---|---|
Type | Description |
string |
setLongTitle
Required. Long title for the promotion.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCouponValueType
Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.
Returns | |
---|---|
Type | Description |
int |
setCouponValueType
Required. The coupon value type attribute to signal the type of promotion that you are running. Depending on type of the selected coupon value some attributes are required.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getPromotionDestinations
Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.
You may have previously submitted the following values as destinations for
your products: Shopping Actions, Surfaces across Google, Local surfaces
across Google. To represent these values use FREE_LISTINGS
,
FREE_LOCAL_LISTINGS
, LOCAL_INVENTORY_ADS
. For more details see
Promotion
destination
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setPromotionDestinations
Required. The list of destinations where the promotion applies to. If you don't specify a destination by including a supported value in your data source, your promotion will display in Shopping ads and free listings by default.
You may have previously submitted the following values as destinations for
your products: Shopping Actions, Surfaces across Google, Local surfaces
across Google. To represent these values use FREE_LISTINGS
,
FREE_LOCAL_LISTINGS
, LOCAL_INVENTORY_ADS
. For more details see
Promotion
destination
Parameter | |
---|---|
Name | Description |
var |
int[]
|
Returns | |
---|---|
Type | Description |
$this |
getItemIdInclusion
Optional. Product filter by item
ID
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setItemIdInclusion
Optional. Product filter by item
ID
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getBrandInclusion
Optional. Product filter by brand for the promotion. The product filter
attributes only applies when the products eligible for promotion product
applicability product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setBrandInclusion
Optional. Product filter by brand for the promotion. The product filter
attributes only applies when the products eligible for promotion product
applicability product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getItemGroupIdInclusion
Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setItemGroupIdInclusion
Optional. Product filter by item group ID for the promotion. The product filter attributes only applies when the products eligible for promotion product applicability [product_applicability] attribute is set to specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getProductTypeInclusion
Optional. Product filter by product type for the promotion. The product
filter attributes only applies when the products eligible for promotion
product applicability product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setProductTypeInclusion
Optional. Product filter by product type for the promotion. The product
filter attributes only applies when the products eligible for promotion
product applicability product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getItemIdExclusion
Optional. Product filter by item ID
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setItemIdExclusion
Optional. Product filter by item ID
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getBrandExclusion
Optional. Product filter by brand
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setBrandExclusion
Optional. Product filter by brand
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getItemGroupIdExclusion
Optional. Product filter by item group ID.
The product filter attributes only applies when the products eligible for
promotion product applicability product_applicability
attribute is set to
specific_products.
exclusion for the promotion.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setItemGroupIdExclusion
Optional. Product filter by item group ID.
The product filter attributes only applies when the products eligible for
promotion product applicability product_applicability
attribute is set to
specific_products.
exclusion for the promotion.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getProductTypeExclusion
Optional. Product filter by product type
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setProductTypeExclusion
Optional. Product filter by product type
exclusion
for the promotion. The product filter attributes only applies when the
products eligible for promotion product applicability
product_applicability
attribute is set to
specific_products.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getMinimumPurchaseAmount
Optional. Minimum purchase amount for the promotion.
Returns | |
---|---|
Type | Description |
Google\Shopping\Type\Price|null |
hasMinimumPurchaseAmount
clearMinimumPurchaseAmount
setMinimumPurchaseAmount
Optional. Minimum purchase amount for the promotion.
Parameter | |
---|---|
Name | Description |
var |
Google\Shopping\Type\Price
|
Returns | |
---|---|
Type | Description |
$this |
getMinimumPurchaseQuantity
Optional. Minimum purchase quantity for the promotion.
Returns | |
---|---|
Type | Description |
int|string |
setMinimumPurchaseQuantity
Optional. Minimum purchase quantity for the promotion.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getLimitQuantity
Optional. Maximum purchase quantity for the promotion.
Returns | |
---|---|
Type | Description |
int|string |
setLimitQuantity
Optional. Maximum purchase quantity for the promotion.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getLimitValue
Optional. Maximum product price for promotion.
Returns | |
---|---|
Type | Description |
Google\Shopping\Type\Price|null |
hasLimitValue
clearLimitValue
setLimitValue
Optional. Maximum product price for promotion.
Parameter | |
---|---|
Name | Description |
var |
Google\Shopping\Type\Price
|
Returns | |
---|---|
Type | Description |
$this |
getPercentOff
Optional. The percentage discount offered in the promotion.
Returns | |
---|---|
Type | Description |
int|string |
setPercentOff
Optional. The percentage discount offered in the promotion.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getMoneyOffAmount
Optional. The money off amount offered in the promotion.
Returns | |
---|---|
Type | Description |
Google\Shopping\Type\Price|null |
hasMoneyOffAmount
clearMoneyOffAmount
setMoneyOffAmount
Optional. The money off amount offered in the promotion.
Parameter | |
---|---|
Name | Description |
var |
Google\Shopping\Type\Price
|
Returns | |
---|---|
Type | Description |
$this |
getGetThisQuantityDiscounted
Optional. The number of items discounted in the promotion. The attribute is
set when couponValueType
is equal to buy_m_get_n_money_off
or
buy_m_get_n_percent_off
.
Returns | |
---|---|
Type | Description |
int|string |
setGetThisQuantityDiscounted
Optional. The number of items discounted in the promotion. The attribute is
set when couponValueType
is equal to buy_m_get_n_money_off
or
buy_m_get_n_percent_off
.
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getFreeGiftValue
Optional. Free gift value for the promotion.
Returns | |
---|---|
Type | Description |
Google\Shopping\Type\Price|null |
hasFreeGiftValue
clearFreeGiftValue
setFreeGiftValue
Optional. Free gift value for the promotion.
Parameter | |
---|---|
Name | Description |
var |
Google\Shopping\Type\Price
|
Returns | |
---|---|
Type | Description |
$this |
getFreeGiftDescription
Optional. Free gift description for the promotion.
Returns | |
---|---|
Type | Description |
string |
setFreeGiftDescription
Optional. Free gift description for the promotion.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getFreeGiftItemId
Optional. Free gift item ID for the promotion.
Returns | |
---|---|
Type | Description |
string |
setFreeGiftItemId
Optional. Free gift item ID for the promotion.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getPromotionEffectiveTimePeriod
Required. TimePeriod
representation of the promotion's effective dates.
This attribute specifies that the promotion can be tested on your online store during this time period.
Returns | |
---|---|
Type | Description |
Google\Type\Interval|null |
hasPromotionEffectiveTimePeriod
clearPromotionEffectiveTimePeriod
setPromotionEffectiveTimePeriod
Required. TimePeriod
representation of the promotion's effective dates.
This attribute specifies that the promotion can be tested on your online store during this time period.
Parameter | |
---|---|
Name | Description |
var |
Google\Type\Interval
|
Returns | |
---|---|
Type | Description |
$this |
getPromotionDisplayTimePeriod
Optional. TimePeriod
representation of the promotion's display dates.
This attribute specifies the date and time frame when the promotion will be
live on Google.com and Shopping ads. If the display time period for
promotion promotion_display_time_period
attribute is not specified, the
promotion effective time period promotion_effective_time_period
determines the date and time frame when the promotion will be live on
Google.com and Shopping ads.
Returns | |
---|---|
Type | Description |
Google\Type\Interval|null |
hasPromotionDisplayTimePeriod
clearPromotionDisplayTimePeriod
setPromotionDisplayTimePeriod
Optional. TimePeriod
representation of the promotion's display dates.
This attribute specifies the date and time frame when the promotion will be
live on Google.com and Shopping ads. If the display time period for
promotion promotion_display_time_period
attribute is not specified, the
promotion effective time period promotion_effective_time_period
determines the date and time frame when the promotion will be live on
Google.com and Shopping ads.
Parameter | |
---|---|
Name | Description |
var |
Google\Type\Interval
|
Returns | |
---|---|
Type | Description |
$this |
getStoreApplicability
Optional. Whether the promotion applies to all stores, or only specified stores.
Local Inventory ads promotions throw an error if no store applicability is
included. An INVALID_ARGUMENT
error is thrown if store_applicability
is
set to ALL_STORES
and store_codes_inclusion
or score_code_exclusion
is set to a value.
Returns | |
---|---|
Type | Description |
int |
setStoreApplicability
Optional. Whether the promotion applies to all stores, or only specified stores.
Local Inventory ads promotions throw an error if no store applicability is
included. An INVALID_ARGUMENT
error is thrown if store_applicability
is
set to ALL_STORES
and store_codes_inclusion
or score_code_exclusion
is set to a value.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getStoreCodesInclusion
Optional. Store codes to
include
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setStoreCodesInclusion
Optional. Store codes to
include
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getStoreCodesExclusion
Optional. Store codes to
exclude
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setStoreCodesExclusion
Optional. Store codes to
exclude
for the promotion. The store filter attributes only applies when the
store_applicability
attribute is set to
specific_stores.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getPromotionUrl
Optional. URL to the page on the merchant's site where the promotion shows.
Local Inventory ads promotions throw an error if no promotion_url
is
included. URL is used to confirm that the promotion is valid and can be
redeemed.
Returns | |
---|---|
Type | Description |
string |
setPromotionUrl
Optional. URL to the page on the merchant's site where the promotion shows.
Local Inventory ads promotions throw an error if no promotion_url
is
included. URL is used to confirm that the promotion is valid and can be
redeemed.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |