示例#1
0
 public BusinessLegal(Guid id, Business business, LegalKind kind, string name, string email, string siret, string vatIdentifier, LegalAddress address, Owner owner, BillingAddress billingAddress)
     : base(id, kind, business, owner)
 {
     SetName(name);
     SetEmail(email);
     SetAddress(address);
     SetBillingAddress(billingAddress);
     SetSiret(siret);
     SetVatIdentifier(vatIdentifier);
 }
示例#2
0
 public void SetBillingAddress(BillingAddress billingAddress)
 {
     BillingAddress = billingAddress;
 }
示例#3
0
        public BusinessLegal SetLegals(LegalKind kind, string name, string email, string siret, string vatIdentifier, LegalAddress address, BillingAddress billingAddress, Owner owner, string registrationCity = null, string registrationCode = null, RegistrationKind?registrationKind = null)
        {
            if (Legal?.Id != null)
            {
                throw SheaftException.AlreadyExists("Les informations légales de cette société existent déjà.");
            }

            var legals = new BusinessLegal(Guid.NewGuid(), this, kind, name, email, siret, vatIdentifier, address, owner, billingAddress);

            if (registrationKind.HasValue)
            {
                legals.SetRegistrationKind(registrationKind.Value, registrationCity, registrationCode);
            }

            Legal = legals;

            return(legals);
        }