Esempio n. 1
0
        /// <summary>
        /// Delete a specific Deployment from the Fleet, leaving associated devices effectively undeployed.
        /// </summary>
        /// <param name="options"> Delete Deployment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Deployment </returns>
        public static bool Delete(DeleteDeploymentOptions 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 Deployment from the Fleet, leaving associated devices effectively undeployed.
        /// </summary>
        ///
        /// <param name="options"> Delete Deployment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Deployment </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteDeploymentOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Esempio n. 3
0
        /// <summary>
        /// Delete a specific Deployment from the Fleet, leaving associated devices effectively undeployed.
        /// </summary>
        /// <param name="pathFleetSid"> The fleet_sid </param>
        /// <param name="pathSid"> A string that uniquely identifies the Deployment. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Deployment </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathFleetSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteDeploymentOptions(pathFleetSid, pathSid);

            return(await DeleteAsync(options, client));
        }
 private static Request BuildDeleteRequest(DeleteDeploymentOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/DeployedDevices/Fleets/" + options.PathFleetSid + "/Deployments/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
Esempio n. 5
0
        /// <summary>
        /// Delete a specific Deployment from the Fleet, leaving associated devices effectively undeployed.
        /// </summary>
        /// <param name="pathFleetSid"> The fleet_sid </param>
        /// <param name="pathSid"> A string that uniquely identifies the Deployment. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Deployment </returns>
        public static bool Delete(string pathFleetSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteDeploymentOptions(pathFleetSid, pathSid);

            return(Delete(options, client));
        }