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.



4804
4805
4806
# File 'lib/google/apis/content_v2_1/classes.rb', line 4804

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



4796
4797
4798
# File 'lib/google/apis/content_v2_1/classes.rb', line 4796

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



4802
4803
4804
# File 'lib/google/apis/content_v2_1/classes.rb', line 4802

def tax_amount
  @tax_amount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4809
4810
4811
4812
# File 'lib/google/apis/content_v2_1/classes.rb', line 4809

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