コード例 #1
0
 private static Request BuildReadRequest(ReadAuthCallsCredentialListMappingOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/Auth/Calls/CredentialListMappings.json",
                queryParams: options.GetParams()
                ));
 }
コード例 #2
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="options"> Read AuthCallsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthCallsCredentialListMapping </returns>
        public static ResourceSet <AuthCallsCredentialListMappingResource> Read(ReadAuthCallsCredentialListMappingOptions options,
                                                                                ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

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

            return(new ResourceSet <AuthCallsCredentialListMappingResource>(page, options, client));
        }
コード例 #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> Task that resolves to A single instance of AuthCallsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AuthCallsCredentialListMappingResource> > ReadAsync(string pathDomainSid,
                                                                                                                          string pathAccountSid    = null,
                                                                                                                          int?pageSize             = null,
                                                                                                                          long?limit               = null,
                                                                                                                          ITwilioRestClient client = null)
        {
            var options = new ReadAuthCallsCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
コード例 #4
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 AuthCallsCredentialListMapping </returns>
        public static ResourceSet <AuthCallsCredentialListMappingResource> Read(string pathDomainSid,
                                                                                string pathAccountSid    = null,
                                                                                int?pageSize             = null,
                                                                                long?limit               = null,
                                                                                ITwilioRestClient client = null)
        {
            var options = new ReadAuthCallsCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
コード例 #5
0
        /// <summary>
        /// Retrieve a list of credential list mappings belonging to the domain used in the request
        /// </summary>
        /// <param name="options"> Read AuthCallsCredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthCallsCredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AuthCallsCredentialListMappingResource> > ReadAsync(ReadAuthCallsCredentialListMappingOptions options,
                                                                                                                          ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

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

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