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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MonetaryAmount

Returns a new instance of MonetaryAmount.



5199
5200
5201
# File 'lib/google/apis/content_v2_1/classes.rb', line 5199

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



5191
5192
5193
# File 'lib/google/apis/content_v2_1/classes.rb', line 5191

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



5197
5198
5199
# File 'lib/google/apis/content_v2_1/classes.rb', line 5197

def tax_amount
  @tax_amount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5204
5205
5206
5207
# File 'lib/google/apis/content_v2_1/classes.rb', line 5204

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