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.



5890
5891
5892
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5890

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)


5876
5877
5878
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5876

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)


5882
5883
5884
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5882

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)


5888
5889
5890
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5888

def micros
  @micros
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5895
5896
5897
5898
5899
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5895

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