Class: LunchMoney::Objects::ChildTransaction

Inherits:
TransactionBase show all
Defined in:
lib/lunchmoney/objects/child_transaction.rb

Overview

Slimmed down version of lunchmoney.dev/#transaction-object used in the children field of a transaction object with an additional ‘formatted_date“ field

Instance Attribute Summary collapse

Attributes inherited from TransactionBase

#amount, #asset_id, #currency, #date, #id, #notes, #payee, #plaid_account_id, #to_base

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

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

Parameters:

  • id (Integer)
  • date (String)
  • amount (String)
  • currency (String)
  • to_base (Number)
  • payee (String)
  • formatted_date (String)
  • notes (String, nil) (defaults to: nil)
  • asset_id (Integer, nil) (defaults to: nil)
  • plaid_account_id (Integer, nil) (defaults to: nil)


28
29
30
31
32
# File 'lib/lunchmoney/objects/child_transaction.rb', line 28

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

Instance Attribute Details

#formatted_dateString

Returns:

  • (String)


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

def formatted_date
  @formatted_date
end