Beispiel #1
0
        /// <summary>
        /// Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates,
        /// Keys.
        /// </summary>
        ///
        /// <param name="options"> Delete Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static bool Delete(DeleteFleetOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Beispiel #2
0
        /// <summary>
        /// Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates,
        /// Keys.
        /// </summary>
        ///
        /// <param name="options"> Delete Fleet parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteFleetOptions 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(DeleteFleetOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/DeployedDevices/Fleets/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <summary>
        /// Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates,
        /// Keys.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies the Fleet. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Fleet </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteFleetOptions(pathSid);

            return(await DeleteAsync(options, client));
        }
Beispiel #5
0
        /// <summary>
        /// Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates,
        /// Keys.
        /// </summary>
        ///
        /// <param name="pathSid"> A string that uniquely identifies the Fleet. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fleet </returns>
        public static bool Delete(string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteFleetOptions(pathSid);

            return(Delete(options, client));
        }