Class: Google::Apis::ContentV2::UnitInvoice

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/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



10771
10772
10773
# File 'generated/google/apis/content_v2/classes.rb', line 10771

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

Instance Attribute Details

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

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



10754
10755
10756
# File 'generated/google/apis/content_v2/classes.rb', line 10754

def additional_charges
  @additional_charges
end

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

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



10759
10760
10761
# File 'generated/google/apis/content_v2/classes.rb', line 10759

def promotions
  @promotions
end

#unit_price_pretaxGoogle::Apis::ContentV2::Price

[required] Price of the unit, before applying taxes. Corresponds to the JSON property unitPricePretax



10764
10765
10766
# File 'generated/google/apis/content_v2/classes.rb', line 10764

def unit_price_pretax
  @unit_price_pretax
end

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

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



10769
10770
10771
# File 'generated/google/apis/content_v2/classes.rb', line 10769

def unit_price_taxes
  @unit_price_taxes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10776
10777
10778
10779
10780
10781
# File 'generated/google/apis/content_v2/classes.rb', line 10776

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