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

Constructor Details

#initialize(**args) ⇒ MonetaryAmount

Returns a new instance of MonetaryAmount.



4368
4369
4370
# File 'generated/google/apis/content_v2_1/classes.rb', line 4368

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



4360
4361
4362
# File 'generated/google/apis/content_v2_1/classes.rb', line 4360

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



4366
4367
4368
# File 'generated/google/apis/content_v2_1/classes.rb', line 4366

def tax_amount
  @tax_amount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4373
4374
4375
4376
# File 'generated/google/apis/content_v2_1/classes.rb', line 4373

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