/// <summary>
        /// delete
        /// </summary>
        /// <param name="options"> Delete FieldType parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FieldType </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteFieldTypeOptions 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 assistant_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of FieldType </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathAssistantSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteFieldTypeOptions(pathAssistantSid, pathSid);

            return(await DeleteAsync(options, client));
        }
示例#3
0
 private static Request BuildDeleteRequest(DeleteFieldTypeOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Autopilot,
                "/v1/Assistants/" + options.PathAssistantSid + "/FieldTypes/" + options.PathSid + "",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathAssistantSid"> The SID of the Assistant with the FieldType resources to delete </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 FieldType </returns>
        public static bool Delete(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteFieldTypeOptions(pathAssistantSid, pathSid);

            return(Delete(options, client));
        }