Class: LunchMoney::Objects::TransactionBase
- 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
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#asset_id ⇒ Object
Returns the value of attribute asset_id.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#date ⇒ Object
Returns the value of attribute date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#payee ⇒ Object
Returns the value of attribute payee.
-
#plaid_account_id ⇒ Object
Returns the value of attribute plaid_account_id.
-
#to_base ⇒ Object
Returns the value of attribute to_base.
Instance Method Summary collapse
-
#initialize(id:, date:, amount:, currency:, to_base:, payee:, notes: nil, asset_id: nil, plaid_account_id: nil) ⇒ TransactionBase
constructor
A new instance of TransactionBase.
Methods inherited from Object
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 = plaid_account_id end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
18 19 20 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18 def amount @amount end |
#asset_id ⇒ Object
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 |
#currency ⇒ Object
Returns the value of attribute currency.
18 19 20 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18 def currency @currency end |
#date ⇒ Object
Returns the value of attribute date.
18 19 20 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18 def date @date end |
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 9 def id @id end |
#notes ⇒ Object
Returns the value of attribute notes.
24 25 26 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 24 def notes @notes end |
#payee ⇒ Object
Returns the value of attribute payee.
18 19 20 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 18 def payee @payee end |
#plaid_account_id ⇒ Object
Returns the value of attribute plaid_account_id.
15 16 17 |
# File 'lib/lunchmoney/objects/transaction_base.rb', line 15 def plaid_account_id @plaid_account_id end |
#to_base ⇒ Object
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 |