Class: Google::Apis::ContentV2_1::MonetaryAmount

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

Returns a new instance of MonetaryAmount.



3992
3993
3994
# File 'generated/google/apis/content_v2_1/classes.rb', line 3992

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

Instance Attribute Details

#price_amountGoogle::Apis::ContentV2_1::Price

The pre-tax or post-tax price depends on the location of the order. - For countries (e.g. US) where price attribute excludes tax, this field corresponds to the pre-tax value. - For coutries (e.g. France) where price attribute includes tax, this field corresponds to the post-tax value . Corresponds to the JSON property priceAmount



3984
3985
3986
# File 'generated/google/apis/content_v2_1/classes.rb', line 3984

def price_amount
  @price_amount
end

#tax_amountGoogle::Apis::ContentV2_1::Price

Tax value, present only for countries where price attribute excludes tax (e.g. US). No tax is referenced as 0 value with the corresponding currency. Corresponds to the JSON property taxAmount



3990
3991
3992
# File 'generated/google/apis/content_v2_1/classes.rb', line 3990

def tax_amount
  @tax_amount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3997
3998
3999
4000
# File 'generated/google/apis/content_v2_1/classes.rb', line 3997

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