Class: LunchMoney::Objects::RecurringExpense

Inherits:
RecurringExpenseBase show all
Defined in:
lib/lunchmoney/objects/recurring_expense.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from RecurringExpenseBase

#amount, #currency, #payee, #to_base

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

#initialize(cadence:, payee:, amount:, currency:, billing_date:, type:, source:, id:, created_at:, category_id: nil, start_date: nil, end_date: nil, description: nil, original_name: nil, plaid_account_id: nil, asset_id: nil, transaction_id: nil, to_base: nil) ⇒ void

Parameters:

  • cadence (String)
  • payee (String)
  • amount (String)
  • currency (String)
  • billing_date (String)
  • type (String)
  • source (String)
  • id (Integer)
  • created_at (String)
  • category_id (Integer, nil) (defaults to: nil)
  • start_date (String, nil) (defaults to: nil)
  • end_date (String, nil) (defaults to: nil)
  • description (String, nil) (defaults to: nil)
  • original_name (String, nil) (defaults to: nil)
  • plaid_account_id (Integer, nil) (defaults to: nil)
  • asset_id (Integer, nil) (defaults to: nil)
  • transaction_id (Integer, nil) (defaults to: nil)
  • to_base (Number, nil) (defaults to: nil)


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 43

def initialize(cadence:, payee:, amount:, currency:, billing_date:, type:, source:, id:, created_at:,
  category_id: nil, start_date: nil, end_date: nil, description: nil, original_name: nil, plaid_account_id: nil,
  asset_id: nil, transaction_id: nil, to_base: nil)
  super(payee:, amount:, currency:, to_base:)
  @cadence = cadence
  @payee = payee
  @amount = amount
  @currency = currency
  @billing_date = billing_date
  @type = type
  @source = source
  @id = id
  @category_id = category_id
  @created_at = created_at
  @start_date = start_date
  @end_date = end_date
  @description = description
  @original_name = original_name
  @plaid_account_id = 
  @asset_id = asset_id
  @transaction_id = transaction_id
  @to_base = to_base
end

Instance Attribute Details

#asset_idInteger?

Returns:

  • (Integer, nil)


19
20
21
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 19

def asset_id
  @asset_id
end

#billing_dateString

Returns:

  • (String)


16
17
18
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 16

def billing_date
  @billing_date
end

#cadenceString

Returns:

  • (String)


16
17
18
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 16

def cadence
  @cadence
end

#category_idInteger?

Returns:

  • (Integer, nil)


19
20
21
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 19

def category_id
  @category_id
end

#created_atString

Returns:

  • (String)


16
17
18
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 16

def created_at
  @created_at
end

#descriptionString?

Returns:

  • (String, nil)


13
14
15
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 13

def description
  @description
end

#end_dateString?

Returns:

  • (String, nil)


13
14
15
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 13

def end_date
  @end_date
end

#idInteger

Returns:

  • (Integer)


10
11
12
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 10

def id
  @id
end

#original_nameString?

Returns:

  • (String, nil)


13
14
15
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 13

def original_name
  @original_name
end

#plaid_account_idInteger?

Returns:

  • (Integer, nil)


19
20
21
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 19

def 
  @plaid_account_id
end

#sourceString

Returns:

  • (String)


16
17
18
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 16

def source
  @source
end

#start_dateString?

Returns:

  • (String, nil)


13
14
15
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 13

def start_date
  @start_date
end

#transaction_idInteger?

Returns:

  • (Integer, nil)


19
20
21
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 19

def transaction_id
  @transaction_id
end

#typeString

Returns:

  • (String)


16
17
18
# File 'lib/lunchmoney/objects/recurring_expense.rb', line 16

def type
  @type
end