public static MeetingFeePayment Create( MeetingFeeId meetingFeeId) { var meetingFeePayment = new MeetingFeePayment(); var meetingFeePaymentCreated = new MeetingFeePaymentCreatedDomainEvent( Guid.NewGuid(), meetingFeeId.Value, MeetingFeePaymentStatus.WaitingForPayment.Code); meetingFeePayment.Apply(meetingFeePaymentCreated); meetingFeePayment.AddDomainEvent(meetingFeePaymentCreated); return(meetingFeePayment); }
private void When(MeetingFeePaymentCreatedDomainEvent @event) { this.Id = @event.MeetingFeePaymentId; _meetingFeeId = new MeetingFeeId(@event.MeetingFeeId); _status = MeetingFeePaymentStatus.Of(@event.Status); }