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

Inherits:
ListResource
  • 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, workspace_sid: nil) ⇒ TaskQueueBulkRealTimeStatisticsList

Initialize the TaskQueueBulkRealTimeStatisticsList

Parameters:

  • version (Version)

    Version that contains the resource



29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 29

def initialize(version, workspace_sid: nil)
    super(version)
    # Path Solution
    @solution = { workspace_sid: workspace_sid }
    @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/RealTimeStatistics"
    
end

Instance Method Details

#create(body: :unset) ⇒ TaskQueueBulkRealTimeStatisticsInstance

Create the TaskQueueBulkRealTimeStatisticsInstance

Parameters:

  • body (Object) (defaults to: :unset)

Returns:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 40

def create(body: :unset
)

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    headers['Content-Type'] = 'application/json'
    
    
    
    
    payload = @version.create('POST', @uri, headers: headers, data: body.to_json)
    TaskQueueBulkRealTimeStatisticsInstance.new(
        @version,
        payload,
        workspace_sid: @solution[:workspace_sid],
    )
end

#to_sObject

Provide a user friendly representation



61
62
63
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb', line 61

def to_s
    '#<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsList>'
end