Class: Google::Apis::ContentV2_1::Promotion
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::Promotion
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Overview
Represents a promotion. (1) https://support.google.com/merchants/answer/ 2906014 (2) https://support.google.com/merchants/answer/10146130 (3) https:// support.google.com/merchants/answer/9173673
Instance Attribute Summary collapse
-
#brand ⇒ Array<String>
Product filter by brand for the promotion.
-
#brand_exclusion ⇒ Array<String>
Product filter by brand exclusion for the promotion.
-
#content_language ⇒ String
Required.
-
#coupon_value_type ⇒ String
Required.
-
#free_gift_description ⇒ String
Free gift description for the promotion.
-
#free_gift_item_id ⇒ String
Free gift item id for the promotion.
-
#free_gift_value ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
-
#generic_redemption_code ⇒ String
Generic redemption code for the promotion.
-
#get_this_quantity_discounted ⇒ Fixnum
The number of items discounted in the promotion.
-
#id ⇒ String
Required.
-
#item_group_id ⇒ Array<String>
Product filter by item group id for the promotion.
-
#item_group_id_exclusion ⇒ Array<String>
Product filter by item group id exclusion for the promotion.
-
#item_id ⇒ Array<String>
Product filter by item id for the promotion.
-
#item_id_exclusion ⇒ Array<String>
Product filter by item id exclusion for the promotion.
-
#limit_quantity ⇒ Fixnum
Maximum purchase quantity for the promotion.
-
#limit_value ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
-
#long_title ⇒ String
Long title for the promotion.
-
#minimum_purchase_amount ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
-
#minimum_purchase_quantity ⇒ Fixnum
Minimum purchase quantity for the promotion.
-
#money_budget ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
-
#money_off_amount ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
-
#offer_type ⇒ String
Required.
-
#order_limit ⇒ Fixnum
Order limit for the promotion.
-
#percent_off ⇒ Fixnum
The percentage discount offered in the promotion.
-
#product_applicability ⇒ String
Required.
-
#promotion_destination_ids ⇒ Array<String>
Destination ID for the promotion.
-
#promotion_display_dates ⇒ String
String representation of the promotion display dates.
-
#promotion_effective_dates ⇒ String
Required.
-
#promotion_id ⇒ String
Required.
-
#redemption_channel ⇒ Array<String>
Required.
-
#shipping_service_names ⇒ Array<String>
Shipping service names for thse promotion.
-
#target_country ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Promotion
constructor
A new instance of Promotion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Promotion
Returns a new instance of Promotion.
11736 11737 11738 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11736 def initialize(**args) update!(**args) end |
Instance Attribute Details
#brand ⇒ Array<String>
Product filter by brand for the promotion.
Corresponds to the JSON property brand
11575 11576 11577 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11575 def brand @brand end |
#brand_exclusion ⇒ Array<String>
Product filter by brand exclusion for the promotion.
Corresponds to the JSON property brandExclusion
11580 11581 11582 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11580 def brand_exclusion @brand_exclusion end |
#content_language ⇒ String
Required. The content language used as part of the unique identifier.
Corresponds to the JSON property contentLanguage
11585 11586 11587 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11585 def content_language @content_language end |
#coupon_value_type ⇒ String
Required. Coupon value type for the promotion.
Corresponds to the JSON property couponValueType
11590 11591 11592 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11590 def coupon_value_type @coupon_value_type end |
#free_gift_description ⇒ String
Free gift description for the promotion.
Corresponds to the JSON property freeGiftDescription
11595 11596 11597 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11595 def free_gift_description @free_gift_description end |
#free_gift_item_id ⇒ String
Free gift item id for the promotion.
Corresponds to the JSON property freeGiftItemId
11600 11601 11602 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11600 def free_gift_item_id @free_gift_item_id end |
#free_gift_value ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
Corresponds to the JSON property freeGiftValue
11605 11606 11607 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11605 def free_gift_value @free_gift_value end |
#generic_redemption_code ⇒ String
Generic redemption code for the promotion. To be used with the above field.
Corresponds to the JSON property genericRedemptionCode
11610 11611 11612 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11610 def generic_redemption_code @generic_redemption_code end |
#get_this_quantity_discounted ⇒ Fixnum
The number of items discounted in the promotion.
Corresponds to the JSON property getThisQuantityDiscounted
11615 11616 11617 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11615 def get_this_quantity_discounted @get_this_quantity_discounted end |
#id ⇒ String
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
11622 11623 11624 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11622 def id @id end |
#item_group_id ⇒ Array<String>
Product filter by item group id for the promotion.
Corresponds to the JSON property itemGroupId
11627 11628 11629 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11627 def item_group_id @item_group_id end |
#item_group_id_exclusion ⇒ Array<String>
Product filter by item group id exclusion for the promotion.
Corresponds to the JSON property itemGroupIdExclusion
11632 11633 11634 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11632 def item_group_id_exclusion @item_group_id_exclusion end |
#item_id ⇒ Array<String>
Product filter by item id for the promotion.
Corresponds to the JSON property itemId
11637 11638 11639 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11637 def item_id @item_id end |
#item_id_exclusion ⇒ Array<String>
Product filter by item id exclusion for the promotion.
Corresponds to the JSON property itemIdExclusion
11642 11643 11644 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11642 def item_id_exclusion @item_id_exclusion end |
#limit_quantity ⇒ Fixnum
Maximum purchase quantity for the promotion.
Corresponds to the JSON property limitQuantity
11647 11648 11649 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11647 def limit_quantity @limit_quantity end |
#limit_value ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
Corresponds to the JSON property limitValue
11652 11653 11654 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11652 def limit_value @limit_value end |
#long_title ⇒ String
Long title for the promotion.
Corresponds to the JSON property longTitle
11657 11658 11659 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11657 def long_title @long_title end |
#minimum_purchase_amount ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
Corresponds to the JSON property minimumPurchaseAmount
11662 11663 11664 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11662 def minimum_purchase_amount @minimum_purchase_amount end |
#minimum_purchase_quantity ⇒ Fixnum
Minimum purchase quantity for the promotion.
Corresponds to the JSON property minimumPurchaseQuantity
11667 11668 11669 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11667 def minimum_purchase_quantity @minimum_purchase_quantity end |
#money_budget ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
Corresponds to the JSON property moneyBudget
11672 11673 11674 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11672 def money_budget @money_budget end |
#money_off_amount ⇒ Google::Apis::ContentV2_1::PriceAmount
The price represented as a number and currency.
Corresponds to the JSON property moneyOffAmount
11677 11678 11679 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11677 def money_off_amount @money_off_amount end |
#offer_type ⇒ String
Required. Type of the promotion.
Corresponds to the JSON property offerType
11682 11683 11684 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11682 def offer_type @offer_type end |
#order_limit ⇒ Fixnum
Order limit for the promotion.
Corresponds to the JSON property orderLimit
11687 11688 11689 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11687 def order_limit @order_limit end |
#percent_off ⇒ Fixnum
The percentage discount offered in the promotion.
Corresponds to the JSON property percentOff
11692 11693 11694 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11692 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
11698 11699 11700 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11698 def product_applicability @product_applicability end |
#promotion_destination_ids ⇒ Array<String>
Destination ID for the promotion.
Corresponds to the JSON property promotionDestinationIds
11703 11704 11705 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11703 def promotion_destination_ids @promotion_destination_ids end |
#promotion_display_dates ⇒ String
String representation of the promotion display dates.
Corresponds to the JSON property promotionDisplayDates
11708 11709 11710 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11708 def promotion_display_dates @promotion_display_dates end |
#promotion_effective_dates ⇒ String
Required. String representation of the promotion effective dates.
Corresponds to the JSON property promotionEffectiveDates
11713 11714 11715 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11713 def promotion_effective_dates @promotion_effective_dates end |
#promotion_id ⇒ String
Required. The user provided promotion id to uniquely identify the promotion.
Corresponds to the JSON property promotionId
11718 11719 11720 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11718 def promotion_id @promotion_id end |
#redemption_channel ⇒ Array<String>
Required. Redemption channel for the promotion. At least one channel is
required.
Corresponds to the JSON property redemptionChannel
11724 11725 11726 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11724 def redemption_channel @redemption_channel end |
#shipping_service_names ⇒ Array<String>
Shipping service names for thse promotion.
Corresponds to the JSON property shippingServiceNames
11729 11730 11731 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11729 def shipping_service_names @shipping_service_names end |
#target_country ⇒ String
Required. The target country used as part of the unique identifier.
Corresponds to the JSON property targetCountry
11734 11735 11736 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11734 def target_country @target_country end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 11741 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 |