Class: Twilio::REST::Taskrouter

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/taskrouter.rb,
lib/twilio-ruby/rest/taskrouter/v1.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb,
lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Taskrouter

Initialize the Taskrouter Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/taskrouter.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://taskrouter.twilio.com'
  @host = 'taskrouter.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#to_sObject

Provide a user friendly representation


42
43
44
# File 'lib/twilio-ruby/rest/taskrouter.rb', line 42

def to_s
  '#<Twilio::REST::Taskrouter>'
end

#v1Object

Version v1 of taskrouter


27
28
29
# File 'lib/twilio-ruby/rest/taskrouter.rb', line 27

def v1
  @v1 ||= V1.new self
end

#workspaces(sid = :unset) ⇒ Twilio::REST::Taskrouter::V1::WorkspaceInstance, Twilio::REST::Taskrouter::V1::WorkspaceList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify the Workspace resource.

Returns:


36
37
38
# File 'lib/twilio-ruby/rest/taskrouter.rb', line 36

def workspaces(sid=:unset)
  self.v1.workspaces(sid)
end