/// <summary>
        /// Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections
        /// that are presenting it.
        /// </summary>
        /// <param name="options"> Delete Certificate parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Certificate </returns>
        public static bool Delete(DeleteCertificateOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections
        /// that are presenting it.
        /// </summary>
        ///
        /// <param name="options"> Delete Certificate parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Certificate </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteCertificateOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections
        /// that are presenting it.
        /// </summary>
        /// <param name="pathFleetSid"> The fleet_sid </param>
        /// <param name="pathSid"> A string that uniquely identifies the Certificate. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Certificate </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathFleetSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteCertificateOptions(pathFleetSid, pathSid);

            return(await DeleteAsync(options, client));
        }
 private static Request BuildDeleteRequest(DeleteCertificateOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/DeployedDevices/Fleets/" + options.PathFleetSid + "/Certificates/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Unregister a specific Certificate credential from the Fleet, effectively disallowing any inbound client connections
        /// that are presenting it.
        /// </summary>
        /// <param name="pathFleetSid"> The fleet_sid </param>
        /// <param name="pathSid"> A string that uniquely identifies the Certificate. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Certificate </returns>
        public static bool Delete(string pathFleetSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteCertificateOptions(pathFleetSid, pathSid);

            return(Delete(options, client));
        }