/// <summary> /// Delete a specific Sync Document Permission. /// </summary> /// <param name="options"> Delete DocumentPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of DocumentPermission </returns> public static bool Delete(DeleteDocumentPermissionOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildDeleteRequest(options, client)); return(response.StatusCode == System.Net.HttpStatusCode.NoContent); }
/// <summary> /// Delete a specific Sync Document Permission. /// </summary> /// /// <param name="options"> Delete DocumentPermission parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of DocumentPermission </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteDocumentPermissionOptions 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 a specific Sync Document Permission. /// </summary> /// <param name="pathServiceSid"> The SID of the Sync Service with the Document Permission resource to delete </param> /// <param name="pathDocumentSid"> The SID of the Sync Document with the Document Permission resource to delete </param> /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Document Permission /// resource to delete </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of DocumentPermission </returns> public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid, string pathDocumentSid, string pathIdentity, ITwilioRestClient client = null) { var options = new DeleteDocumentPermissionOptions(pathServiceSid, pathDocumentSid, pathIdentity); return(await DeleteAsync(options, client)); }
/// <summary> /// Delete a specific Sync Document Permission. /// </summary> /// <param name="pathServiceSid"> The SID of the Sync Service with the Document Permission resource to delete </param> /// <param name="pathDocumentSid"> The SID of the Sync Document with the Document Permission resource to delete </param> /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Document Permission /// resource to delete </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of DocumentPermission </returns> public static bool Delete(string pathServiceSid, string pathDocumentSid, string pathIdentity, ITwilioRestClient client = null) { var options = new DeleteDocumentPermissionOptions(pathServiceSid, pathDocumentSid, pathIdentity); return(Delete(options, client)); }
private static Request BuildDeleteRequest(DeleteDocumentPermissionOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Delete, Rest.Domain.Sync, "/v1/Services/" + options.PathServiceSid + "/Documents/" + options.PathDocumentSid + "/Permissions/" + options.PathIdentity + "", queryParams: options.GetParams() )); }