/// <summary>
        /// Remove a Network resource from the Network Access Profile resource's.
        /// </summary>
        /// <param name="options"> Delete NetworkAccessProfileNetwork parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of NetworkAccessProfileNetwork </returns>
        public static bool Delete(DeleteNetworkAccessProfileNetworkOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// Remove a Network resource from the Network Access Profile resource's.
        /// </summary>
        /// <param name="pathNetworkAccessProfileSid"> The unique string that identifies the Network Access Profile resource
        ///                                   </param>
        /// <param name="pathSid"> The SID that identifies the Network resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of NetworkAccessProfileNetwork </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathNetworkAccessProfileSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteNetworkAccessProfileNetworkOptions(pathNetworkAccessProfileSid, pathSid);

            return(await DeleteAsync(options, client));
        }
        /// <summary>
        /// Remove a Network resource from the Network Access Profile resource's.
        /// </summary>
        /// <param name="options"> Delete NetworkAccessProfileNetwork parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of NetworkAccessProfileNetwork </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteNetworkAccessProfileNetworkOptions options,
                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Example #4
0
 private static Request BuildDeleteRequest(DeleteNetworkAccessProfileNetworkOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Supersim,
                "/v1/NetworkAccessProfiles/" + options.PathNetworkAccessProfileSid + "/Networks/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// Remove a Network resource from the Network Access Profile resource's.
        /// </summary>
        /// <param name="pathNetworkAccessProfileSid"> The unique string that identifies the Network Access Profile resource
        ///                                   </param>
        /// <param name="pathSid"> The SID that identifies the Network resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of NetworkAccessProfileNetwork </returns>
        public static bool Delete(string pathNetworkAccessProfileSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteNetworkAccessProfileNetworkOptions(pathNetworkAccessProfileSid, pathSid);

            return(Delete(options, client));
        }