Ejemplo n.º 1
0
        public OTAUpdatesServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new OTAUpdatesService();

            this.listOptions = new ListOTAUpdatesOptions
            {
                PageNumber      = 1,
                PageSize        = 20,
                FilterSimCardId = null,
                FilterStatus    = null,
                FilterType      = null
            };

            this.requestOptions = new RequestOptions();
        }
Ejemplo n.º 2
0
        public TelnyxList <OTAUpdatesRecord> List()
        {
            TelnyxList <OTAUpdatesRecord> result      = new TelnyxList <OTAUpdatesRecord>();
            ListOTAUpdatesOptions         listOptions = new ListOTAUpdatesOptions
            {
                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);
        }
Ejemplo n.º 3
0
        public async Task <TelnyxList <OTAUpdatesRecord> > ListAsync()
        {
            TelnyxList <OTAUpdatesRecord> result      = new TelnyxList <OTAUpdatesRecord>();
            ListOTAUpdatesOptions         listOptions = new ListOTAUpdatesOptions
            {
                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);
        }