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.
data
array
Optional. Data for populating the Message object.
↳ product_applicability
↳ 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 offerType
field and must meet the minimum requirements
.
↳ long_title
↳ 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 FREE_LISTINGS
, FREE_LOCAL_LISTINGS
, LOCAL_INVENTORY_ADS
. For more details see Promotion destination
↳ 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 product_applicability
attribute is set to specific_products
.
↳ 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 product_applicability
attribute is set to specific_products
.
↳ 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 product_applicability
attribute is set to specific_products
.
↳ 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 product_applicability
attribute is set to specific_products
.
↳ 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 product_applicability
attribute is set to specific_products
.
↳ 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_applicability
attribute is set to specific_products
. exclusion for the promotion.
↳ 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 product_applicability
attribute is set to specific_products
.
↳ minimum_purchase_amount
↳ minimum_purchase_quantity
↳ limit_quantity
↳ limit_value
↳ percent_off
↳ money_off_amount
↳ get_this_quantity_discounted
int|string
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
.
↳ free_gift_value
↳ free_gift_description
↳ free_gift_item_id
↳ promotion_effective_time_period
Google\Type\Interval
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.
↳ promotion_display_time_period
Google\Type\Interval
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.
↳ 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 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.
↳ store_codes_inclusion
array
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.
↳ store_codes_exclusion
array
Optional. Store codes to exclude
for the promotion. The store filter attributes only applies when the store_applicability
attribute is set to specific_stores
.
↳ 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 promotion_url
is included. URL is used to confirm that the promotion is valid and can be redeemed.
getProductApplicability
Required. Applicability of the promotion to either all products or only specific products .
int
setProductApplicability
Required. Applicability of the promotion to either all products or only specific products .
var
int
$this
getOfferType
Required.
Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.
int
setOfferType
Required.
Type of the promotion. Use this attribute to indicate whether or not customers need a coupon code to redeem your promotion.
var
int
$this
getGenericRedemptionCode
Optional. Generic redemption code for the promotion. To be used with the offerType
field and must meet the minimum
requirements
.
string
setGenericRedemptionCode
Optional. Generic redemption code for the promotion. To be used with the offerType
field and must meet the minimum
requirements
.
var
string
$this
getLongTitle
Required. Long title for the promotion.
string
setLongTitle
Required. Long title for the promotion.
var
string
$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 .
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 .
var
int
$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
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
var
int[]
$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
.
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
.
var
string[]
$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
.
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
.
var
string[]
$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 .
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 .
var
string[]
$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
.
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
.
var
string[]
$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
.
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
.
var
string[]
$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
.
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
.
var
string[]
$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.
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.
var
string[]
$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
.
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
.
var
string[]
$this
getMinimumPurchaseAmount
Optional. Minimum purchase amount for the promotion.
hasMinimumPurchaseAmount
clearMinimumPurchaseAmount
setMinimumPurchaseAmount
Optional. Minimum purchase amount for the promotion.
$this
getMinimumPurchaseQuantity
Optional. Minimum purchase quantity for the promotion.
int|string
setMinimumPurchaseQuantity
Optional. Minimum purchase quantity for the promotion.
var
int|string
$this
getLimitQuantity
Optional. Maximum purchase quantity for the promotion.
int|string
setLimitQuantity
Optional. Maximum purchase quantity for the promotion.
var
int|string
$this
getLimitValue
Optional. Maximum product price for promotion.
hasLimitValue
clearLimitValue
setLimitValue
Optional. Maximum product price for promotion.
$this
getPercentOff
Optional. The percentage discount offered in the promotion.
int|string
setPercentOff
Optional. The percentage discount offered in the promotion.
var
int|string
$this
getMoneyOffAmount
Optional. The money off amount offered in the promotion.
hasMoneyOffAmount
clearMoneyOffAmount
setMoneyOffAmount
Optional. The money off amount offered in the promotion.
$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
.
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
.
var
int|string
$this
getFreeGiftValue
Optional. Free gift value for the promotion.
hasFreeGiftValue
clearFreeGiftValue
setFreeGiftValue
Optional. Free gift value for the promotion.
$this
getFreeGiftDescription
Optional. Free gift description for the promotion.
string
setFreeGiftDescription
Optional. Free gift description for the promotion.
var
string
$this
getFreeGiftItemId
Optional. Free gift item ID for the promotion.
string
setFreeGiftItemId
Optional. Free gift item ID for the promotion.
var
string
$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.
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.
$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.
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.
$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.
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.
var
int
$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.
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.
var
string[]
$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
.
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
.
var
string[]
$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.
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.
var
string
$this