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

            return(FromJson(response.Content));
        }
Пример #2
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="defaultActivitySid"> The default_activity_sid </param>
        /// <param name="eventCallbackUrl"> The event_callback_url </param>
        /// <param name="eventsFilter"> The events_filter </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="multiTaskEnabled"> The multi_task_enabled </param>
        /// <param name="timeoutActivitySid"> The timeout_activity_sid </param>
        /// <param name="prioritizeQueueOrder"> The prioritize_queue_order </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Workspace </returns>
        public static async System.Threading.Tasks.Task <WorkspaceResource> UpdateAsync(string pathSid, string defaultActivitySid = null, Uri eventCallbackUrl = null, string eventsFilter = null, string friendlyName = null, bool?multiTaskEnabled = null, string timeoutActivitySid = null, WorkspaceResource.QueueOrderEnum prioritizeQueueOrder = null, ITwilioRestClient client = null)
        {
            var options = new UpdateWorkspaceOptions(pathSid)
            {
                DefaultActivitySid = defaultActivitySid, EventCallbackUrl = eventCallbackUrl, EventsFilter = eventsFilter, FriendlyName = friendlyName, MultiTaskEnabled = multiTaskEnabled, TimeoutActivitySid = timeoutActivitySid, PrioritizeQueueOrder = prioritizeQueueOrder
            };

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

            return(FromJson(response.Content));
        }