Class: Google::Apis::MerchantapiPromotionsV1beta::Attributes
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiPromotionsV1beta::Attributes
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_promotions_v1beta/classes.rb,
lib/google/apis/merchantapi_promotions_v1beta/representations.rb,
lib/google/apis/merchantapi_promotions_v1beta/representations.rb
Overview
Attributes.
Instance Attribute Summary collapse
-
#brand_exclusion ⇒ Array<String>
Optional.
-
#brand_inclusion ⇒ Array<String>
Optional.
-
#coupon_value_type ⇒ String
Required.
-
#free_gift_description ⇒ String
Optional.
-
#free_gift_item_id ⇒ String
Optional.
-
#free_gift_value ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
-
#generic_redemption_code ⇒ String
Optional.
-
#get_this_quantity_discounted ⇒ Fixnum
Optional.
-
#item_group_id_exclusion ⇒ Array<String>
Optional.
-
#item_group_id_inclusion ⇒ Array<String>
Optional.
-
#item_id_exclusion ⇒ Array<String>
Optional.
-
#item_id_inclusion ⇒ Array<String>
Optional.
-
#limit_quantity ⇒ Fixnum
Optional.
-
#limit_value ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
-
#long_title ⇒ String
Required.
-
#minimum_purchase_amount ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
-
#minimum_purchase_quantity ⇒ Fixnum
Optional.
-
#money_off_amount ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
-
#offer_type ⇒ String
Required.
-
#percent_off ⇒ Fixnum
Optional.
-
#product_applicability ⇒ String
Required.
-
#product_type_exclusion ⇒ Array<String>
Optional.
-
#product_type_inclusion ⇒ Array<String>
Optional.
-
#promotion_destinations ⇒ Array<String>
Required.
-
#promotion_display_time_period ⇒ Google::Apis::MerchantapiPromotionsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
-
#promotion_effective_time_period ⇒ Google::Apis::MerchantapiPromotionsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
-
#promotion_url ⇒ String
Optional.
-
#store_applicability ⇒ String
Optional.
-
#store_codes_exclusion ⇒ Array<String>
Optional.
-
#store_codes_inclusion ⇒ Array<String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Attributes
constructor
A new instance of Attributes.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Attributes
Returns a new instance of Attributes.
270 271 272 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 270 def initialize(**args) update!(**args) end |
Instance Attribute Details
#brand_exclusion ⇒ Array<String>
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.
Corresponds to the JSON property brandExclusion
37 38 39 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 37 def brand_exclusion @brand_exclusion end |
#brand_inclusion ⇒ Array<String>
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.
Corresponds to the JSON property brandInclusion
46 47 48 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 46 def brand_inclusion @brand_inclusion end |
#coupon_value_type ⇒ String
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.
Corresponds to the JSON property couponValueType
55 56 57 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 55 def coupon_value_type @coupon_value_type end |
#free_gift_description ⇒ String
Optional. Free gift description for the promotion.
Corresponds to the JSON property freeGiftDescription
61 62 63 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 61 def free_gift_description @free_gift_description end |
#free_gift_item_id ⇒ String
Optional. Free gift item ID for the promotion.
Corresponds to the JSON property freeGiftItemId
67 68 69 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 67 def free_gift_item_id @free_gift_item_id end |
#free_gift_value ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property freeGiftValue
72 73 74 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 72 def free_gift_value @free_gift_value end |
#generic_redemption_code ⇒ String
Optional. Generic redemption code for the promotion. To be used with the
offerType
field and must meet the minimum requirements.
Corresponds to the JSON property genericRedemptionCode
80 81 82 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 80 def generic_redemption_code @generic_redemption_code end |
#get_this_quantity_discounted ⇒ Fixnum
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
.
Corresponds to the JSON property getThisQuantityDiscounted
87 88 89 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 87 def get_this_quantity_discounted @get_this_quantity_discounted end |
#item_group_id_exclusion ⇒ Array<String>
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.
Corresponds to the JSON property itemGroupIdExclusion
97 98 99 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 97 def item_group_id_exclusion @item_group_id_exclusion end |
#item_group_id_inclusion ⇒ Array<String>
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.
Corresponds to the JSON property itemGroupIdInclusion
106 107 108 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 106 def item_group_id_inclusion @item_group_id_inclusion end |
#item_id_exclusion ⇒ Array<String>
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.
Corresponds to the JSON property itemIdExclusion
116 117 118 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 116 def item_id_exclusion @item_id_exclusion end |
#item_id_inclusion ⇒ Array<String>
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.
Corresponds to the JSON property itemIdInclusion
126 127 128 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 126 def item_id_inclusion @item_id_inclusion end |
#limit_quantity ⇒ Fixnum
Optional. Maximum purchase quantity for the
promotion.
Corresponds to the JSON property limitQuantity
133 134 135 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 133 def limit_quantity @limit_quantity end |
#limit_value ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property limitValue
138 139 140 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 138 def limit_value @limit_value end |
#long_title ⇒ String
Required. Long title for the promotion.
Corresponds to the JSON property longTitle
144 145 146 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 144 def long_title @long_title end |
#minimum_purchase_amount ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property minimumPurchaseAmount
149 150 151 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 149 def minimum_purchase_amount @minimum_purchase_amount end |
#minimum_purchase_quantity ⇒ Fixnum
Optional. Minimum purchase quantity for the
promotion.
Corresponds to the JSON property minimumPurchaseQuantity
156 157 158 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 156 def minimum_purchase_quantity @minimum_purchase_quantity end |
#money_off_amount ⇒ Google::Apis::MerchantapiPromotionsV1beta::Price
The price represented as a number and currency.
Corresponds to the JSON property moneyOffAmount
161 162 163 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 161 def money_off_amount @money_off_amount end |
#offer_type ⇒ String
Required. Type of the promotion. Use this
attribute to indicate whether or not customers need a coupon code to redeem
your promotion.
Corresponds to the JSON property offerType
169 170 171 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 169 def offer_type @offer_type end |
#percent_off ⇒ Fixnum
Optional. The percentage discount offered in the promotion.
Corresponds to the JSON property percentOff
175 176 177 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 175 def percent_off @percent_off end |
#product_applicability ⇒ String
Required. Applicability of the promotion to either all products or only
specific products.
Corresponds to the JSON property productApplicability
182 183 184 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 182 def product_applicability @product_applicability end |
#product_type_exclusion ⇒ Array<String>
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.
Corresponds to the JSON property productTypeExclusion
192 193 194 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 192 def product_type_exclusion @product_type_exclusion end |
#product_type_inclusion ⇒ Array<String>
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.
Corresponds to the JSON property productTypeInclusion
201 202 203 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 201 def product_type_inclusion @product_type_inclusion end |
#promotion_destinations ⇒ Array<String>
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
Corresponds to the JSON property promotionDestinations
213 214 215 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 213 def promotion_destinations @promotion_destinations end |
#promotion_display_time_period ⇒ Google::Apis::MerchantapiPromotionsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a
Timestamp end (exclusive). The start must be less than or equal to the end.
When the start equals the end, the interval is empty (matches no time). When
both start and end are unspecified, the interval matches any time.
Corresponds to the JSON property promotionDisplayTimePeriod
221 222 223 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 221 def promotion_display_time_period @promotion_display_time_period end |
#promotion_effective_time_period ⇒ Google::Apis::MerchantapiPromotionsV1beta::Interval
Represents a time interval, encoded as a Timestamp start (inclusive) and a
Timestamp end (exclusive). The start must be less than or equal to the end.
When the start equals the end, the interval is empty (matches no time). When
both start and end are unspecified, the interval matches any time.
Corresponds to the JSON property promotionEffectiveTimePeriod
229 230 231 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 229 def promotion_effective_time_period @promotion_effective_time_period end |
#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.
Corresponds to the JSON property promotionUrl
237 238 239 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 237 def promotion_url @promotion_url end |
#store_applicability ⇒ String
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.
Corresponds to the JSON property storeApplicability
247 248 249 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 247 def store_applicability @store_applicability end |
#store_codes_exclusion ⇒ Array<String>
Optional. Store codes to exclude for the promotion.
The store filter attributes only applies when the store_applicability
attribute is set to specific_stores.
Corresponds to the JSON property storeCodesExclusion
256 257 258 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 256 def store_codes_exclusion @store_codes_exclusion end |
#store_codes_inclusion ⇒ Array<String>
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.
Corresponds to the JSON property storeCodesInclusion
268 269 270 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 268 def store_codes_inclusion @store_codes_inclusion end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 275 def update!(**args) @brand_exclusion = args[:brand_exclusion] if args.key?(:brand_exclusion) @brand_inclusion = args[:brand_inclusion] if args.key?(:brand_inclusion) @coupon_value_type = args[:coupon_value_type] if args.key?(:coupon_value_type) @free_gift_description = args[:free_gift_description] if args.key?(:free_gift_description) @free_gift_item_id = args[:free_gift_item_id] if args.key?(:free_gift_item_id) @free_gift_value = args[:free_gift_value] if args.key?(:free_gift_value) @generic_redemption_code = args[:generic_redemption_code] if args.key?(:generic_redemption_code) @get_this_quantity_discounted = args[:get_this_quantity_discounted] if args.key?(:get_this_quantity_discounted) @item_group_id_exclusion = args[:item_group_id_exclusion] if args.key?(:item_group_id_exclusion) @item_group_id_inclusion = args[:item_group_id_inclusion] if args.key?(:item_group_id_inclusion) @item_id_exclusion = args[:item_id_exclusion] if args.key?(:item_id_exclusion) @item_id_inclusion = args[:item_id_inclusion] if args.key?(:item_id_inclusion) @limit_quantity = args[:limit_quantity] if args.key?(:limit_quantity) @limit_value = args[:limit_value] if args.key?(:limit_value) @long_title = args[:long_title] if args.key?(:long_title) @minimum_purchase_amount = args[:minimum_purchase_amount] if args.key?(:minimum_purchase_amount) @minimum_purchase_quantity = args[:minimum_purchase_quantity] if args.key?(:minimum_purchase_quantity) @money_off_amount = args[:money_off_amount] if args.key?(:money_off_amount) @offer_type = args[:offer_type] if args.key?(:offer_type) @percent_off = args[:percent_off] if args.key?(:percent_off) @product_applicability = args[:product_applicability] if args.key?(:product_applicability) @product_type_exclusion = args[:product_type_exclusion] if args.key?(:product_type_exclusion) @product_type_inclusion = args[:product_type_inclusion] if args.key?(:product_type_inclusion) @promotion_destinations = args[:promotion_destinations] if args.key?(:promotion_destinations) @promotion_display_time_period = args[:promotion_display_time_period] if args.key?(:promotion_display_time_period) @promotion_effective_time_period = args[:promotion_effective_time_period] if args.key?(:promotion_effective_time_period) @promotion_url = args[:promotion_url] if args.key?(:promotion_url) @store_applicability = args[:store_applicability] if args.key?(:store_applicability) @store_codes_exclusion = args[:store_codes_exclusion] if args.key?(:store_codes_exclusion) @store_codes_inclusion = args[:store_codes_inclusion] if args.key?(:store_codes_inclusion) end |