/// <summary>
        /// Remove an Assignment Item Instance.
        /// </summary>
        /// <param name="pathTrustProductSid"> The unique string that identifies the resource. </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TrustProductsChannelEndpointAssignment </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathTrustProductSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteTrustProductsChannelEndpointAssignmentOptions(pathTrustProductSid, pathSid);

            return(await DeleteAsync(options, client));
        }
        /// <summary>
        /// Remove an Assignment Item Instance.
        /// </summary>
        /// <param name="options"> Delete TrustProductsChannelEndpointAssignment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TrustProductsChannelEndpointAssignment </returns>
        public static bool Delete(DeleteTrustProductsChannelEndpointAssignmentOptions options,
                                  ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
        /// <summary>
        /// Remove an Assignment Item Instance.
        /// </summary>
        /// <param name="options"> Delete TrustProductsChannelEndpointAssignment parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TrustProductsChannelEndpointAssignment </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteTrustProductsChannelEndpointAssignmentOptions 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(DeleteTrustProductsChannelEndpointAssignmentOptions options,
                                           ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Trusthub,
                "/v1/TrustProducts/" + options.PathTrustProductSid + "/ChannelEndpointAssignments/" + options.PathSid + "",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Remove an Assignment Item Instance.
        /// </summary>
        /// <param name="pathTrustProductSid"> The unique string that identifies the resource. </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of TrustProductsChannelEndpointAssignment </returns>
        public static bool Delete(string pathTrustProductSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteTrustProductsChannelEndpointAssignmentOptions(pathTrustProductSid, pathSid);

            return(Delete(options, client));
        }