Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BillingOffice"/> class.
 /// </summary>
 /// <param name="agency">The agency.</param>
 /// <param name="administratorStaff">The administrator staff.</param>
 /// <param name="electronicTransmitterIdentificationNumber">The electronic transmitter identification number.</param>
 /// <param name="profile">The profile.</param>
 protected internal BillingOffice(
     Agency agency, Staff administratorStaff, string electronicTransmitterIdentificationNumber, BillingOfficeProfile profile)
     : this()
 {
     Check.IsNotNull(agency, () => Agency);
     Check.IsNotNull(administratorStaff, () => AdministratorStaff);
     Check.IsNotNull(electronicTransmitterIdentificationNumber, () => ElectronicTransmitterIdentificationNumber);
     Check.IsNotNull(profile, () => Profile);
     Agency             = agency;
     AdministratorStaff = administratorStaff;
     ElectronicTransmitterIdentificationNumber = electronicTransmitterIdentificationNumber;
     Profile = profile;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Revises the profile.
 /// </summary>
 /// <param name="profile">The profile.</param>
 public virtual void ReviseProfile(BillingOfficeProfile profile)
 {
     Check.IsNotNull(profile, () => Profile);
     Profile = profile;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Creates the billing office.
        /// </summary>
        /// <param name="agency">The agency.</param>
        /// <param name="administratorStaff">The administrator staff.</param>
        /// <param name="electronicTransmitterIdentificationNumber">The electronic transmitter identification number.</param>
        /// <param name="profile">The profile.</param>
        /// <returns>The Billing Office.</returns>
        public BillingOffice CreateBillingOffice(
            Agency agency, Staff administratorStaff, string electronicTransmitterIdentificationNumber, BillingOfficeProfile profile)
        {
            Check.IsNotNull(agency, "Agency is required.");
            Check.IsNotNull(administratorStaff, "Administrator Staff is required.");
            Check.IsNotNull(electronicTransmitterIdentificationNumber, "Electronic Transmitter Identification Number is required.");

            var billingOffice = new BillingOffice(agency, administratorStaff, electronicTransmitterIdentificationNumber, profile);

            _billingOfficeRepository.MakePersistent(billingOffice);

            return(billingOffice);
        }