public static void DeletePhoneFromSubscriberAccount(string subID, string phoneNumber) { try { using (var client = new RosettianClient()) { client.DeleteSubscriberPhone(subID, phoneNumber, CurrentUser.AsUserDto()); } } catch (Exception) { } }
/// <summary> /// RestorePhone - deletes and then recreates the subscriber phones /// </summary> /// <param name="subId"></param> /// <param name="expected"></param> public static void RestorePhone(string subId, List<PhoneDto> expected) { using (var client = new RosettianClient()) { var actual = client.LoadSubscriberPhones(subId, user); actual.ForEach(x => client.DeleteSubscriberPhone(subId, x.PhoneNumber, user)); if (expected != null) { expected.ForEach(x => client.CreateSubscriberPhone(subId, x, user)); } } }