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.



193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 193

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:



210
211
212
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 210

def 
    @properties['account_sid']
end

#inspectObject

Provide a detailed, user friendly representation



246
247
248
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 246

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.



222
223
224
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 222

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.



228
229
230
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 228

def task_queue_response_count
    @properties['task_queue_response_count']
end

#to_sObject

Provide a user friendly representation



240
241
242
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 240

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.



234
235
236
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 234

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.



216
217
218
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 216

def workspace_sid
    @properties['workspace_sid']
end