Class: Google::Apis::MerchantapiAccountsV1beta::Price

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

Overview

The price represented as a number and currency.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Price

Returns a new instance of Price.



1876
1877
1878
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1876

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

Instance Attribute Details

#amount_microsFixnum

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

Returns:

  • (Fixnum)


1868
1869
1870
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1868

def amount_micros
  @amount_micros
end

#currency_codeString

The currency of the price using three-letter acronyms according to ISO 4217. Corresponds to the JSON property currencyCode

Returns:

  • (String)


1874
1875
1876
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1874

def currency_code
  @currency_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1881
1882
1883
1884
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 1881

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