Class: Google::Apis::GanV1beta1::Money

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

Overview

An ApiMoneyProto.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Money

Returns a new instance of Money



1239
1240
1241
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 1239

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

Instance Attribute Details

#amountFloat

The amount of money. Corresponds to the JSON property amount

Returns:

  • (Float)


1232
1233
1234
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 1232

def amount
  @amount
end

#currency_codeString

The 3-letter code of the currency in question. Corresponds to the JSON property currencyCode

Returns:

  • (String)


1237
1238
1239
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 1237

def currency_code
  @currency_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1244
1245
1246
1247
# File 'generated/google/apis/gan_v1beta1/classes.rb', line 1244

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