/// <summary> /// delete /// </summary> /// <param name="options"> Delete SyncMapItem parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncMapItem </returns> public static bool Delete(DeleteSyncMapItemOptions 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 SyncMapItem parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncMapItem </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteSyncMapItemOptions 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="pathServiceSid"> The service_sid </param> /// <param name="pathMapSid"> The map_sid </param> /// <param name="pathKey"> The key </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SyncMapItem </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid, string pathMapSid, string pathKey, ITwilioRestClient client = null) { var options = new DeleteSyncMapItemOptions(pathServiceSid, pathMapSid, pathKey); return(await DeleteAsync(options, client)); }
private static Request BuildDeleteRequest(DeleteSyncMapItemOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.Preview, "/Sync/Services/" + options.PathServiceSid + "/Maps/" + options.PathMapSid + "/Items/" + options.PathKey + "", queryParams: options.GetParams() )); }
/// <summary> /// delete /// </summary> /// <param name="pathServiceSid"> The service_sid </param> /// <param name="pathMapSid"> The map_sid </param> /// <param name="pathKey"> The key </param> /// <param name="ifMatch"> The If-Match HTTP request header </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SyncMapItem </returns> public static bool Delete(string pathServiceSid, string pathMapSid, string pathKey, string ifMatch = null, ITwilioRestClient client = null) { var options = new DeleteSyncMapItemOptions(pathServiceSid, pathMapSid, pathKey) { IfMatch = ifMatch }; return(Delete(options, client)); }