Class: LunchMoney::Objects::ChildCategory

Inherits:
Object
  • Object
show all
Defined in:
lib/lunchmoney/objects/child_category.rb

Overview

A slimmed down version of lunchmoney.dev/#categories-object used in the children field of some category calls

Direct Known Subclasses

Category

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#serialize

Constructor Details

#initialize(id:, name:, archived: nil, archived_on: nil, updated_at: nil, created_at: nil, description: nil) ⇒ void

Parameters:

  • id (Integer)
  • name (String)
  • 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)
  • description (String, nil) (defaults to: nil)


32
33
34
35
36
37
38
39
40
41
# File 'lib/lunchmoney/objects/child_category.rb', line 32

def initialize(id:, name:, archived: nil, archived_on: nil, updated_at: nil, created_at: nil, description: nil)
  super()
  @id = id
  @name = name
  @archived = archived
  @archived_on = archived_on
  @updated_at = updated_at
  @created_at = created_at
  @description = description
end

Instance Attribute Details

#archivedBoolean?

Returns:

  • (Boolean, nil)


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

def archived
  @archived
end

#archived_onString?

Returns:

  • (String, nil)


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

def archived_on
  @archived_on
end

#created_atString?

Returns:

  • (String, nil)


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

def created_at
  @created_at
end

#descriptionString?

Returns:

  • (String, nil)


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

def description
  @description
end

#idInteger

Returns:

  • (Integer)


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

def id
  @id
end

#nameString

Returns:

  • (String)


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

def name
  @name
end

#updated_atString?

Returns:

  • (String, nil)


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

def updated_at
  @updated_at
end