Class: Google::Apis::ContentV2_1::OrderPromotion
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::OrderPromotion
- Defined in:
- generated/google/apis/content_v2_1/classes.rb,
generated/google/apis/content_v2_1/representations.rb,
generated/google/apis/content_v2_1/representations.rb
Instance Attribute Summary collapse
-
#applicable_items ⇒ Array<Google::Apis::ContentV2_1::OrderPromotionItem>
Items which this promotion may be applied to.
-
#applied_items ⇒ Array<Google::Apis::ContentV2_1::OrderPromotionItem>
Items which this promotion have been applied to.
-
#end_time ⇒ String
Promotion end time in ISO 8601 format.
-
#funder ⇒ String
The party funding the promotion.
-
#merchant_promotion_id ⇒ String
This field is used to identify promotions within merchants' own systems.
-
#price_value ⇒ Google::Apis::ContentV2_1::Price
Estimated discount applied to price.
-
#short_title ⇒ String
A short title of the promotion to be shown on the checkout page.
-
#start_time ⇒ String
Promotion start time in ISO 8601 format.
-
#subtype ⇒ String
The category of the promotion.
-
#tax_value ⇒ Google::Apis::ContentV2_1::Price
Estimated discount applied to tax (if allowed by law).
-
#title ⇒ String
The title of the promotion.
-
#type ⇒ String
The scope of the promotion.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OrderPromotion
constructor
A new instance of OrderPromotion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ OrderPromotion
Returns a new instance of OrderPromotion
4384 4385 4386 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4384 def initialize(**args) update!(**args) end |
Instance Attribute Details
#applicable_items ⇒ Array<Google::Apis::ContentV2_1::OrderPromotionItem>
Items which this promotion may be applied to. If empty, there are no
restrictions on applicable items and quantity.
Corresponds to the JSON property applicableItems
4318 4319 4320 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4318 def applicable_items @applicable_items end |
#applied_items ⇒ Array<Google::Apis::ContentV2_1::OrderPromotionItem>
Items which this promotion have been applied to. Do not provide for orders.
createtestorder.
Corresponds to the JSON property appliedItems
4324 4325 4326 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4324 def applied_items @applied_items end |
#end_time ⇒ String
Promotion end time in ISO 8601 format. Date, time, and offset required, e.g., "
2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".
Corresponds to the JSON property endTime
4330 4331 4332 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4330 def end_time @end_time end |
#funder ⇒ String
The party funding the promotion. Only merchant is supported for orders.
createtestorder.
Corresponds to the JSON property funder
4336 4337 4338 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4336 def funder @funder end |
#merchant_promotion_id ⇒ String
This field is used to identify promotions within merchants' own systems.
Corresponds to the JSON property merchantPromotionId
4341 4342 4343 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4341 def merchant_promotion_id @merchant_promotion_id end |
#price_value ⇒ Google::Apis::ContentV2_1::Price
Estimated discount applied to price. Amount is pre-tax or post-tax depending
on location of order.
Corresponds to the JSON property priceValue
4347 4348 4349 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4347 def price_value @price_value end |
#short_title ⇒ String
A short title of the promotion to be shown on the checkout page. Do not
provide for orders.createtestorder.
Corresponds to the JSON property shortTitle
4353 4354 4355 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4353 def short_title @short_title end |
#start_time ⇒ String
Promotion start time in ISO 8601 format. Date, time, and offset required, e.g.,
"2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z".
Corresponds to the JSON property startTime
4359 4360 4361 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4359 def start_time @start_time end |
#subtype ⇒ String
The category of the promotion. Only moneyOff is supported for orders.
createtestorder.
Corresponds to the JSON property subtype
4365 4366 4367 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4365 def subtype @subtype end |
#tax_value ⇒ Google::Apis::ContentV2_1::Price
Estimated discount applied to tax (if allowed by law). Do not provide for
orders.createtestorder.
Corresponds to the JSON property taxValue
4371 4372 4373 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4371 def tax_value @tax_value end |
#title ⇒ String
The title of the promotion.
Corresponds to the JSON property title
4376 4377 4378 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4376 def title @title end |
#type ⇒ String
The scope of the promotion. Only product is supported for orders.
createtestorder.
Corresponds to the JSON property type
4382 4383 4384 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4382 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4389 def update!(**args) @applicable_items = args[:applicable_items] if args.key?(:applicable_items) @applied_items = args[:applied_items] if args.key?(:applied_items) @end_time = args[:end_time] if args.key?(:end_time) @funder = args[:funder] if args.key?(:funder) @merchant_promotion_id = args[:merchant_promotion_id] if args.key?(:merchant_promotion_id) @price_value = args[:price_value] if args.key?(:price_value) @short_title = args[:short_title] if args.key?(:short_title) @start_time = args[:start_time] if args.key?(:start_time) @subtype = args[:subtype] if args.key?(:subtype) @tax_value = args[:tax_value] if args.key?(:tax_value) @title = args[:title] if args.key?(:title) @type = args[:type] if args.key?(:type) end |