/// <summary>
        /// Delete a specific Sync List Permission.
        /// </summary>
        /// <param name="options"> Delete SyncListPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncListPermission </returns>
        public static bool Delete(DeleteSyncListPermissionOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Delete a specific Sync List Permission.
        /// </summary>
        ///
        /// <param name="options"> Delete SyncListPermission parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListPermission </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteSyncListPermissionOptions 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 List Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathListSid"> Sync List SID or unique name. </param>
        /// <param name="pathIdentity"> Identity of the user to whom the Sync List Permission applies. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncListPermission </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid,
                                                                           string pathListSid,
                                                                           string pathIdentity,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteSyncListPermissionOptions(pathServiceSid, pathListSid, pathIdentity);

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

            return(Delete(options, client));
        }
Exemplo n.º 5
0
 private static Request BuildDeleteRequest(DeleteSyncListPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions/" + options.PathIdentity + "",
                queryParams: options.GetParams()
                ));
 }