Class: GetStream::Generated::Models::QueryTeamUsageStatsRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb

Overview

Request payload for querying team-level usage statistics from the warehouse database

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ QueryTeamUsageStatsRequest

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @end_date = attributes[:end_date] || attributes['end_date'] || nil
  @limit = attributes[:limit] || attributes['limit'] || nil
  @month = attributes[:month] || attributes['month'] || nil
  @next = attributes[:next] || attributes['next'] || nil
  @start_date = attributes[:start_date] || attributes['start_date'] || nil
end

Instance Attribute Details

#end_dateString

Returns End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown.

Returns:

  • End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown.



14
15
16
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 14

def end_date
  @end_date
end

#limitInteger

Returns Maximum number of teams to return per page (default: 30, max: 30).

Returns:

  • Maximum number of teams to return per page (default: 30, max: 30)



17
18
19
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 17

def limit
  @limit
end

#monthString

Returns Month in YYYY-MM format (e.g., ‘2026-01’). Mutually exclusive with start_date/end_date. Returns aggregated monthly values.

Returns:

  • Month in YYYY-MM format (e.g., ‘2026-01’). Mutually exclusive with start_date/end_date. Returns aggregated monthly values.



20
21
22
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 20

def month
  @month
end

#nextString

Returns Cursor for pagination to fetch next page of teams.

Returns:

  • Cursor for pagination to fetch next page of teams



23
24
25
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 23

def next
  @next
end

#start_dateString

Returns Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown.

Returns:

  • Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown.



26
27
28
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 26

def start_date
  @start_date
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 39

def self.json_field_mappings
  {
    end_date: 'end_date',
    limit: 'limit',
    month: 'month',
    next: 'next',
    start_date: 'start_date'
  }
end