Class: LunchMoney::Objects::Transaction

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

Overview

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:, is_income:, exclude_from_budget:, exclude_from_totals:, created_at:, updated_at:, status:, is_pending:, has_children:, is_group:, source:, display_name:, account_display_name:, tags:, category_id: nil, category_name: nil, category_group_id: nil, category_group_name: nil, notes: nil, original_name: nil, recurring_id: nil, recurring_payee: nil, recurring_description: nil, recurring_cadence: nil, recurring_type: nil, recurring_amount: nil, recurring_currency: nil, parent_id: nil, group_id: nil, asset_id: nil, asset_institution_name: nil, asset_name: nil, asset_display_name: nil, asset_status: nil, plaid_account_id: nil, plaid_account_name: nil, plaid_account_mask: nil, institution_name: nil, plaid_account_display_name: nil, plaid_metadata: nil, display_notes: nil, external_id: nil, children: nil, recurring_granularity: nil, recurring_quantity: nil) ⇒ void

Parameters:

  • id (Integer)
  • date (String)
  • amount (String)
  • currency (String)
  • to_base (Number)
  • payee (String)
  • is_income (Boolean)
  • exclude_from_budget (Boolean)
  • exclude_from_totals (Boolean)
  • created_at (String)
  • updated_at (String)
  • status (String)
  • is_pending (Boolean)
  • has_children (Boolean)
  • is_group (Boolean)
  • source (String)
  • display_name (String)
  • account_display_name (String)
  • tags (Array<LunchMoney::Objects::TagBase>)
  • category_id (Integer, nil) (defaults to: nil)
  • category_name (String, nil) (defaults to: nil)
  • category_group_id (Integer, nil) (defaults to: nil)
  • category_group_name (String, nil) (defaults to: nil)
  • notes (String, nil) (defaults to: nil)
  • original_name (String, nil) (defaults to: nil)
  • recurring_id (Integer, nil) (defaults to: nil)
  • recurring_payee (String, nil) (defaults to: nil)
  • recurring_description (String, nil) (defaults to: nil)
  • recurring_cadence (String, nil) (defaults to: nil)
  • recurring_type (String, nil) (defaults to: nil)
  • recurring_amount (String, nil) (defaults to: nil)
  • recurring_currency (String, nil) (defaults to: nil)
  • parent_id (Integer, nil) (defaults to: nil)
  • group_id (Integer, nil) (defaults to: nil)
  • asset_id (Integer, nil) (defaults to: nil)
  • asset_institution_name (String, nil) (defaults to: nil)
  • asset_name (String, nil) (defaults to: nil)
  • asset_display_name (String, nil) (defaults to: nil)
  • asset_status (String, nil) (defaults to: nil)
  • plaid_account_id (Integer, nil) (defaults to: nil)
  • plaid_account_name (String, nil) (defaults to: nil)
  • plaid_account_mask (String, nil) (defaults to: nil)
  • institution_name (String, nil) (defaults to: nil)
  • plaid_account_display_name (String, nil) (defaults to: nil)
  • plaid_metadata (String, nil) (defaults to: nil)
  • display_notes (String, nil) (defaults to: nil)
  • external_id (Integer, nil) (defaults to: nil)
  • children (Array<LunchMoney::Objects::ChildTransaction>, nil) (defaults to: nil)
  • recurring_granularity (T.untyped) (defaults to: nil)
  • recurring_quantity (T.untyped) (defaults to: nil)


114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/lunchmoney/objects/transaction.rb', line 114

def initialize(id:, date:, amount:, currency:, to_base:, payee:, is_income:, exclude_from_budget:,
  exclude_from_totals:, created_at:, updated_at:, status:, is_pending:, has_children:, is_group:, source:,
  display_name:, account_display_name:, tags:, category_id: nil, category_name: nil, category_group_id: nil,
  category_group_name: nil, notes: nil, original_name: nil, recurring_id: nil, recurring_payee: nil,
  recurring_description: nil, recurring_cadence: nil, recurring_type: nil, recurring_amount: nil,
  recurring_currency: nil, parent_id: nil, group_id: nil, asset_id: nil, asset_institution_name: nil,
  asset_name: nil, asset_display_name: nil, asset_status: nil, plaid_account_id: nil, plaid_account_name: nil,
  plaid_account_mask: nil, institution_name: nil, plaid_account_display_name: nil, plaid_metadata: nil,
  display_notes: nil, external_id: nil, children: nil, recurring_granularity: nil, recurring_quantity: nil)
  super(id:, date:, amount:, currency:, to_base:, payee:, notes:, asset_id:, plaid_account_id:)
  @is_income = is_income
  @exclude_from_budget = exclude_from_budget
  @exclude_from_totals = exclude_from_totals
  @created_at = created_at
  @updated_at = updated_at
  @status = status
  @is_pending = is_pending
  @has_children = has_children
  @is_group = is_group
  @source = source
  @display_name = display_name
  @account_display_name = 
  @tags = tags
  @category_id = category_id
  @category_name = category_name
  @category_group_id = category_group_id
  @category_group_name = category_group_name
  @original_name = original_name
  @recurring_id = recurring_id
  @recurring_payee = recurring_payee
  @recurring_description = recurring_description
  @recurring_cadence = recurring_cadence
  @recurring_type = recurring_type
  @recurring_amount = recurring_amount
  @recurring_currency = recurring_currency
  @parent_id = parent_id
  @group_id = group_id
  @asset_institution_name = asset_institution_name
  @asset_name = asset_name
  @asset_display_name = asset_display_name
  @asset_status = asset_status
  @plaid_account_name = 
  @plaid_account_mask = 
  @institution_name = institution_name
  @plaid_account_display_name = 
  @plaid_metadata = 
  @display_notes = display_notes
  @children = children
  @external_id = external_id
  @recurring_granularity = recurring_granularity
  @recurring_quantity = recurring_quantity
