private void Handle(V1.ClearanceCreated @event) { Id = ClearanceId.FromGuid(@event.ClearanceId); UserAccounts = @event.UserAccounts.Select(x => UserAccount.FromUserGuidAndAccountGuid(x.Key, x.Value)).ToList(); Period = Period.FromStartAndEndDate(@event.StartDate, @event.EndDate); State = ClearanceState.CreateOpen(); }
private void Handle(V1.ClearanceFinalized @event) { PaymentSettlement = new PaymentSettlement(@event); State = ClearanceState.CreateClosed(); }