class Google::Apis::ContentV2::OrderPromotionBenefit

Attributes

discount[RW]

The discount in the order price when the promotion is applied. Corresponds to the JSON property `discount` @return [Google::Apis::ContentV2::Price]

offer_ids[RW]

The OfferId(s) that were purchased in this order and map to this specific benefit of the promotion. Corresponds to the JSON property `offerIds` @return [Array<String>]

sub_type[RW]

Further describes the benefit of the promotion. Note that we will expand on this enumeration as we support new promotion sub-types. Corresponds to the JSON property `subType` @return [String]

tax_impact[RW]

The impact on tax when the promotion is applied. Corresponds to the JSON property `taxImpact` @return [Google::Apis::ContentV2::Price]

type[RW]

Describes whether the promotion applies to products (e.g. 20% off) or to shipping (e.g. Free Shipping). Corresponds to the JSON property `type` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/content_v2/classes.rb, line 3293
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/content_v2/classes.rb, line 3298
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