Class: Twilio::REST::Taskrouter::V1

Inherits:
Version
  • Object
show all
Defined in:
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: WorkspaceContext, WorkspaceInstance, WorkspaceList, WorkspacePage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Taskrouter


15
16
17
18
19
# File 'lib/twilio-ruby/rest/taskrouter/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @workspaces = nil
end

Instance Method Details

#to_sObject

Provide a user friendly representation


38
39
40
# File 'lib/twilio-ruby/rest/taskrouter/v1.rb', line 38

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

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

Parameters:

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

    The SID of the Workspace resource to fetch.

Returns:


25
26
27
28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/taskrouter/v1.rb', line 25

def workspaces(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @workspaces ||= WorkspaceList.new self
  else
      WorkspaceContext.new(self, sid)
  end
end