Exemple #1
0
 private static Request BuildReadRequest(ReadNetworkAccessProfileOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Supersim,
                "/v1/NetworkAccessProfiles",
                queryParams: options.GetParams()
                ));
 }
Exemple #2
0
        /// <summary>
        /// Retrieve a list of Network Access Profiles from your account.
        /// </summary>
        /// <param name="options"> Read NetworkAccessProfile parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of NetworkAccessProfile </returns>
        public static ResourceSet <NetworkAccessProfileResource> Read(ReadNetworkAccessProfileOptions options,
                                                                      ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <NetworkAccessProfileResource> .FromJson("network_access_profiles", response.Content);

            return(new ResourceSet <NetworkAccessProfileResource>(page, options, client));
        }
Exemple #3
0
        /// <summary>
        /// Retrieve a list of Network Access Profiles from your account.
        /// </summary>
        /// <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 NetworkAccessProfile </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <NetworkAccessProfileResource> > ReadAsync(int?pageSize             = null,
                                                                                                                long?limit               = null,
                                                                                                                ITwilioRestClient client = null)
        {
            var options = new ReadNetworkAccessProfileOptions()
            {
                PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Exemple #4
0
        /// <summary>
        /// Retrieve a list of Network Access Profiles from your account.
        /// </summary>
        /// <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 NetworkAccessProfile </returns>
        public static ResourceSet <NetworkAccessProfileResource> Read(int?pageSize             = null,
                                                                      long?limit               = null,
                                                                      ITwilioRestClient client = null)
        {
            var options = new ReadNetworkAccessProfileOptions()
            {
                PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Exemple #5
0
        /// <summary>
        /// Retrieve a list of Network Access Profiles from your account.
        /// </summary>
        /// <param name="options"> Read NetworkAccessProfile parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of NetworkAccessProfile </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <NetworkAccessProfileResource> > ReadAsync(ReadNetworkAccessProfileOptions options,
                                                                                                                ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <NetworkAccessProfileResource> .FromJson("network_access_profiles", response.Content);

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