Class: Google::Apis::ContentV2_1::Amount

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

Returns a new instance of Amount.


1511
1512
1513
# File 'generated/google/apis/content_v2_1/classes.rb', line 1511

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

Instance Attribute Details

#price_amountGoogle::Apis::ContentV2_1::Price

[required] The pre-tax or post-tax price depending on the location of the order. Corresponds to the JSON property priceAmount


1504
1505
1506
# File 'generated/google/apis/content_v2_1/classes.rb', line 1504

def price_amount
  @price_amount
end

#tax_amountGoogle::Apis::ContentV2_1::Price

[required] Tax value. Corresponds to the JSON property taxAmount


1509
1510
1511
# File 'generated/google/apis/content_v2_1/classes.rb', line 1509

def tax_amount
  @tax_amount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1516
1517
1518
1519
# File 'generated/google/apis/content_v2_1/classes.rb', line 1516

def update!(**args)
  @price_amount = args[:price_amount] if args.key?(:price_amount)
  @tax_amount = args[:tax_amount] if args.key?(:tax_amount)
end