Class: Google::Apis::ContentV2_1::Promotion

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

The Promotions feature is currently in alpha and is not yet publicly available via Content API for Shopping. This documentation is provided for reference only may be subject to change. Represents a promotion. See the following articles for more details. * Promotions feed specification * Local promotions feed specification * Promotions on Buy on Google product data specification

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Promotion

Returns a new instance of Promotion.



11878
11879
11880
# File 'lib/google/apis/content_v2_1/classes.rb', line 11878

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#brandArray<String>

Product filter by brand for the promotion. Corresponds to the JSON property brand

Returns:

  • (Array<String>)


11695
11696
11697
# File 'lib/google/apis/content_v2_1/classes.rb', line 11695

def brand
  @brand
end

#brand_exclusionArray<String>

Product filter by brand exclusion for the promotion. Corresponds to the JSON property brandExclusion

Returns:

  • (Array<String>)


11700
11701
11702
# File 'lib/google/apis/content_v2_1/classes.rb', line 11700

def brand_exclusion
  @brand_exclusion
end

#content_languageString

Required. The content language used as part of the unique identifier. Corresponds to the JSON property contentLanguage

Returns:

  • (String)


11705
11706
11707
# File 'lib/google/apis/content_v2_1/classes.rb', line 11705

def content_language
  @content_language
end

#coupon_value_typeString

Required. Coupon value type for the promotion. Corresponds to the JSON property couponValueType

Returns:

  • (String)


11710
11711
11712
# File 'lib/google/apis/content_v2_1/classes.rb', line 11710

def coupon_value_type
  @coupon_value_type
end

#free_gift_descriptionString

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

Returns:

  • (String)


11715
11716
11717
# File 'lib/google/apis/content_v2_1/classes.rb', line 11715

def free_gift_description
  @free_gift_description
end

#free_gift_item_idString

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

Returns:

  • (String)


11720
11721
11722
# File 'lib/google/apis/content_v2_1/classes.rb', line 11720

def free_gift_item_id
  @free_gift_item_id
end

#free_gift_valueGoogle::Apis::ContentV2_1::PriceAmount

The price represented as a number and currency. Corresponds to the JSON property freeGiftValue



11725
11726
11727
# File 'lib/google/apis/content_v2_1/classes.rb', line 11725

def free_gift_value
  @free_gift_value
end

#generic_redemption_codeString

Generic redemption code for the promotion. To be used with the above field. Corresponds to the JSON property genericRedemptionCode

Returns:

  • (String)


11730
11731
11732
# File 'lib/google/apis/content_v2_1/classes.rb', line 11730

def generic_redemption_code
  @generic_redemption_code
end

#get_this_quantity_discountedFixnum

The number of items discounted in the promotion. Corresponds to the JSON property getThisQuantityDiscounted

Returns:

  • (Fixnum)


11735
11736
11737
# File 'lib/google/apis/content_v2_1/classes.rb', line 11735

def get_this_quantity_discounted
  @get_this_quantity_discounted
end

#idString

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. The REST ID for a promotion is of the form channel: contentLanguage:targetCountry:promotionId The channel field will have a value of "online", "in_store", or "online_in_store". Corresponds to the JSON property id

Returns:

  • (String)


11744
11745
11746
# File 'lib/google/apis/content_v2_1/classes.rb', line 11744

def id
  @id
end

#item_group_idArray<String>

Product filter by item group id for the promotion. Corresponds to the JSON property itemGroupId

Returns:

  • (Array<String>)


11749
11750
11751
# File 'lib/google/apis/content_v2_1/classes.rb', line 11749

def item_group_id
  @item_group_id
end

#item_group_id_exclusionArray<String>

Product filter by item group id exclusion for the promotion. Corresponds to the JSON property itemGroupIdExclusion

Returns:

  • (Array<String>)


11754
11755
11756
# File 'lib/google/apis/content_v2_1/classes.rb', line 11754

def item_group_id_exclusion
  @item_group_id_exclusion
end

#item_idArray<String>

Product filter by item id for the promotion. Corresponds to the JSON property itemId

Returns:

  • (Array<String>)


11759
11760
11761
# File 'lib/google/apis/content_v2_1/classes.rb', line 11759

def item_id
  @item_id
end

#item_id_exclusionArray<String>

Product filter by item id exclusion for the promotion. Corresponds to the JSON property itemIdExclusion

Returns:

  • (Array<String>)


11764
11765
11766
# File 'lib/google/apis/content_v2_1/classes.rb', line 11764

def item_id_exclusion
  @item_id_exclusion
end

#limit_quantityFixnum

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

Returns:

  • (Fixnum)


11769
11770
11771
# File 'lib/google/apis/content_v2_1/classes.rb', line 11769

def limit_quantity
  @limit_quantity
end

#limit_valueGoogle::Apis::ContentV2_1::PriceAmount

The price represented as a number and currency. Corresponds to the JSON property limitValue



11774
11775
11776
# File 'lib/google/apis/content_v2_1/classes.rb', line 11774

def limit_value
  @limit_value
end

#long_titleString

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

Returns:

  • (String)


11779
11780
11781
# File 'lib/google/apis/content_v2_1/classes.rb', line 11779

def long_title
  @long_title
end

#minimum_purchase_amountGoogle::Apis::ContentV2_1::PriceAmount

The price represented as a number and currency. Corresponds to the JSON property minimumPurchaseAmount



11784
11785
11786
# File 'lib/google/apis/content_v2_1/classes.rb', line 11784

def minimum_purchase_amount
  @minimum_purchase_amount
end

#minimum_purchase_quantityFixnum

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

