Class: LunchMoney::Objects::CryptoBase
Overview
Direct Known Subclasses
Crypto
Constant Summary
collapse
- VALID_SOURCES =
Valid crypto source types
T.let(
[
"synced",
"manual",
],
T::Array[String],
)
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Validators
#validate_iso8601!, #validate_one_of!
Methods inherited from Object
#serialize
Constructor Details
#initialize(created_at:, source:, name:, balance:, institution_name: nil, id: nil, zabo_account_id: nil, display_name: nil) ⇒ void
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 ⇒ String
17
18
19
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 17
def balance
@balance
end
|
#created_at ⇒ String
14
15
16
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 14
def created_at
@created_at
end
|
#display_name ⇒ String?
20
21
22
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 20
def display_name
@display_name
end
|
#id ⇒ Integer?
11
12
13
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 11
def id
@id
end
|
#institution_name ⇒ String?
20
21
22
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 20
def institution_name
@institution_name
end
|
#name ⇒ String
17
18
19
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 17
def name
@name
end
|
#source ⇒ String
14
15
16
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 14
def source
@source
end
|
#zabo_account_id ⇒ Integer?
11
12
13
|
# File 'lib/lunchmoney/objects/crypto_base.rb', line 11
def zabo_account_id
@zabo_account_id
end
|