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



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @end_date = attributes.fetch(:end_date) { attributes.fetch('end_date', nil) }
  @limit = attributes.fetch(:limit) { attributes.fetch('limit', nil) }
  @month = attributes.fetch(:month) { attributes.fetch('month', nil) }
  @next = attributes.fetch(:next) { attributes.fetch('next', nil) }
  @start_date = attributes.fetch(:start_date) { attributes.fetch('start_date', nil) }
  @team = attributes.fetch(:team) { attributes.fetch('team', nil) }
end

Instance Attribute Details

#end_date ⇒ String

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

Returns:

  • (String) —

    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

#limit ⇒ Integer

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

Returns:

  • (Integer) —

    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

#month ⇒ String

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

Returns:

  • (String) —

    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

#next ⇒ String

Returns Cursor for pagination to fetch next page of teams.

Returns:

  • (String) —

    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_date ⇒ String

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

Returns:

  • (String) —

    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

#team ⇒ String

Returns Filter results to a single team ID. Empty string selects users not assigned to any team. Mutually exclusive with 'next'.

Returns:

  • (String) —

    Filter results to a single team ID. Empty string selects users not assigned to any team. Mutually exclusive with 'next'.



29
30
31
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 29

def team
  @team
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/query_team_usage_stats_request.rb', line 43

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