/// <summary>
        /// delete
        /// </summary>
        /// <param name="options"> Delete Conversation parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Conversation </returns>
        public static bool Delete(DeleteConversationOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="options"> Delete Conversation parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Conversation </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteConversationOptions options,
                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Beispiel #3
0
 private static Request BuildDeleteRequest(DeleteConversationOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Conversations,
                "/v1/Conversations/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Conversation </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathSid,
                                                                           ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteConversationOptions(pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await DeleteAsync(options, client));
        }
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Conversation </returns>
        public static bool Delete(string pathSid,
                                  ConversationResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteConversationOptions(pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Delete(options, client));
        }
Beispiel #6
0
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Conversation </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteConversationOptions(pathSid);

            return(await DeleteAsync(options, client));
        }
Beispiel #7
0
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Conversation </returns>
        public static bool Delete(string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteConversationOptions(pathSid);

            return(Delete(options, client));
        }