예제 #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="webhookMethod"> The HTTP method to use when sending a webhook request </param>
        /// <param name="webhookFilters"> The list of webhook event triggers that are enabled for the Service </param>
        /// <param name="preWebhookUrl"> The absolute URL of the pre-event webhook </param>
        /// <param name="postWebhookUrl"> The absolute URL of the post-event webhook </param>
        /// <param name="preWebhookRetryCount"> The number of times to try the pre-event webhook request if the first attempt
        ///                            fails </param>
        /// <param name="postWebhookRetryCount"> The number of times to try the post-event webhook request if the first attempt
        ///                             fails </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 webhookMethod              = null,
                                             List <string> webhookFilters      = null,
                                             string preWebhookUrl              = null,
                                             string postWebhookUrl             = null,
                                             int?preWebhookRetryCount          = null,
                                             int?postWebhookRetryCount         = null,
                                             WebhookResource.TargetEnum target = null,
                                             ITwilioRestClient client          = null)
        {
            var options = new UpdateWebhookOptions()
            {
                WebhookMethod = webhookMethod, WebhookFilters = webhookFilters, PreWebhookUrl = preWebhookUrl, PostWebhookUrl = postWebhookUrl, PreWebhookRetryCount = preWebhookRetryCount, PostWebhookRetryCount = postWebhookRetryCount, Target = target
            };

            return(Update(options, client));
        }
예제 #2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="webhookMethod"> The HTTP method to use when sending a webhook request </param>
        /// <param name="webhookFilters"> The list of webhook event triggers that are enabled for the Service </param>
        /// <param name="preWebhookUrl"> The absolute URL of the pre-event webhook </param>
        /// <param name="postWebhookUrl"> The absolute URL of the post-event webhook </param>
        /// <param name="preWebhookRetryCount"> The number of times to try the pre-event webhook request if the first attempt
        ///                            fails </param>
        /// <param name="postWebhookRetryCount"> The number of times to try the post-event webhook request if the first attempt
        ///                             fails </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 webhookMethod              = null,
                                                                                      List <string> webhookFilters      = null,
                                                                                      string preWebhookUrl              = null,
                                                                                      string postWebhookUrl             = null,
                                                                                      int?preWebhookRetryCount          = null,
                                                                                      int?postWebhookRetryCount         = null,
                                                                                      WebhookResource.TargetEnum target = null,
                                                                                      ITwilioRestClient client          = null)
        {
            var options = new UpdateWebhookOptions()
            {
                WebhookMethod = webhookMethod, WebhookFilters = webhookFilters, PreWebhookUrl = preWebhookUrl, PostWebhookUrl = postWebhookUrl, PreWebhookRetryCount = preWebhookRetryCount, PostWebhookRetryCount = postWebhookRetryCount, Target = target
            };

            return(await UpdateAsync(options, client));
        }