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.



6069
6070
6071
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6069

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)


6055
6056
6057
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6055

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)


6061
6062
6063
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6061

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)


6067
6068
6069
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6067

def micros
  @micros
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6074
6075
6076
6077
6078
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6074

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