Class: LunchMoney::Objects::UpdateTransaction

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

Overview

object used when updating a transaction 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(tags: nil, category_id: nil, payee: nil, amount: nil, currency: nil, asset_id: nil, recurring_id: nil, notes: nil, status: nil, external_id: nil, date: nil) ⇒ UpdateTransaction

Returns a new instance of UpdateTransaction.



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/lunchmoney/objects/update_transaction.rb', line 34

def initialize(tags: nil, category_id: nil, payee: nil, amount: nil, currency: nil, asset_id: nil,
  recurring_id: nil, notes: nil, status: nil, external_id: nil, date: nil)
  super(payee:, date:, category_id:, notes:)
  @amount = amount
  @tags = tags
  @currency = currency
  @asset_id = asset_id
  @recurring_id = recurring_id
  @status = status
  @external_id = external_id
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



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

def amount
  @amount
end

#asset_idObject

Returns the value of attribute asset_id.



14
15
16
# File 'lib/lunchmoney/objects/update_transaction.rb', line 14

def asset_id
  @asset_id
end

#currencyObject

Returns the value of attribute currency.



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

def currency
  @currency
end

#external_idObject

Returns the value of attribute external_id.



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

def external_id
  @external_id
end

#recurring_idObject

Returns the value of attribute recurring_id.



14
15
16
# File 'lib/lunchmoney/objects/update_transaction.rb', line 14

def recurring_id
  @recurring_id
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#tagsObject

Returns the value of attribute tags.



17
18
19
# File 'lib/lunchmoney/objects/update_transaction.rb', line 17

def tags
  @tags
end