Class: LunchMoney::Objects::Category

Inherits:
ChildCategory show all
Defined in:
lib/lunchmoney/objects/category.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from ChildCategory

#archived, #archived_on, #created_at, #description, #id, #name, #updated_at

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

#initialize(id:, name:, is_income:, exclude_from_budget:, exclude_from_totals:, is_group:, archived: nil, archived_on: nil, updated_at: nil, created_at: nil, group_id: nil, order: nil, description: nil, children: nil, group_category_name: nil) ⇒ Category

Returns a new instance of Category.



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/lunchmoney/objects/category.rb', line 40

def initialize(id:, name:, is_income:, exclude_from_budget:, exclude_from_totals:, is_group:, archived: nil,
  archived_on: nil, updated_at: nil, created_at: nil, group_id: nil, order: nil, description: nil, children: nil,
  group_category_name: nil)
  super(id:, name:, archived:, archived_on:, updated_at:, created_at:, description:)
  @is_income = is_income
  @exclude_from_budget = exclude_from_budget
  @exclude_from_totals = exclude_from_totals
  @is_group = is_group
  @group_id = group_id
  @order = order
  @children = children
  @group_category_name = group_category_name
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



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

def children
  @children
end

#exclude_from_budgetObject

Returns the value of attribute exclude_from_budget.



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

def exclude_from_budget
  @exclude_from_budget
end

#exclude_from_totalsObject

Returns the value of attribute exclude_from_totals.



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

def exclude_from_totals
  @exclude_from_totals
end

#group_category_nameObject

Returns the value of attribute group_category_name.



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

def group_category_name
  @group_category_name
end

#group_idObject

Returns the value of attribute group_id.



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

def group_id
  @group_id
end

#is_groupObject

Returns the value of attribute is_group.



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

def is_group
  @is_group
end

#is_incomeObject

Returns the value of attribute is_income.



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

def is_income
  @is_income
end

#orderObject

Returns the value of attribute order.



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

def order
  @order
end