Class: LunchMoney::Objects::TransactionBase

Inherits:
Object
  • Object
show all
Defined in:
lib/lunchmoney/objects/transaction_base.rb

Overview

Slimmed down version of https://lunchmoney.dev/#transaction-object used as a base for other transaction objects

Direct Known Subclasses

ChildTransaction, Transaction

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

#initialize(id:, date:, amount:, currency:, to_base:, payee:, notes: nil, asset_id: nil, plaid_account_id: nil) ⇒ TransactionBase

Returns a new instance of TransactionBase.



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/lunchmoney/objects/transaction_base.rb', line 39

def initialize(id:, date:, amount:, currency:, to_base:, payee:, notes: nil, asset_id: nil,
  plaid_account_id: nil)
  super()
  @id = id
  @date = date
  @amount = amount
  @currency = currency
  @to_base = to_base
  @payee = payee
  @notes = notes
  @asset_id = asset_id
  @plaid_account_id = 
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



18
19
20
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18

def amount
  @amount
end

#asset_idObject

Returns the value of attribute asset_id.



15
16
17
# File 'lib/lunchmoney/objects/transaction_base.rb', line 15

def asset_id
  @asset_id
end

#currencyObject

Returns the value of attribute currency.



18
19
20
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18

def currency
  @currency
end

#dateObject

Returns the value of attribute date.



18
19
20
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18

def date
  @date
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/lunchmoney/objects/transaction_base.rb', line 9

def id
  @id
end

#notesObject

Returns the value of attribute notes.



24
25
26
# File 'lib/lunchmoney/objects/transaction_base.rb', line 24

def notes
  @notes
end

#payeeObject

Returns the value of attribute payee.



18
19
20
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18

def payee
  @payee
end

#plaid_account_idObject

Returns the value of attribute plaid_account_id.



15
16
17
# File 'lib/lunchmoney/objects/transaction_base.rb', line 15

def 
  @plaid_account_id
end

#to_baseObject

Returns the value of attribute to_base.



12
13
14
# File 'lib/lunchmoney/objects/transaction_base.rb', line 12

def to_base
  @to_base
end