Esempio n. 1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="method"> The HTTP method to be used when sending a webhook request. </param>
        /// <param name="filters"> The list of webhook event triggers that are enabled for this Service. </param>
        /// <param name="preWebhookUrl"> The absolute url the pre-event webhook request should be sent to. </param>
        /// <param name="postWebhookUrl"> The absolute url the post-event webhook request should be sent to. </param>
        /// <param name="target"> The routing target of the webhook. </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 method                     = null,
                                                                                      List <string> filters             = null,
                                                                                      string preWebhookUrl              = null,
                                                                                      string postWebhookUrl             = null,
                                                                                      WebhookResource.TargetEnum target = null,
                                                                                      ITwilioRestClient client          = null)
        {
            var options = new UpdateWebhookOptions()
            {
                Method = method, Filters = filters, PreWebhookUrl = preWebhookUrl, PostWebhookUrl = postWebhookUrl, Target = target
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="method"> The HTTP method to be used when sending a webhook request. </param>
        /// <param name="filters"> The list of webhook event triggers that are enabled for this Service. </param>
        /// <param name="preWebhookUrl"> The absolute url the pre-event webhook request should be sent to. </param>
        /// <param name="postWebhookUrl"> The absolute url the post-event webhook request should be sent to. </param>
        /// <param name="target"> The routing target of the webhook. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Webhook </returns>
        public static WebhookResource Update(string method                     = null,
                                             List <string> filters             = null,
                                             string preWebhookUrl              = null,
                                             string postWebhookUrl             = null,
                                             WebhookResource.TargetEnum target = null,
                                             ITwilioRestClient client          = null)
        {
            var options = new UpdateWebhookOptions()
            {
                Method = method, Filters = filters, PreWebhookUrl = preWebhookUrl, PostWebhookUrl = postWebhookUrl, Target = target
            };

            return(Update(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));
        }
Esempio n. 4
0
 /// <summary>
 /// update
 /// </summary>
 /// <param name="options"> Update Webhook parameters </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of Webhook </returns>
 public static WebhookResource Update(UpdateWebhookOptions options, ITwilioRestClient client = null)
 {
     client = client ?? TwilioClient.GetRestClient();
     var response = client.Request(BuildUpdateRequest(options, client));
     return FromJson(response.Content);
 }