Beispiel #1
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathDomainSid"> The domain_sid </param>
        /// <param name="pathAccountSid"> The account_sid </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 CredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <CredentialListMappingResource> > ReadAsync(string pathDomainSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="options"> Read CredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CredentialListMapping </returns>
        public static ResourceSet <CredentialListMappingResource> Read(ReadCredentialListMappingOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <CredentialListMappingResource> .FromJson("credential_list_mappings", response.Content);

            return(new ResourceSet <CredentialListMappingResource>(page, options, client));
        }
Beispiel #3
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathDomainSid"> The domain_sid </param>
        /// <param name="pathAccountSid"> The account_sid </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 CredentialListMapping </returns>
        public static ResourceSet <CredentialListMappingResource> Read(string pathDomainSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadCredentialListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Beispiel #4
0
 private static Request BuildReadRequest(ReadCredentialListMappingOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/CredentialListMappings.json",
                queryParams: options.GetParams()
                ));
 }
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read CredentialListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CredentialListMapping </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <CredentialListMappingResource> > ReadAsync(ReadCredentialListMappingOptions options,
                                                                                                                 ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <CredentialListMappingResource> .FromJson("credential_list_mappings", response.Content);

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