Class: Google::Apis::MerchantapiPromotionsV1beta::Attributes

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_exclusionArray<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

Returns:

  • (Array<String>)


37
38
39
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 37

def brand_exclusion
  @brand_exclusion
end

#brand_inclusionArray<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

Returns:

  • (Array<String>)


46
47
48
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 46

def brand_inclusion
  @brand_inclusion
end

#coupon_value_typeString

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

Returns:

  • (String)


55
56
57
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 55

def coupon_value_type
  @coupon_value_type
end

#free_gift_descriptionString

Optional. Free gift description for the promotion. Corresponds to the JSON property freeGiftDescription

Returns:

  • (String)


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_idString

Optional. Free gift item ID for the promotion. Corresponds to the JSON property freeGiftItemId

Returns:

  • (String)


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_valueGoogle::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_codeString

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

Returns:

  • (String)


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_discountedFixnum

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

Returns:

  • (Fixnum)


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_exclusionArray<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

Returns:

  • (Array<String>)


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_inclusionArray<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

Returns:

  • (Array<String>)


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_exclusionArray<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

Returns:

  • (Array<String>)


116
117
118
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 116

def item_id_exclusion
  @item_id_exclusion
end

#item_id_inclusionArray<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

Returns:

  • (Array<String>)


126
127
128
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 126

def item_id_inclusion
  @item_id_inclusion
end

#limit_quantityFixnum

Optional. Maximum purchase quantity for the promotion. Corresponds to the JSON property limitQuantity

Returns:

  • (Fixnum)


133
134
135
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 133

def limit_quantity
  @limit_quantity
end

#limit_valueGoogle::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_titleString

Required. Long title for the promotion. Corresponds to the JSON property longTitle

Returns:

  • (String)


144
145
146
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 144

def long_title
  @long_title
end

#minimum_purchase_amountGoogle::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_quantityFixnum

Optional. Minimum purchase quantity for the promotion. Corresponds to the JSON property minimumPurchaseQuantity

Returns:

  • (Fixnum)


156
157
158
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 156

def minimum_purchase_quantity
  @minimum_purchase_quantity
end

#money_off_amountGoogle::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_typeString

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

Returns:

  • (String)


169
170
171
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 169

def offer_type
  @offer_type
end

#percent_offFixnum

Optional. The percentage discount offered in the promotion. Corresponds to the JSON property percentOff

Returns:

  • (Fixnum)


175
176
177
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 175

def percent_off
  @percent_off
end

#product_applicabilityString

Required. Applicability of the promotion to either all products or only specific products. Corresponds to the JSON property productApplicability

Returns:

  • (String)


182
183
184
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 182

def product_applicability
  @product_applicability
end

#product_type_exclusionArray<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

Returns:

  • (Array<String>)


192
193
194
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 192

def product_type_exclusion
  @product_type_exclusion
end

#product_type_inclusionArray<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

Returns:

  • (Array<String>)


201
202
203
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 201

def product_type_inclusion
  @product_type_inclusion
end

#promotion_destinationsArray<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

Returns:

  • (Array<String>)


213
214
215
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 213

def promotion_destinations
  @promotion_destinations
end

#promotion_display_time_periodGoogle::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_periodGoogle::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_urlString

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

Returns:

  • (String)


237
238
239
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 237

def promotion_url
  @promotion_url
end

#store_applicabilityString

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

Returns:

  • (String)


247
248
249
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 247

def store_applicability
  @store_applicability
end

#store_codes_exclusionArray<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

Returns:

  • (Array<String>)


256
257
258
# File 'lib/google/apis/merchantapi_promotions_v1beta/classes.rb', line 256

def store_codes_exclusion
  @store_codes_exclusion
end

#store_codes_inclusionArray<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

Returns:

  • (Array<String>)


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