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

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// Delete a specific Entity.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique identity of the Entity </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Entity </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid,
                                                                           string pathIdentity,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteEntityOptions(pathServiceSid, pathIdentity);

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

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
 private static Request BuildDeleteRequest(DeleteEntityOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Authy,
                "/v1/Services/" + options.PathServiceSid + "/Entities/" + options.PathIdentity + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Delete a specific Entity.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathIdentity"> Unique identity of the Entity </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Entity </returns>
        public static bool Delete(string pathServiceSid, string pathIdentity, ITwilioRestClient client = null)
        {
            var options = new DeleteEntityOptions(pathServiceSid, pathIdentity);

            return(Delete(options, client));
        }