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) ⇒ void

Parameters:

  • id (Integer)
  • name (String)
  • is_income (Boolean)
  • exclude_from_budget (Boolean)
  • exclude_from_totals (Boolean)
  • is_group (Boolean)
  • archived (Boolean, nil) (defaults to: nil)
  • archived_on (String, nil) (defaults to: nil)
  • updated_at (String, nil) (defaults to: nil)
  • created_at (String, nil) (defaults to: nil)
  • group_id (Integer, nil) (defaults to: nil)
  • order (Integer, nil) (defaults to: nil)
  • description (String, nil) (defaults to: nil)
  • children (Array<LunchMoney::Objects::Category, LunchMoney::Objects::ChildCategory>, nil) (defaults to: nil)
  • group_category_name (String, nil) (defaults to: nil)


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

#childrenArray<LunchMoney::Objects::Category, LunchMoney::Objects::ChildCategory>?



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

def children
  @children
end

#exclude_from_budgetBoolean

Returns:

  • (Boolean)


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

def exclude_from_budget
  @exclude_from_budget
end

#exclude_from_totalsBoolean

Returns:

  • (Boolean)


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

def exclude_from_totals
  @exclude_from_totals
end

#group_category_nameString?

Returns:

  • (String, nil)


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

def group_category_name
  @group_category_name
end

#group_idInteger?

Returns:

  • (Integer, nil)


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

def group_id
  @group_id
end

#is_groupBoolean

Returns:

  • (Boolean)


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

def is_group
  @is_group
end

#is_incomeBoolean

Returns:

  • (Boolean)


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

def is_income
  @is_income
end

#orderInteger?

Returns:

  • (Integer, nil)


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

def order
  @order
end