Beispiel #1
0
        public async Task ListPhoneNumbersWithPagingAsync()
        {
            var listOptions = new NumberConfigurationsListOptions
            {
                PageNumber = 1,
                PageSize   = 2
            };
            var res = await numConfigService.ListPhoneNumbersAsync(listOptions);

            Console.WriteLine(JsonConvert.SerializeObject(res));
        }
Beispiel #2
0
        public async Task ListPhoneNumbersWithFiltersAsync()
        {
            var listOptions = new NumberConfigurationsListOptions
            {
                Status               = NumberConfigStatus.Active,
                PageNumber           = 1,
                NumberOfPagesToFetch = 3,
                PageSize             = 3
            };
            var res = await numConfigService.ListPhoneNumbersAsync(listOptions);

            Console.WriteLine(res.TelnyxResponse.ObjectJson);
        }
Beispiel #3
0
        public NumberConfigurationServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new NumberConfigurationService();

            this.updateOptions = new NumberConfigurationOptions
            {
                BillingGroupId = "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
                ConnectionId   = "1293384261075731499",
                ExternalPin    = "0738",
                Tags           = new List <string> {
                    "test"
                }
            };
            this.listOptions = new NumberConfigurationsListOptions
            {
                PageNumber = 1,
                PageSize   = 20,
                //PhoneNumber = "+19705555098",
                //Status = NumberConfigStatus.Active,
                //Size = 10,
                //Tag = "region_5",
            };
        }