Exemple #1
0
        /// <summary>
        /// Delete an IP Access Control List mapping from the requested domain
        /// </summary>
        /// <param name="options"> Delete AuthCallsIpAccessControlListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static bool Delete(DeleteAuthCallsIpAccessControlListMappingOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Exemple #2
0
        /// <summary>
        /// Delete an IP Access Control List mapping from the requested domain
        /// </summary>
        /// <param name="options"> Delete AuthCallsIpAccessControlListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteAuthCallsIpAccessControlListMappingOptions options,
                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
 private static Request BuildDeleteRequest(DeleteAuthCallsIpAccessControlListMappingOptions options,
                                           ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Calls/IpAccessControlListMappings/" + options.PathSid + ".json",
                queryParams: options.GetParams()
                ));
 }
Exemple #4
0
        /// <summary>
        /// Delete an IP Access Control List mapping from the requested domain
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resources to delete </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resources to delete </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathDomainSid,
                                                                           string pathSid,
                                                                           string pathAccountSid    = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteAuthCallsIpAccessControlListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(await DeleteAsync(options, client));
        }
Exemple #5
0
        /// <summary>
        /// Delete an IP Access Control List mapping from the requested domain
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resources to delete </param>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resources to delete </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthCallsIpAccessControlListMapping </returns>
        public static bool Delete(string pathDomainSid,
                                  string pathSid,
                                  string pathAccountSid    = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteAuthCallsIpAccessControlListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(Delete(options, client));
        }