public void RegisterPayment(PaymentTerm term, PayerId payerId)
        {
            var meetingGroupPayment = new MeetingGroupPayment(term, payerId);

            this.CheckRule(new MeetingGroupPaymentsCannotOverlapRule(_payments, meetingGroupPayment));

            _payments.Add(meetingGroupPayment);

            this.AddDomainEvent(new PaymentRegisteredDomainEvent(this.Id, term.EndDate));
        }
Exemple #2
0
 internal bool OverlapsWith(MeetingGroupPayment payment)
 {
     return(_term.OverlapsWith(payment.GetTerm()));
 }