Class: LunchMoney::Objects::CryptoBase
- Includes:
- Validators
- Defined in:
- lib/lunchmoney/objects/crypto_base.rb
Overview
Direct Known Subclasses
Constant Summary collapse
- VALID_SOURCES =
Valid crypto source types
T.let( [ "synced", "manual", ], T::Array[String], )
Instance Attribute Summary collapse
-
#balance ⇒ Object
Returns the value of attribute balance.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#institution_name ⇒ Object
Returns the value of attribute institution_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#source ⇒ Object
Returns the value of attribute source.
-
#zabo_account_id ⇒ Object
Returns the value of attribute zabo_account_id.
Instance Method Summary collapse
-
#initialize(created_at:, source:, name:, balance:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil) ⇒ CryptoBase
constructor
A new instance of CryptoBase.
Methods included from Validators
#validate_iso8601!, #validate_one_of!
Methods inherited from Object
Constructor Details
#initialize(created_at:, source:, name:, balance:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil) ⇒ CryptoBase
Returns a new instance of CryptoBase.
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 43 def initialize(created_at:, source:, name:, balance:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil) super() @created_at = T.let(validate_iso8601!(created_at), String) @source = T.let(validate_one_of!(source, VALID_SOURCES), String) @name = name @balance = balance @institution_name = institution_name @id = id @zabo_account_id = zabo_account_id @display_name = display_name end |
Instance Attribute Details
#balance ⇒ Object
Returns the value of attribute balance.
17 18 19 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 17 def balance @balance end |
#created_at ⇒ Object
Returns the value of attribute created_at.
14 15 16 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 14 def created_at @created_at end |
#display_name ⇒ Object
Returns the value of attribute display_name.
20 21 22 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 20 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 11 def id @id end |
#institution_name ⇒ Object
Returns the value of attribute institution_name.
20 21 22 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 20 def institution_name @institution_name end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 17 def name @name end |
#source ⇒ Object
Returns the value of attribute source.
14 15 16 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 14 def source @source end |
#zabo_account_id ⇒ Object
Returns the value of attribute zabo_account_id.
11 12 13 |
# File 'lib/lunchmoney/objects/crypto_base.rb', line 11 def zabo_account_id @zabo_account_id end |