Class: Google::Apis::ContentV2::OrderLegacyPromotionBenefit
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2::OrderLegacyPromotionBenefit
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2/classes.rb,
lib/google/apis/content_v2/representations.rb,
lib/google/apis/content_v2/representations.rb
Instance Attribute Summary collapse
-
#discount ⇒ Google::Apis::ContentV2::Price
The discount in the order price when the promotion is applied.
-
#offer_ids ⇒ Array<String>
The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion.
-
#sub_type ⇒ String
Further describes the benefit of the promotion.
-
#tax_impact ⇒ Google::Apis::ContentV2::Price
The impact on tax when the promotion is applied.
-
#type ⇒ String
Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping).
Instance Method Summary collapse
-
#initialize(**args) ⇒ OrderLegacyPromotionBenefit
constructor
A new instance of OrderLegacyPromotionBenefit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OrderLegacyPromotionBenefit
Returns a new instance of OrderLegacyPromotionBenefit.
4309 4310 4311 |
# File 'lib/google/apis/content_v2/classes.rb', line 4309 def initialize(**args) update!(**args) end |
Instance Attribute Details
#discount ⇒ Google::Apis::ContentV2::Price
The discount in the order price when the promotion is applied.
Corresponds to the JSON property discount
4278 4279 4280 |
# File 'lib/google/apis/content_v2/classes.rb', line 4278 def discount @discount end |
#offer_ids ⇒ Array<String>
The OfferId(s) that were purchased in this order and map to this specific
benefit of the promotion.
Corresponds to the JSON property offerIds
4284 4285 4286 |
# File 'lib/google/apis/content_v2/classes.rb', line 4284 def offer_ids @offer_ids end |
#sub_type ⇒ String
Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. Acceptable values are:
- "
buyMGetMoneyOff
" - "buyMGetNMoneyOff
" - "buyMGetNPercentOff
" - "buyMGetPercentOff
" - "freeGift
" - "freeGiftWithItemId
" - "freeGiftWithValue
" - "freeOvernightShipping
" - "freeShipping
" - "freeTwoDayShipping
" - "moneyOff
" - "percentageOff
" - "rewardPoints
" - "salePrice
" Corresponds to the JSON propertysubType
4295 4296 4297 |
# File 'lib/google/apis/content_v2/classes.rb', line 4295 def sub_type @sub_type end |
#tax_impact ⇒ Google::Apis::ContentV2::Price
The impact on tax when the promotion is applied.
Corresponds to the JSON property taxImpact
4300 4301 4302 |
# File 'lib/google/apis/content_v2/classes.rb', line 4300 def tax_impact @tax_impact end |
#type ⇒ String
Describes whether the promotion applies to products (e.g. 20% off) or to
shipping (e.g. Free Shipping). Acceptable values are: - "product
" - "
shipping
"
Corresponds to the JSON property type
4307 4308 4309 |
# File 'lib/google/apis/content_v2/classes.rb', line 4307 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4314 4315 4316 4317 4318 4319 4320 |
# File 'lib/google/apis/content_v2/classes.rb', line 4314 def update!(**args) @discount = args[:discount] if args.key?(:discount) @offer_ids = args[:offer_ids] if args.key?(:offer_ids) @sub_type = args[:sub_type] if args.key?(:sub_type) @tax_impact = args[:tax_impact] if args.key?(:tax_impact) @type = args[:type] if args.key?(:type) end |