Class: Google::Apis::ContentV2_1::UnitInvoice

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) ⇒ UnitInvoice

Returns a new instance of UnitInvoice



8810
8811
8812
# File 'generated/google/apis/content_v2_1/classes.rb', line 8810

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

Instance Attribute Details

#additional_chargesArray<Google::Apis::ContentV2_1::UnitInvoiceAdditionalCharge>

Additional charges for a unit, e.g. shipping costs. Corresponds to the JSON property additionalCharges



8792
8793
8794
# File 'generated/google/apis/content_v2_1/classes.rb', line 8792

def additional_charges
  @additional_charges
end

#promotionsArray<Google::Apis::ContentV2_1::Promotion>

Promotions applied to a unit. Corresponds to the JSON property promotions



8797
8798
8799
# File 'generated/google/apis/content_v2_1/classes.rb', line 8797

def promotions
  @promotions
end

#unit_priceGoogle::Apis::ContentV2_1::Price

[required] Pre-tax or post-tax price of the unit depending on the locality of the order. Corresponds to the JSON property unitPrice



8803
8804
8805
# File 'generated/google/apis/content_v2_1/classes.rb', line 8803

def unit_price
  @unit_price
end

#unit_price_taxesArray<Google::Apis::ContentV2_1::UnitInvoiceTaxLine>

Tax amounts to apply to the unit price. Corresponds to the JSON property unitPriceTaxes



8808
8809
8810
# File 'generated/google/apis/content_v2_1/classes.rb', line 8808

def unit_price_taxes
  @unit_price_taxes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8815
8816
8817
8818
8819
8820
# File 'generated/google/apis/content_v2_1/classes.rb', line 8815

def update!(**args)
  @additional_charges = args[:additional_charges] if args.key?(:additional_charges)
  @promotions = args[:promotions] if args.key?(:promotions)
  @unit_price = args[:unit_price] if args.key?(:unit_price)
  @unit_price_taxes = args[:unit_price_taxes] if args.key?(:unit_price_taxes)
end