private static Request BuildReadRequest(ReadAuthRegistrationsCredentialListMappingOptions options,
                                         ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Registrations/CredentialListMappings.json",
                queryParams: options.GetParams()
                ));
 }
Example #2
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resources to read </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resources to read </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </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 <ResourceSet <AuthRegistrationsCredentialListMappingResource> > ReadAsync(string pathDomainSid,
                                                                                                                                  string pathAccountSid    = null,
                                                                                                                                  int?pageSize             = null,
                                                                                                                                  long?limit               = null,
                                                                                                                                  ITwilioRestClient client = null)
        {
            var options = new ReadAuthRegistrationsCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Example #3
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="pathDomainSid"> The SID of the SIP domain that contains the resources to read </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resources to read </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static ResourceSet <AuthRegistrationsCredentialListMappingResource> Read(string pathDomainSid,
                                                                                        string pathAccountSid    = null,
                                                                                        int?pageSize             = null,
                                                                                        long?limit               = null,
                                                                                        ITwilioRestClient client = null)
        {
            var options = new ReadAuthRegistrationsCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Example #4
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="options"> Read 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 <ResourceSet <AuthRegistrationsCredentialListMappingResource> > ReadAsync(ReadAuthRegistrationsCredentialListMappingOptions options,
                                                                                                                                  ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <AuthRegistrationsCredentialListMappingResource> .FromJson("contents", response.Content);

            return(new ResourceSet <AuthRegistrationsCredentialListMappingResource>(page, options, client));
        }
Example #5
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="options"> Read AuthRegistrationsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthRegistrationsCredentialListMapping </returns>
        public static ResourceSet <AuthRegistrationsCredentialListMappingResource> Read(ReadAuthRegistrationsCredentialListMappingOptions options,
                                                                                        ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <AuthRegistrationsCredentialListMappingResource> .FromJson("contents", response.Content);

            return(new ResourceSet <AuthRegistrationsCredentialListMappingResource>(page, options, client));
        }