end

Instance Attribute Details

#account_display_nameString

Returns:

  • (String)


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

def 
  @account_display_name
end

#asset_display_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def asset_display_name
  @asset_display_name
end

#asset_institution_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def asset_institution_name
  @asset_institution_name
end

#asset_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def asset_name
  @asset_name
end

#asset_statusString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def asset_status
  @asset_status
end

#category_group_idInteger?

Returns:

  • (Integer, nil)


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

def category_group_id
  @category_group_id
end

#category_group_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def category_group_name
  @category_group_name
end

#category_idInteger?

Returns:

  • (Integer, nil)


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

def category_id
  @category_id
end

#category_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def category_name
  @category_name
end

#childrenArray<LunchMoney::Objects::ChildTransaction>?

Returns:



54
55
56
# File 'lib/lunchmoney/objects/transaction.rb', line 54

def children
  @children
end

#created_atString

Returns:

  • (String)


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

def created_at
  @created_at
end

#display_nameString

Returns:

  • (String)


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

def display_name
  @display_name
end

#display_notesString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def display_notes
  @display_notes
end

#exclude_from_budgetBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def exclude_from_budget
  @exclude_from_budget
end

#exclude_from_totalsBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def exclude_from_totals
  @exclude_from_totals
end

#external_idInteger?

Returns:

  • (Integer, nil)


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

def external_id
  @external_id
end

#group_idInteger?

Returns:

  • (Integer, nil)


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

def group_id
  @group_id
end

#has_childrenBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def has_children
  @has_children
end

#institution_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def institution_name
  @institution_name
end

#is_groupBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def is_group
  @is_group
end

#is_incomeBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def is_income
  @is_income
end

#is_pendingBoolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/lunchmoney/objects/transaction.rb', line 48

def is_pending
  @is_pending
end

#original_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def original_name
  @original_name
end

#parent_idInteger?

Returns:

  • (Integer, nil)


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

def parent_id
  @parent_id
end

#plaid_account_display_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def 
  @plaid_account_display_name
end

#plaid_account_maskString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def 
  @plaid_account_mask
end

#plaid_account_nameString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def 
  @plaid_account_name
end

#plaid_metadataString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def 
  @plaid_metadata
end

#recurring_amountString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_amount
  @recurring_amount
end

#recurring_cadenceString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_cadence
  @recurring_cadence
end

#recurring_currencyString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_currency
  @recurring_currency
end

#recurring_descriptionString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_description
  @recurring_description
end

#recurring_granularityT.untyped

TODO: Fix types when I have a response on what they should be github.com/mmenanno/lunchmoney/issues/329

Returns:

  • (T.untyped)


58
59
60
# File 'lib/lunchmoney/objects/transaction.rb', line 58

def recurring_granularity
  @recurring_granularity
end

#recurring_idInteger?

Returns:

  • (Integer, nil)


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

def recurring_id
  @recurring_id
end

#recurring_payeeString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_payee
  @recurring_payee
end

#recurring_quantityT.untyped

TODO: Fix types when I have a response on what they should be github.com/mmenanno/lunchmoney/issues/329

Returns:

  • (T.untyped)


58
59
60
# File 'lib/lunchmoney/objects/transaction.rb', line 58

def recurring_quantity
  @recurring_quantity
end

#recurring_typeString?

Returns:

  • (String, nil)


27
28
29
# File 'lib/lunchmoney/objects/transaction.rb', line 27

def recurring_type
  @recurring_type
end

#sourceString

Returns:

  • (String)


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

def source
  @source
end

#statusString

Returns:

  • (String)


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

def status
  @status
end

#tagsArray<LunchMoney::Objects::TagBase>

Returns:



51
52
53
# File 'lib/lunchmoney/objects/transaction.rb', line 51

def tags
  @tags
end

#updated_atString

Returns:

  • (String)


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

def updated_at
  @updated_at
end