/// <summary>
        /// Delete a specific Sync Map Permission.
        /// </summary>
        /// <param name="options"> Delete SyncMapPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMapPermission </returns>
        public static bool Delete(DeleteSyncMapPermissionOptions 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 Map Permission.
        /// </summary>
        ///
        /// <param name="options"> Delete SyncMapPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncMapPermission </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteSyncMapPermissionOptions 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 Map Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathMapSid"> Sync Map SID or unique name. </param>
        /// <param name="pathIdentity"> Identity of the user to whom the Sync Map Permission applies. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncMapPermission </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid,
                                                                           string pathMapSid,
                                                                           string pathIdentity,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteSyncMapPermissionOptions(pathServiceSid, pathMapSid, pathIdentity);

            return(await DeleteAsync(options, client));
        }
        /// <summary>
        /// Delete a specific Sync Map Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathMapSid"> Sync Map SID or unique name. </param>
        /// <param name="pathIdentity"> Identity of the user to whom the Sync Map Permission applies. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMapPermission </returns>
        public static bool Delete(string pathServiceSid,
                                  string pathMapSid,
                                  string pathIdentity,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteSyncMapPermissionOptions(pathServiceSid, pathMapSid, pathIdentity);

            return(Delete(options, client));
        }
 private static Request BuildDeleteRequest(DeleteSyncMapPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Maps/" + options.PathMapSid + "/Permissions/" + options.PathIdentity + "",
                queryParams: options.GetParams()
                ));
 }