lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-6.11.0
- old
+ new
@@ -16,10 +16,11 @@
module Twilio
module REST
class Taskrouter < TaskrouterBase
class V1 < Version
class WorkspaceList < ListResource
+
##
# Initialize the WorkspaceList
# @param [Version] version Version that contains the resource
# @return [WorkspaceList] WorkspaceList
def initialize(version)
@@ -54,10 +55,11 @@
'MultiTaskEnabled' => multi_task_enabled,
'Template' => template,
'PrioritizeQueueOrder' => prioritize_queue_order,
})
+
payload = @version.create('POST', @uri, data: data)
WorkspaceInstance.new(
@version,
payload,
)
@@ -191,18 +193,20 @@
##
# Delete the WorkspaceInstance
# @return [Boolean] True if delete succeeds, false otherwise
def delete
+
@version.delete('DELETE', @uri)
end
##
# Fetch the WorkspaceInstance
# @return [WorkspaceInstance] Fetched WorkspaceInstance
def fetch
+
payload = @version.fetch('GET', @uri)
WorkspaceInstance.new(
@version,
payload,
sid: @solution[:sid],
@@ -237,9 +241,10 @@
'MultiTaskEnabled' => multi_task_enabled,
'TimeoutActivitySid' => timeout_activity_sid,
'PrioritizeQueueOrder' => prioritize_queue_order,
})
+
payload = @version.update('POST', @uri, data: data)
WorkspaceInstance.new(
@version,
payload,
sid: @solution[:sid],