Exemple #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update TaskQueue parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TaskQueue </returns>
        public static TaskQueueResource Update(UpdateTaskQueueOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="targetWorkers"> The target_workers </param>
        /// <param name="reservationActivitySid"> The reservation_activity_sid </param>
        /// <param name="assignmentActivitySid"> The assignment_activity_sid </param>
        /// <param name="maxReservedWorkers"> The max_reserved_workers </param>
        /// <param name="taskOrder"> The task_order </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TaskQueue </returns>
        public static async System.Threading.Tasks.Task <TaskQueueResource> UpdateAsync(string pathWorkspaceSid, string pathSid, string friendlyName = null, string targetWorkers = null, string reservationActivitySid = null, string assignmentActivitySid = null, int?maxReservedWorkers = null, TaskQueueResource.TaskOrderEnum taskOrder = null, ITwilioRestClient client = null)
        {
            var options = new UpdateTaskQueueOptions(pathWorkspaceSid, pathSid)
            {
                FriendlyName = friendlyName, TargetWorkers = targetWorkers, ReservationActivitySid = reservationActivitySid, AssignmentActivitySid = assignmentActivitySid, MaxReservedWorkers = maxReservedWorkers, TaskOrder = taskOrder
            };

            return(await UpdateAsync(options, client));
        }
Exemple #3
0
 private static Request BuildUpdateRequest(UpdateTaskQueueOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Taskrouter,
                "/v1/Workspaces/" + options.PathWorkspaceSid + "/TaskQueues/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Exemple #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update TaskQueue parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TaskQueue </returns>
        public static async System.Threading.Tasks.Task <TaskQueueResource> UpdateAsync(UpdateTaskQueueOptions options,
                                                                                        ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }