Class: LunchMoney::Objects::UpdateTransaction

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

Overview

object used when updating a transaction 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) ⇒ void

Parameters:

  • tags (Array<String, Integer>, nil) (defaults to: nil)
  • category_id (Integer, nil) (defaults to: nil)
  • payee (String, nil) (defaults to: nil)
  • amount (String, nil) (defaults to: nil)
  • currency (String, nil) (defaults to: nil)
  • asset_id (Integer, nil) (defaults to: nil)
  • recurring_id (Integer, nil) (defaults to: nil)
  • notes (String, nil) (defaults to: nil)
  • status (String, nil) (defaults to: nil)
  • external_id (String, nil) (defaults to: nil)
  • date (String, nil) (defaults to: nil)


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

#amountString?

Returns:

  • (String, nil)


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

def amount
  @amount
end

#asset_idInteger?

Returns:

  • (Integer, nil)


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

def asset_id
  @asset_id
end

#currencyString?

Returns:

  • (String, nil)


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

def currency
  @currency
end

#external_idString?

Returns:

  • (String, nil)


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

def external_id
  @external_id
end

#recurring_idInteger?

Returns:

  • (Integer, nil)


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

def recurring_id
  @recurring_id
end

#statusString?

Returns:

  • (String, nil)


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

def status
  @status
end

#tagsArray<String, Integer>?

Returns:

  • (Array<String, Integer>, nil)


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

def tags
  @tags
end