Class: FinchAPI::Models::Money
- Defined in:
- lib/finch-api/models/money.rb
Instance Attribute Summary collapse
-
#amount ⇒ Integer?
Amount for money object (in cents).
- #currency ⇒ String?
Instance Method Summary collapse
-
#initialize(amount: nil, currency: nil) ⇒ Money
constructor
A new instance of Money.
Methods inherited from BaseModel
==, #==, #[], coerce, #deconstruct_keys, dump, fields, #inspect, known_fields, optional, required, #to_h
Methods included from Converter
#coerce, coerce, #dump, dump, type_info
Constructor Details
#initialize(amount: nil, currency: nil) ⇒ Money
Returns a new instance of Money.
4 |
# File 'lib/finch-api/models/money.rb', line 4 def initialize(amount: nil, currency: nil, **) = super |
Instance Attribute Details
#amount ⇒ Integer?
Amount for money object (in cents)
10 |
# File 'lib/finch-api/models/money.rb', line 10 optional :amount, Integer, nil?: true |
#currency ⇒ String?
15 |
# File 'lib/finch-api/models/money.rb', line 15 optional :currency, String |