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.



5767
5768
5769
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5767

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)


5753
5754
5755
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5753

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)


5759
5760
5761
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5759

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)


5765
5766
5767
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5765

def micros
  @micros
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5772
5773
5774
5775
5776
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5772

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