Class: Twilio::REST::Taskrouter::V1::WorkspaceContext::TaskQueueList::TaskQueueBulkRealTimeStatisticsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, workspace_sid: nil) ⇒ TaskQueueBulkRealTimeStatisticsInstance

Initialize the TaskQueueBulkRealTimeStatisticsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this TaskQueueBulkRealTimeStatistics resource.

  • sid (String)

    The SID of the Call resource to fetch.



99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 99

def initialize(version, payload , workspace_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'workspace_sid' => payload['workspace_sid'],
        'task_queue_data' => payload['task_queue_data'],
        'task_queue_response_count' => payload['task_queue_response_count'] == nil ? payload['task_queue_response_count'] : payload['task_queue_response_count'].to_i,
        'url' => payload['url'],
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the TaskQueue resource.

Returns:



115
116
117
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 115

def 
    @properties['account_sid']
end

#inspectObject

Provide a detailed, user friendly representation



151
152
153
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 151

def inspect
    "<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsInstance>"
end

#task_queue_dataArray<Hash>

Returns The real-time statistics for each requested TaskQueue SID. ‘task_queue_data` returns the following attributes: `task_queue_sid`: The SID of the TaskQueue from which these statistics were calculated. `total_available_workers`: The total number of Workers available for Tasks in the TaskQueue. `total_eligible_workers`: The total number of Workers eligible for Tasks in the TaskQueue, regardless of their Activity state. `total_tasks`: The total number of Tasks. `longest_task_waiting_age`: The age of the longest waiting Task. `longest_task_waiting_sid`: The SID of the longest waiting Task. `tasks_by_status`: The number of Tasks grouped by their current status. `tasks_by_priority`: The number of Tasks grouped by priority. `activity_statistics`: The number of current Workers grouped by Activity.

Returns:

  • (Array<Hash>)

    The real-time statistics for each requested TaskQueue SID. ‘task_queue_data` returns the following attributes: `task_queue_sid`: The SID of the TaskQueue from which these statistics were calculated. `total_available_workers`: The total number of Workers available for Tasks in the TaskQueue. `total_eligible_workers`: The total number of Workers eligible for Tasks in the TaskQueue, regardless of their Activity state. `total_tasks`: The total number of Tasks. `longest_task_waiting_age`: The age of the longest waiting Task. `longest_task_waiting_sid`: The SID of the longest waiting Task. `tasks_by_status`: The number of Tasks grouped by their current status. `tasks_by_priority`: The number of Tasks grouped by priority. `activity_statistics`: The number of current Workers grouped by Activity.



127
128
129
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 127

def task_queue_data
    @properties['task_queue_data']
end

#task_queue_response_countString

Returns The number of TaskQueue statistics received in task_queue_data.

Returns:

  • (String)

    The number of TaskQueue statistics received in task_queue_data.



133
134
135
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 133

def task_queue_response_count
    @properties['task_queue_response_count']
end

#to_sObject

Provide a user friendly representation



145
146
147
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 145

def to_s
    "<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsInstance>"
end

#urlString

Returns The absolute URL of the TaskQueue statistics resource.

Returns:

  • (String)

    The absolute URL of the TaskQueue statistics resource.



139
140
141
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 139

def url
    @properties['url']
end

#workspace_sidString

Returns The SID of the Workspace that contains the TaskQueue.

Returns:

  • (String)

    The SID of the Workspace that contains the TaskQueue.



121
122
123
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 121

def workspace_sid
    @properties['workspace_sid']
end