/// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="events"> The list of space-separated events that this Webhook will subscribe to. </param>
        /// <param name="webhookUrl"> The URL associated with this Webhook. </param>
        /// <param name="webhookMethod"> The method to be used when calling the webhook's URL. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Webhook </returns>
        public static WebhookResource Update(string pathAssistantSid,
                                             string pathSid,
                                             string uniqueName        = null,
                                             string events            = null,
                                             Uri webhookUrl           = null,
                                             string webhookMethod     = null,
                                             ITwilioRestClient client = null)
        {
            var options = new UpdateWebhookOptions(pathAssistantSid, pathSid)
            {
                UniqueName = uniqueName, Events = events, WebhookUrl = webhookUrl, WebhookMethod = webhookMethod
            };

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant that is the parent of the resource to update </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="events"> The list of space-separated events that this Webhook will subscribe to. </param>
        /// <param name="webhookUrl"> The URL associated with this Webhook. </param>
        /// <param name="webhookMethod"> The method to be used when calling the webhook's URL. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Webhook </returns>
        public static async System.Threading.Tasks.Task <WebhookResource> UpdateAsync(string pathAssistantSid,
                                                                                      string pathSid,
                                                                                      string uniqueName        = null,
                                                                                      string events            = null,
                                                                                      Uri webhookUrl           = null,
                                                                                      string webhookMethod     = null,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new UpdateWebhookOptions(pathAssistantSid, pathSid)
            {
                UniqueName = uniqueName, Events = events, WebhookUrl = webhookUrl, WebhookMethod = webhookMethod
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update Webhook parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Webhook </returns>
        public static async System.Threading.Tasks.Task <WebhookResource> UpdateAsync(UpdateWebhookOptions options,
                                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }