class Google::Apis::ContentV2_1::Promotion

Represents a promotion. (1) support.google.com/merchants/answer/ 2906014 (2) support.google.com/merchants/answer/10146130 (3) https:// support.google.com/merchants/answer/9173673

Attributes

brand[RW]

Product filter by brand for the promotion. Corresponds to the JSON property `brand` @return [Array<String>]

brand_exclusion[RW]

Product filter by brand exclusion for the promotion. Corresponds to the JSON property `brandExclusion` @return [Array<String>]

content_language[RW]

Required. The content language used as part of the unique identifier. Corresponds to the JSON property `contentLanguage` @return [String]

coupon_value_type[RW]

Required. Coupon value type for the promotion. Corresponds to the JSON property `couponValueType` @return [String]

free_gift_description[RW]

Free gift description for the promotion. Corresponds to the JSON property `freeGiftDescription` @return [String]

free_gift_item_id[RW]

Free gift item id for the promotion. Corresponds to the JSON property `freeGiftItemId` @return [String]

free_gift_value[RW]

The price represented as a number and currency. Corresponds to the JSON property `freeGiftValue` @return [Google::Apis::ContentV2_1::PriceAmount]

generic_redemption_code[RW]

Generic redemption code for the promotion. To be used with the above field. Corresponds to the JSON property `genericRedemptionCode` @return [String]

get_this_quantity_discounted[RW]

The number of items discounted in the promotion. Corresponds to the JSON property `getThisQuantityDiscounted` @return [Fixnum]

id[RW]

Required. Output only. The REST promotion id to uniquely identify the promotion. Content API methods that operate on promotions take this as their promotionId parameter. Corresponds to the JSON property `id` @return [String]

item_group_id[RW]

Product filter by item group id for the promotion. Corresponds to the JSON property `itemGroupId` @return [Array<String>]

item_group_id_exclusion[RW]

Product filter by item group id exclusion for the promotion. Corresponds to the JSON property `itemGroupIdExclusion` @return [Array<String>]

item_id[RW]

Product filter by item id for the promotion. Corresponds to the JSON property `itemId` @return [Array<String>]

item_id_exclusion[RW]

Product filter by item id exclusion for the promotion. Corresponds to the JSON property `itemIdExclusion` @return [Array<String>]

limit_quantity[RW]

Maximum purchase quantity for the promotion. Corresponds to the JSON property `limitQuantity` @return [Fixnum]

limit_value[RW]

The price represented as a number and currency. Corresponds to the JSON property `limitValue` @return [Google::Apis::ContentV2_1::PriceAmount]

long_title[RW]

Long title for the promotion. Corresponds to the JSON property `longTitle` @return [String]

minimum_purchase_amount[RW]

The price represented as a number and currency. Corresponds to the JSON property `minimumPurchaseAmount` @return [Google::Apis::ContentV2_1::PriceAmount]

minimum_purchase_quantity[RW]

Minimum purchase quantity for the promotion. Corresponds to the JSON property `minimumPurchaseQuantity` @return [Fixnum]

money_budget[RW]

The price represented as a number and currency. Corresponds to the JSON property `moneyBudget` @return [Google::Apis::ContentV2_1::PriceAmount]

money_off_amount[RW]

The price represented as a number and currency. Corresponds to the JSON property `moneyOffAmount` @return [Google::Apis::ContentV2_1::PriceAmount]

offer_type[RW]

Required. Type of the promotion. Corresponds to the JSON property `offerType` @return [String]

order_limit[RW]

Order limit for the promotion. Corresponds to the JSON property `orderLimit` @return [Fixnum]

percent_off[RW]

The percentage discount offered in the promotion. Corresponds to the JSON property `percentOff` @return [Fixnum]

product_applicability[RW]

Required. Applicability of the promotion to either all products or only specific products. Corresponds to the JSON property `productApplicability` @return [String]

promotion_destination_ids[RW]

Destination ID for the promotion. Corresponds to the JSON property `promotionDestinationIds` @return [Array<String>]

promotion_display_dates[RW]

String representation of the promotion display dates. Corresponds to the JSON property `promotionDisplayDates` @return [String]

promotion_effective_dates[RW]

Required. String representation of the promotion effective dates. Corresponds to the JSON property `promotionEffectiveDates` @return [String]

promotion_id[RW]

Required. The user provided promotion id to uniquely identify the promotion. Corresponds to the JSON property `promotionId` @return [String]

redemption_channel[RW]

Required. Redemption channel for the promotion. At least one channel is required. Corresponds to the JSON property `redemptionChannel` @return [Array<String>]

shipping_service_names[RW]

Shipping service names for thse promotion. Corresponds to the JSON property `shippingServiceNames` @return [Array<String>]

target_country[RW]

Required. The target country used as part of the unique identifier. Corresponds to the JSON property `targetCountry` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/content_v2_1/classes.rb, line 11681
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/content_v2_1/classes.rb, line 11686
def update!(**args)
  @brand = args[:brand] if args.key?(:brand)
  @brand_exclusion = args[:brand_exclusion] if args.key?(:brand_exclusion)
  @content_language = args[:content_language] if args.key?(:content_language)
  @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)
  @id = args[:id] if args.key?(:id)
  @item_group_id = args[:item_group_id] if args.key?(:item_group_id)
  @item_group_id_exclusion = args[:item_group_id_exclusion] if args.key?(:item_group_id_exclusion)
  @item_id = args[:item_id] if args.key?(:item_id)
  @item_id_exclusion = args[:item_id_exclusion] if args.key?(:item_id_exclusion)
  @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_budget = args[:money_budget] if args.key?(:money_budget)
  @money_off_amount = args[:money_off_amount] if args.key?(:money_off_amount)
  @offer_type = args[:offer_type] if args.key?(:offer_type)
  @order_limit = args[:order_limit] if args.key?(:order_limit)
  @percent_off = args[:percent_off] if args.key?(:percent_off)
  @product_applicability = args[:product_applicability] if args.key?(:product_applicability)
  @promotion_destination_ids = args[:promotion_destination_ids] if args.key?(:promotion_destination_ids)
  @promotion_display_dates = args[:promotion_display_dates] if args.key?(:promotion_display_dates)
  @promotion_effective_dates = args[:promotion_effective_dates] if args.key?(:promotion_effective_dates)
  @promotion_id = args[:promotion_id] if args.key?(:promotion_id)
  @redemption_channel = args[:redemption_channel] if args.key?(:redemption_channel)
  @shipping_service_names = args[:shipping_service_names] if args.key?(:shipping_service_names)
  @target_country = args[:target_country] if args.key?(:target_country)
end