Class: Google::Apis::ContentV2sandbox::UnitInvoice

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



3968
3969
3970
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3968

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

Instance Attribute Details

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

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



3951
3952
3953
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3951

def additional_charges
  @additional_charges
end

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

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



3956
3957
3958
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3956

def promotions
  @promotions
end

#unit_price_pretaxGoogle::Apis::ContentV2sandbox::Price

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



3961
3962
3963
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3961

def unit_price_pretax
  @unit_price_pretax
end

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

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



3966
3967
3968
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3966

def unit_price_taxes
  @unit_price_taxes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3973
3974
3975
3976
3977
3978
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 3973

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