Ejemplo n.º 1
0
        /// <summary>
        /// Delete a credential list mapping from the requested domain
        /// </summary>
        /// <param name="options"> Delete AuthRegistrationsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static bool Delete(DeleteAuthRegistrationsCredentialListMappingOptions options,
                                  ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildDeleteRequest(options, client));

            return(response.StatusCode == System.Net.HttpStatusCode.NoContent);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Delete a credential list mapping from the requested domain
        /// </summary>
        /// <param name="options"> Delete AuthRegistrationsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(DeleteAuthRegistrationsCredentialListMappingOptions 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(DeleteAuthRegistrationsCredentialListMappingOptions options,
                                           ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Delete,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Registrations/CredentialListMappings/" + options.PathSid + ".json",
                queryParams: options.GetParams()
                ));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Delete a credential 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 AuthRegistrationsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathDomainSid,
                                                                           string pathSid,
                                                                           string pathAccountSid    = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteAuthRegistrationsCredentialListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(await DeleteAsync(options, client));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Delete a credential 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 AuthRegistrationsCredentialListMapping </returns>
        public static bool Delete(string pathDomainSid,
                                  string pathSid,
                                  string pathAccountSid    = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteAuthRegistrationsCredentialListMappingOptions(pathDomainSid, pathSid)
            {
                PathAccountSid = pathAccountSid
            };

            return(Delete(options, client));
        }