/// <summary> /// Remove the assignment of an Add-on installation from the Number specified. /// </summary> /// <param name="options"> Delete AssignedAddOn parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AssignedAddOn </returns> public static bool Delete(DeleteAssignedAddOnOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildDeleteRequest(options, client)); return(response.StatusCode == System.Net.HttpStatusCode.NoContent); }
/// <summary> /// Remove the assignment of an Add-on installation from the Number specified. /// </summary> /// /// <param name="options"> Delete AssignedAddOn parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AssignedAddOn </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteAssignedAddOnOptions 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(DeleteAssignedAddOnOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/IncomingPhoneNumbers/" + options.PathResourceSid + "/AssignedAddOns/" + options.PathSid + ".json", queryParams: options.GetParams() )); }
/// <summary> /// Remove the assignment of an Add-on installation from the Number specified. /// </summary> /// /// <param name="pathResourceSid"> The resource_sid </param> /// <param name="pathSid"> The Installed Add-on Sid to remove </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of AssignedAddOn </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathResourceSid, string pathSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new DeleteAssignedAddOnOptions(pathResourceSid, pathSid) { PathAccountSid = pathAccountSid }; return(await DeleteAsync(options, client)); }
/// <summary> /// Remove the assignment of an Add-on installation from the Number specified. /// </summary> /// /// <param name="pathResourceSid"> The resource_sid </param> /// <param name="pathSid"> The Installed Add-on Sid to remove </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of AssignedAddOn </returns> public static bool Delete(string pathResourceSid, string pathSid, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new DeleteAssignedAddOnOptions(pathResourceSid, pathSid) { PathAccountSid = pathAccountSid }; return(Delete(options, client)); }