Class: LunchMoney::Objects::Crypto
- Inherits:
-
CryptoBase
- Object
- Object
- CryptoBase
- LunchMoney::Objects::Crypto
- Includes:
- Validators
- Defined in:
- lib/lunchmoney/objects/crypto.rb
Overview
Constant Summary
Constants inherited from CryptoBase
LunchMoney::Objects::CryptoBase::VALID_SOURCES
Instance Attribute Summary collapse
Attributes inherited from CryptoBase
#balance, #created_at, #display_name, #id, #institution_name, #name, #source, #zabo_account_id
Instance Method Summary collapse
Methods included from Validators
#validate_iso8601!, #validate_one_of!
Methods inherited from Object
Constructor Details
#initialize(created_at:, source:, name:, balance:, balance_as_of:, currency:, status:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil, to_base: nil) ⇒ void
36 37 38 39 40 41 42 43 |
# File 'lib/lunchmoney/objects/crypto.rb', line 36 def initialize(created_at:, source:, name:, balance:, balance_as_of:, currency:, status:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil, to_base: nil) super(created_at:, source:, name:, balance:, institution_name:, id:, zabo_account_id:, display_name:) @balance_as_of = T.let(validate_iso8601!(balance_as_of), String) @currency = currency @status = status @to_base = to_base end |
Instance Attribute Details
#balance_as_of ⇒ String
12 13 14 |
# File 'lib/lunchmoney/objects/crypto.rb', line 12 def balance_as_of @balance_as_of end |
#currency ⇒ String
15 16 17 |
# File 'lib/lunchmoney/objects/crypto.rb', line 15 def currency @currency end |
#status ⇒ String
15 16 17 |
# File 'lib/lunchmoney/objects/crypto.rb', line 15 def status @status end |
#to_base ⇒ Number?
18 19 20 |
# File 'lib/lunchmoney/objects/crypto.rb', line 18 def to_base @to_base end |