Class: Google::Apis::WalletobjectsV1::Money

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Money

Returns a new instance of Money.



6195
6196
6197
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6195

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

Instance Attribute Details

#currency_codeString

The currency code, such as "USD" or "EUR." Corresponds to the JSON property currencyCode

Returns:

  • (String)


6181
6182
6183
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6181

def currency_code
  @currency_code
end

#kindString

Identifies what kind of resource this is. Value: the fixed string " walletobjects#money". Corresponds to the JSON property kind

Returns:

  • (String)


6187
6188
6189
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6187

def kind
  @kind
end

#microsFixnum

The unit of money amount in micros. For example, $1 USD would be represented as 1000000 micros. Corresponds to the JSON property micros

Returns:

  • (Fixnum)


6193
6194
6195
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6193

def micros
  @micros
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6200
6201
6202
6203
6204
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6200

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