Returns:

  • (Fixnum)


11789
11790
11791
# File 'lib/google/apis/content_v2_1/classes.rb', line 11789

def minimum_purchase_quantity
  @minimum_purchase_quantity
end

#money_budgetGoogle::Apis::ContentV2_1::PriceAmount

The price represented as a number and currency. Corresponds to the JSON property moneyBudget



11794
11795
11796
# File 'lib/google/apis/content_v2_1/classes.rb', line 11794

def money_budget
  @money_budget
end

#money_off_amountGoogle::Apis::ContentV2_1::PriceAmount

The price represented as a number and currency. Corresponds to the JSON property moneyOffAmount



11799
11800
11801
# File 'lib/google/apis/content_v2_1/classes.rb', line 11799

def money_off_amount
  @money_off_amount
end

#offer_typeString

Required. Type of the promotion. Corresponds to the JSON property offerType

Returns:

  • (String)


11804
11805
11806
# File 'lib/google/apis/content_v2_1/classes.rb', line 11804

def offer_type
  @offer_type
end

#order_limitFixnum

Order limit for the promotion. Corresponds to the JSON property orderLimit

Returns:

  • (Fixnum)


11809
11810
11811
# File 'lib/google/apis/content_v2_1/classes.rb', line 11809

def order_limit
  @order_limit
end

#percent_offFixnum

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

Returns:

  • (Fixnum)


11814
11815
11816
# File 'lib/google/apis/content_v2_1/classes.rb', line 11814

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)


11820
11821
11822
# File 'lib/google/apis/content_v2_1/classes.rb', line 11820

def product_applicability
  @product_applicability
end

#product_typeArray<String>

Product filter by product type for the promotion. Corresponds to the JSON property productType

Returns:

  • (Array<String>)


11825
11826
11827
# File 'lib/google/apis/content_v2_1/classes.rb', line 11825

def product_type
  @product_type
end

#product_type_exclusionArray<String>

Product filter by product type exclusion for the promotion. Corresponds to the JSON property productTypeExclusion

Returns:

  • (Array<String>)


11830
11831
11832
# File 'lib/google/apis/content_v2_1/classes.rb', line 11830

def product_type_exclusion
  @product_type_exclusion
end

#promotion_destination_idsArray<String>

Destination ID for the promotion. Corresponds to the JSON property promotionDestinationIds

Returns:

  • (Array<String>)


11835
11836
11837
# File 'lib/google/apis/content_v2_1/classes.rb', line 11835

def promotion_destination_ids
  @promotion_destination_ids
end

#promotion_display_datesString

String representation of the promotion display dates. Corresponds to the JSON property promotionDisplayDates

Returns:

  • (String)


11840
11841
11842
# File 'lib/google/apis/content_v2_1/classes.rb', line 11840

def promotion_display_dates
  @promotion_display_dates
end

#promotion_display_time_periodGoogle::Apis::ContentV2_1::TimePeriod

A message that represents a time period. Corresponds to the JSON property promotionDisplayTimePeriod



11845
11846
11847
# File 'lib/google/apis/content_v2_1/classes.rb', line 11845

def promotion_display_time_period
  @promotion_display_time_period
end

#promotion_effective_datesString

Required. String representation of the promotion effective dates. Corresponds to the JSON property promotionEffectiveDates

Returns:

  • (String)


11850
11851
11852
# File 'lib/google/apis/content_v2_1/classes.rb', line 11850

def promotion_effective_dates
  @promotion_effective_dates
end

#promotion_effective_time_periodGoogle::Apis::ContentV2_1::TimePeriod

A message that represents a time period. Corresponds to the JSON property promotionEffectiveTimePeriod



11855
11856
11857
# File 'lib/google/apis/content_v2_1/classes.rb', line 11855

def promotion_effective_time_period
  @promotion_effective_time_period
end

#promotion_idString

Required. The user provided promotion id to uniquely identify the promotion. Corresponds to the JSON property promotionId

Returns:

  • (String)


11860
11861
11862
# File 'lib/google/apis/content_v2_1/classes.rb', line 11860

def promotion_id
  @promotion_id
end

#redemption_channelArray<String>

Required. Redemption channel for the promotion. At least one channel is required. Corresponds to the JSON property redemptionChannel

Returns:

  • (Array<String>)


11866
11867
11868
# File 'lib/google/apis/content_v2_1/classes.rb', line 11866

def redemption_channel
  @redemption_channel
end

#shipping_service_namesArray<String>

Shipping service names for thse promotion. Corresponds to the JSON property shippingServiceNames

Returns:

  • (Array<String>)


11871
11872
11873
# File 'lib/google/apis/content_v2_1/classes.rb', line 11871

def shipping_service_names
  @shipping_service_names
end

#target_countryString

Required. The target country used as part of the unique identifier. Corresponds to the JSON property targetCountry

Returns:

  • (String)


11876
11877
11878
# File 'lib/google/apis/content_v2_1/classes.rb', line 11876

def target_country
  @target_country
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
# File 'lib/google/apis/content_v2_1/classes.rb', line 11883

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)
  @product_type = args[:product_type] if args.key?(:product_type)
  @product_type_exclusion = args[:product_type_exclusion] if args.key?(:product_type_exclusion)
  @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_display_time_period = args[:promotion_display_time_period] if args.key?(:promotion_display_time_period)
  @promotion_effective_dates = args[:promotion_effective_dates] if args.key?(:promotion_effective_dates)
  @promotion_effective_time_period = args[:promotion_effective_time_period] if args.key?(:promotion_effective_time_period)
  @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