Exemplo n.º 1
0
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathServiceSid"> The service_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 pathServiceSid,
                                                                           string pathSid,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteFieldTypeOptions(pathServiceSid, pathSid);

            return(await DeleteAsync(options, client));
        }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 private static Request BuildDeleteRequest(DeleteFieldTypeOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/understand/Services/" + options.PathServiceSid + "/FieldTypes/" + options.PathSid + "",
                client.Region,
                queryParams: options.GetParams()
                ));
 }
Exemplo n.º 4
0
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FieldType </returns>
        public static bool Delete(string pathServiceSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new DeleteFieldTypeOptions(pathServiceSid, pathSid);

            return(Delete(options, client));
        }