Example #1
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> 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);
        }
Example #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);
        }
Example #3
0
        /// <summary>
        /// Delete a specific Sync List Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to delete </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to delete </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to delete </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));
        }
Example #4
0
        /// <summary>
        /// Delete a specific Sync List Permission.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Sync List Permission resource to delete </param>
        /// <param name="pathListSid"> The SID of the Sync List with the Sync List Permission resource to delete </param>
        /// <param name="pathIdentity"> The application-defined string that uniquely identifies the User's Sync List Permission
        ///                    resource to delete </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));
        }
Example #5
0
 private static Request BuildDeleteRequest(DeleteSyncListPermissionOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Sync,
                "/v1/Services/" + options.PathServiceSid + "/Lists/" + options.PathListSid + "/Permissions/" + options.PathIdentity + "",
                queryParams: options.GetParams()
                ));
 }