/// <summary> /// delete /// </summary> /// <param name="options"> Delete Field parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Field </returns> public static bool Delete(DeleteFieldOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildDeleteRequest(options, client)); return(response.StatusCode == System.Net.HttpStatusCode.NoContent); }
/// <summary> /// delete /// </summary> /// <param name="options"> Delete Field parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Field </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteFieldOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildDeleteRequest(options, client)); return(response.StatusCode == System.Net.HttpStatusCode.NoContent); }
/// <summary> /// delete /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant. </param> /// <param name="pathTaskSid"> The unique ID of the Task associated with this Field. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Field </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathAssistantSid, string pathTaskSid, string pathSid, ITwilioRestClient client = null) { var options = new DeleteFieldOptions(pathAssistantSid, pathTaskSid, pathSid); return(await DeleteAsync(options, client)); }
/// <summary> /// delete /// </summary> /// <param name="pathAssistantSid"> The unique ID of the Assistant. </param> /// <param name="pathTaskSid"> The unique ID of the Task associated with this Field. </param> /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Field </returns> public static bool Delete(string pathAssistantSid, string pathTaskSid, string pathSid, ITwilioRestClient client = null) { var options = new DeleteFieldOptions(pathAssistantSid, pathTaskSid, pathSid); return(Delete(options, client)); }
private static Request BuildDeleteRequest(DeleteFieldOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.Preview, "/understand/Assistants/" + options.PathAssistantSid + "/Tasks/" + options.PathTaskSid + "/Fields/" + options.PathSid + "", queryParams: options.GetParams() )); }