private void AddBillingOfficePhone(BillingOfficePhoneDto billingOfficePhoneDto, BillingOffice billingOffice) { var phoneType = _mappingHelper.MapLookupField <BillingOfficePhoneType> (billingOfficePhoneDto.BillingOfficePhoneType); var phoneNumber = new PhoneBuilder() .WithPhoneNumber(billingOfficePhoneDto.PhoneNumber) .WithPhoneExtensionNumber(billingOfficePhoneDto.Extension) .Build(); var billingOfficePhone = new BillingOfficePhone(phoneType, phoneNumber); billingOffice.AddPhoneNumber(billingOfficePhone); }
private static void RemoveBillingOfficePhone( BillingOfficePhoneDto billingOfficePhoneDto, BillingOffice billingOffice, BillingOfficePhone billingOfficePhone) { billingOffice.RemovePhoneNumber(billingOfficePhone); }
private void ChangeBillingOfficePhone( BillingOfficePhoneDto billingOfficePhoneDto, BillingOffice billingOffice, BillingOfficePhone billingOfficePhone) { RemoveBillingOfficePhone(billingOfficePhoneDto, billingOffice, billingOfficePhone); AddBillingOfficePhone(billingOfficePhoneDto, billingOffice); }