Class: Google::Apis::ContentV2_1::OrderLineItemAdjustment

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
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

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ OrderLineItemAdjustment

Returns a new instance of OrderLineItemAdjustment.



4616
4617
4618
# File 'generated/google/apis/content_v2_1/classes.rb', line 4616

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

Instance Attribute Details

#price_adjustmentGoogle::Apis::ContentV2_1::Price

Adjustment for total price of the line item. Corresponds to the JSON property priceAdjustment



4602
4603
4604
# File 'generated/google/apis/content_v2_1/classes.rb', line 4602

def price_adjustment
  @price_adjustment
end

#tax_adjustmentGoogle::Apis::ContentV2_1::Price

Adjustment for total tax of the line item. Corresponds to the JSON property taxAdjustment



4607
4608
4609
# File 'generated/google/apis/content_v2_1/classes.rb', line 4607

def tax_adjustment
  @tax_adjustment
end

#typeString

Type of this adjustment. Acceptable values are:

  • "promotion" Corresponds to the JSON property type

Returns:

  • (String)


4614
4615
4616
# File 'generated/google/apis/content_v2_1/classes.rb', line 4614

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4621
4622
4623
4624
4625
# File 'generated/google/apis/content_v2_1/classes.rb', line 4621

def update!(**args)
  @price_adjustment = args[:price_adjustment] if args.key?(:price_adjustment)
  @tax_adjustment = args[:tax_adjustment] if args.key?(:tax_adjustment)
  @type = args[:type] if args.key?(:type)
end