Class: Google::Apis::MerchantapiProductsV1beta::Price
- Inherits:
-
Object
- Object
- Google::Apis::MerchantapiProductsV1beta::Price
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb
Overview
The price represented as a number and currency.
Instance Attribute Summary collapse
-
#amount_micros ⇒ Fixnum
The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros).
-
#currency_code ⇒ String
The currency of the price using three-letter acronyms according to ISO 4217.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Price
constructor
A new instance of Price.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Price
Returns a new instance of Price.
1133 1134 1135 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1133 def initialize(**args) update!(**args) end |
Instance Attribute Details
#amount_micros ⇒ Fixnum
The price represented as a number in micros (1 million micros is an equivalent
to one's currency standard unit, for example, 1 USD = 1000000 micros).
Corresponds to the JSON property amountMicros
1125 1126 1127 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1125 def amount_micros @amount_micros end |
#currency_code ⇒ String
The currency of the price using three-letter acronyms according to ISO 4217.
Corresponds to the JSON property currencyCode
1131 1132 1133 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1131 def currency_code @currency_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1138 1139 1140 1141 |
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1138 def update!(**args) @amount_micros = args[:amount_micros] if args.key?(:amount_micros) @currency_code = args[:currency_code] if args.key?(:currency_code) end |