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.
-
#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.
-
#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
4283 4284 4285 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4283 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
4235 4236 4237 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4235 def applicable_items @applicable_items end |
#applied_items ⇒ Array<Google::Apis::ContentV2_1::OrderPromotionItem>
Items which this promotion have been applied to.
Corresponds to the JSON property appliedItems
4240 4241 4242 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4240 def applied_items @applied_items end |
#funder ⇒ String
The party funding the promotion.
Corresponds to the JSON property funder
4245 4246 4247 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4245 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
4250 4251 4252 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4250 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
4256 4257 4258 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4256 def price_value @price_value end |
#short_title ⇒ String
A short title of the promotion to be shown on the checkout page.
Corresponds to the JSON property shortTitle
4261 4262 4263 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4261 def short_title @short_title end |
#subtype ⇒ String
The category of the promotion.
Corresponds to the JSON property subtype
4266 4267 4268 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4266 def subtype @subtype end |
#tax_value ⇒ Google::Apis::ContentV2_1::Price
Estimated discount applied to tax (if allowed by law).
Corresponds to the JSON property taxValue
4271 4272 4273 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4271 def tax_value @tax_value end |
#title ⇒ String
The title of the promotion.
Corresponds to the JSON property title
4276 4277 4278 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4276 def title @title end |
#type ⇒ String
The scope of the promotion.
Corresponds to the JSON property type
4281 4282 4283 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4281 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 |
# File 'generated/google/apis/content_v2_1/classes.rb', line 4288 def update!(**args) @applicable_items = args[:applicable_items] if args.key?(:applicable_items) @applied_items = args[:applied_items] if args.key?(:applied_items) @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) @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 |