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

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

Instance Method Summary collapse

Constructor Details

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

Initialize the TaskQueuesStatisticsInstance

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 TaskQueuesStatistics resource.

  • sid (String)

    The SID of the Call resource to fetch.



206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb', line 206

def initialize(version, payload , workspace_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'cumulative' => payload['cumulative'],
        'realtime' => payload['realtime'],
        'task_queue_sid' => payload['task_queue_sid'],
        'workspace_sid' => payload['workspace_sid'],
    }
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:



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

def 
    @properties['account_sid']
end

#cumulativeHash

Returns An object that contains the cumulative statistics for the TaskQueues.

Returns:

  • (Hash)

    An object that contains the cumulative statistics for the TaskQueues.



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

def cumulative
    @properties['cumulative']
end

#inspectObject

Provide a detailed, user friendly representation



258
259
260
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb', line 258

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

#realtimeHash

Returns An object that contains the real-time statistics for the TaskQueues.

Returns:

  • (Hash)

    An object that contains the real-time statistics for the TaskQueues.



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

def realtime
    @properties['realtime']
end

#task_queue_sidString

Returns The SID of the TaskQueue from which these statistics were calculated.

Returns:

  • (String)

    The SID of the TaskQueue from which these statistics were calculated.



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

def task_queue_sid
    @properties['task_queue_sid']
end

#to_sObject

Provide a user friendly representation



252
253
254
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb', line 252

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

#workspace_sidString

Returns The SID of the Workspace that contains the TaskQueues.

Returns:

  • (String)

    The SID of the Workspace that contains the TaskQueues.



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

def workspace_sid
    @properties['workspace_sid']
end