/// <summary> /// List number reservation /// </summary> public void ListNumberReservation() { var listOptions = new NumberReservationsListOptions(); Console.WriteLine(JsonConvert.SerializeObject(listOptions)); try { var numberReservationList = this.service.List(listOptions); Console.WriteLine(JsonConvert.SerializeObject(numberReservationList)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } }
/// <summary> /// List number reservation /// </summary> public void ListNumberReservation() { var listOptions = new NumberReservationsListOptions(); Console.WriteLine(JsonConvert.SerializeObject(listOptions)); var requestOptions = new RequestOptions { ApiKey = YOURAPIKEY }; Console.WriteLine(JsonConvert.SerializeObject(requestOptions)); var numberReservationList = this.service.List(listOptions, requestOptions); Console.WriteLine(JsonConvert.SerializeObject(numberReservationList)); }
public NumberReservationsServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new NumberReservationsService(); this.listOptions = new NumberReservationsListOptions() { Status = "enabled", CreatedAtGt = null, CreatedAtLt = null, PhoneNumbersPhoneNumber = "9830094821", CustomerReference = "Reference001" }; this.createOptions = new NumberReservation { PhoneNumbers = new List <ReservedPhoneNumber>() { new ReservedPhoneNumber { PhoneNumber = "+18665552368" } } }; }