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.



104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 104

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:



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

def 
    @properties['account_sid']
end

#inspectObject

Provide a detailed, user friendly representation



156
157
158
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 156

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.



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

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.



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

def task_queue_response_count
    @properties['task_queue_response_count']
end

#to_sObject

Provide a user friendly representation



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

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.



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

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.



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

def workspace_sid
    @properties['workspace_sid']
end