Class: LunchMoney::Objects::Split

Inherits:
TransactionModificationBase show all
Defined in:
lib/lunchmoney/objects/split.rb

Overview

Object used to split a transaction when updating https://lunchmoney.dev/#update-transaction

Instance Attribute Summary collapse

Attributes inherited from TransactionModificationBase

#category_id, #date, #notes, #payee

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

#initialize(amount:, payee: nil, date: nil, category_id: nil, notes: nil) ⇒ Split

Returns a new instance of Split.



22
23
24
25
# File 'lib/lunchmoney/objects/split.rb', line 22

def initialize(amount:, payee: nil, date: nil, category_id: nil, notes: nil)
  super(payee:, date:, category_id:, notes:)
  @amount = amount
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



11
12
13
# File 'lib/lunchmoney/objects/split.rb', line 11

def amount
  @amount
end