public MobileOperatorNetworksServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new MobileOperatorNetworksService();

            this.listOptions = new ListMobileOperatorNetworksOptions
            {
                PageNumber = 1,
                PageSize   = 20,
            };

            this.requestOptions = new RequestOptions();
        }
예제 #2
0
        public MobileOperatorNetworksServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new MobileOperatorNetworksService();

            this.listOptions = new ListMobileOperatorNetworksOptions
            {
                PageNumber           = 1,
                PageSize             = 20,
                FilterNameStartsWith = null,
                FilterNameContains   = null,
                FilterNameEndsWith   = null,
                FilterCountryCode    = null,
                FilterMcc            = null,
                FilterMnc            = null,
                FilterTadig          = null
            };

            this.requestOptions = new RequestOptions();
        }
        public TelnyxList <MobileOperatorNetworksRecord> List()
        {
            TelnyxList <MobileOperatorNetworksRecord> result      = new TelnyxList <MobileOperatorNetworksRecord>();
            ListMobileOperatorNetworksOptions         listOptions = new ListMobileOperatorNetworksOptions
            {
                PageNumber = 1,
                PageSize   = 20
            };

            Console.WriteLine(JsonConvert.SerializeObject(listOptions));

            try
            {
                result = service.List(listOptions);
                Console.WriteLine(JsonConvert.SerializeObject(result));
            }
            catch (TelnyxException ex)
            {
                Console.WriteLine("exception");
                Console.WriteLine(JsonConvert.SerializeObject(ex));
            }
            return(result);
        }
        public async Task <TelnyxList <MobileOperatorNetworksRecord> > ListAsync()
        {
            TelnyxList <MobileOperatorNetworksRecord> result      = new TelnyxList <MobileOperatorNetworksRecord>();
            ListMobileOperatorNetworksOptions         listOptions = new ListMobileOperatorNetworksOptions
            {
                PageNumber = 1,
                PageSize   = 20
            };

            Console.WriteLine(JsonConvert.SerializeObject(listOptions));

            try
            {
                result = await service.ListAsync(listOptions, null, new CancellationToken());

                Console.WriteLine(JsonConvert.SerializeObject(result));
            }
            catch (TelnyxException ex)
            {
                Console.WriteLine("exception");
                Console.WriteLine(JsonConvert.SerializeObject(ex));
            }
            return(result);
        }