public MessagingPhoneNumbersServiceTest(MockHttpClientFixture mockHttpClientFixture) : base(mockHttpClientFixture) { this.service = new MessagingPhoneNumbersService(); this.updateOptions = new MessagingPhoneNumberUpdate { MessagingProfileId = new Guid("3fa85f64-5717-4562-b3fc-2c963f66afa6") }; }
/// <summary> /// Update phone number /// </summary> public void UpdatePhoneNumber() { var id = "+18665550001"; var guid = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; var updateOptions = new MessagingPhoneNumberUpdate { MessagingProfileId = new Guid(guid) }; Console.WriteLine(JsonConvert.SerializeObject(updateOptions)); try { var numberOrder = this.service.Update(id, updateOptions); Console.WriteLine(JsonConvert.SerializeObject(numberOrder)); } catch (TelnyxException ex) { Console.WriteLine("exception"); Console.WriteLine(JsonConvert.SerializeObject(ex)); } }