public TelnyxList <WebRtcCredential> List() { TelnyxList <WebRtcCredential> result = new TelnyxList <WebRtcCredential>(); ListOptions listOptions = new ListOptions { 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 TelnyxList <CallControlApplication> List() { TelnyxList <CallControlApplication> callControlApplications = new TelnyxList <CallControlApplication>(); ListCallControlApplicationOptions listCallControlApplicationOptions = new ListCallControlApplicationOptions { PageNumber = 1, PageSize = 20 }; Console.WriteLine(JsonConvert.SerializeObject(listCallControlApplicationOptions)); try { callControlApplications = callControlApplicationService.List(listCallControlApplicationOptions); Console.WriteLine(JsonConvert.SerializeObject(callControlApplications)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } return(callControlApplications); }
public TelnyxList <OutboundVoiceProfile> List() { TelnyxList <OutboundVoiceProfile> outboundVoiceProfiles = new TelnyxList <OutboundVoiceProfile>(); ListOutboundVoiceProfileOptions listOutboundVoiceProfileOptions = new ListOutboundVoiceProfileOptions { PageNumber = 1, PageSize = 20 }; Console.WriteLine(JsonConvert.SerializeObject(listOutboundVoiceProfileOptions)); try { outboundVoiceProfiles = outboundVoiceProfileService.List(listOutboundVoiceProfileOptions); Console.WriteLine(JsonConvert.SerializeObject(outboundVoiceProfiles)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } return(outboundVoiceProfiles); }
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 <WebRtcCredential> > ListAsync() { TelnyxList <WebRtcCredential> result = new TelnyxList <WebRtcCredential>(); ListOptions listOptions = new ListOptions { 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); }