lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb in twilio-ruby-6.11.0

- old
+ new

@@ -18,10 +18,11 @@ class Taskrouter < TaskrouterBase class V1 < Version class WorkspaceContext < InstanceContext class WorkflowList < ListResource + ## # Initialize the WorkflowList # @param [Version] version Version that contains the resource # @return [WorkflowList] WorkflowList def initialize(version, workspace_sid: nil) @@ -53,10 +54,11 @@ 'AssignmentCallbackUrl' => assignment_callback_url, 'FallbackAssignmentCallbackUrl' => fallback_assignment_callback_url, 'TaskReservationTimeout' => task_reservation_timeout, }) + payload = @version.create('POST', @uri, data: data) WorkflowInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], @@ -185,18 +187,20 @@ ## # Delete the WorkflowInstance # @return [Boolean] True if delete succeeds, false otherwise def delete + @version.delete('DELETE', @uri) end ## # Fetch the WorkflowInstance # @return [WorkflowInstance] Fetched WorkflowInstance def fetch + payload = @version.fetch('GET', @uri) WorkflowInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], @@ -229,9 +233,10 @@ 'Configuration' => configuration, 'TaskReservationTimeout' => task_reservation_timeout, 'ReEvaluateTasks' => re_evaluate_tasks, }) + payload = @version.update('POST', @uri, data: data) WorkflowInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid],