Class: CommandTower::Messaging::Inbox::ListResult

Inherits:
Data
  • Object
show all
Defined in:
app/services/command_tower/messaging/inbox/list_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



6
7
8
# File 'app/services/command_tower/messaging/inbox/list_result.rb', line 6

def items
  @items
end

#limitObject (readonly)

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



6
7
8
# File 'app/services/command_tower/messaging/inbox/list_result.rb', line 6

def limit
  @limit
end

#offsetObject (readonly)

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



6
7
8
# File 'app/services/command_tower/messaging/inbox/list_result.rb', line 6

def offset
  @offset
end

#total_countObject (readonly)

Returns the value of attribute total_count

Returns:

  • (Object)

    the current value of total_count



6
7
8
# File 'app/services/command_tower/messaging/inbox/list_result.rb', line 6

def total_count
  @total_count
end

Class Method Details

.build(items:, limit:, offset:, total_count:) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/services/command_tower/messaging/inbox/list_result.rb', line 7

def self.build(items:, limit:, offset:, total_count:)
  new(
    items: Array(items).freeze,
    limit: Integer(limit),
    offset: Integer(offset),
    total_count: Integer(total_count),
  ).freeze
end