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); }
public void SetBillingAddress(BillingAddress billingAddress) { BillingAddress = billingAddress; }
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); }