lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-5.0.0.rc24 vs lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-5.0.0.rc25
- old
+ new
@@ -280,12 +280,15 @@
@version.delete('delete', @uri)
end
##
# Access the activities
- # @return [ActivityList] ActivityList
+ # @return [ActivityList] if a(n) ActivityList object was created.
+ # @return [ActivityContext] if a(n) ActivityContext object was created.
def activities(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return ActivityContext.new(
@version,
@solution[:sid],
sid,
@@ -302,12 +305,15 @@
@activities
end
##
# Access the events
- # @return [EventList] EventList
+ # @return [EventList] if a(n) EventList object was created.
+ # @return [EventContext] if a(n) EventContext object was created.
def events(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return EventContext.new(
@version,
@solution[:sid],
sid,
@@ -324,12 +330,15 @@
@events
end
##
# Access the tasks
- # @return [TaskList] TaskList
+ # @return [TaskList] if a(n) TaskList object was created.
+ # @return [TaskContext] if a(n) TaskContext object was created.
def tasks(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return TaskContext.new(
@version,
@solution[:sid],
sid,
@@ -346,12 +355,15 @@
@tasks
end
##
# Access the task_queues
- # @return [TaskQueueList] TaskQueueList
+ # @return [TaskQueueList] if a(n) TaskQueueList object was created.
+ # @return [TaskQueueContext] if a(n) TaskQueueContext object was created.
def task_queues(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return TaskQueueContext.new(
@version,
@solution[:sid],
sid,
@@ -368,12 +380,15 @@
@task_queues
end
##
# Access the workers
- # @return [WorkerList] WorkerList
+ # @return [WorkerList] if a(n) WorkerList object was created.
+ # @return [WorkerContext] if a(n) WorkerContext object was created.
def workers(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return WorkerContext.new(
@version,
@solution[:sid],
sid,
@@ -390,12 +405,15 @@
@workers
end
##
# Access the workflows
- # @return [WorkflowList] WorkflowList
+ # @return [WorkflowList] if a(n) WorkflowList object was created.
+ # @return [WorkflowContext] if a(n) WorkflowContext object was created.
def workflows(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return WorkflowContext.new(
@version,
@solution[:sid],
sid,
@@ -412,21 +430,25 @@
@workflows
end
##
# Access the statistics
- # @return [WorkspaceStatisticsList] WorkspaceStatisticsList
+ # @return [WorkspaceStatisticsList] if a(n) WorkspaceStatisticsList object was created.
+ # @return [WorkspaceStatisticsContext] if a(n) WorkspaceStatisticsContext object was created.
def statistics
WorkspaceStatisticsContext.new(
@version,
@solution[:sid],
)
end
##
# Access the task_channels
- # @return [TaskChannelList] TaskChannelList
+ # @return [TaskChannelList] if a(n) TaskChannelList object was created.
+ # @return [TaskChannelContext] if a(n) TaskChannelContext object was created.
def task_channels(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return TaskChannelContext.new(
@version,
@solution[:sid],
sid,
\ No newline at end of file