public async Task CreateEvent(ApprenticeshipEvent request)
        {
            try
            {
                _logger.Info($"Creating Apprenticeship Event ({request.Event}) for Employer: {request.EmployerAccountId}, Provider: {request.ProviderId}", @event: request.Event, accountId: request.EmployerAccountId, providerId: request.ProviderId);

                await _mediator.SendAsync(new CreateApprenticeshipEventCommand
                {
                    Event                            = request.Event,
                    ApprenticeshipId                 = request.ApprenticeshipId,
                    PaymentStatus                    = (Domain.Entities.PaymentStatus)request.PaymentStatus,
                    PausedOnDate                     = request.PausedOnDate,
                    StoppedOnDate                    = request.StoppedOnDate,
                    AgreementStatus                  = (Domain.Entities.AgreementStatus)request.AgreementStatus,
                    ProviderId                       = request.ProviderId,
                    LearnerId                        = request.LearnerId,
                    EmployerAccountId                = request.EmployerAccountId,
                    TrainingType                     = (Domain.Entities.TrainingTypes)request.TrainingType,
                    TrainingId                       = request.TrainingId,
                    TrainingStartDate                = request.TrainingStartDate,
                    TrainingEndDate                  = request.TrainingEndDate,
                    TrainingTotalCost                = request.TrainingTotalCost,
                    PaymentOrder                     = request.PaymentOrder,
                    LegalEntityId                    = request.LegalEntityId,
                    LegalEntityName                  = request.LegalEntityName,
                    LegalEntityOrganisationType      = request.LegalEntityOrganisationType,
                    AccountLegalEntityPublicHashedId = request.AccountLegalEntityPublicHashedId,
                    EffectiveFrom                    = request.EffectiveFrom,
                    EffectiveTo                      = request.EffectiveTo,
                    DateOfBirth                      = request.DateOfBirth,
                    PriceHistory                     = request.PriceHistory?.Select(ToDomainModel).ToList() ?? new List <Domain.Entities.PriceHistory>(),
                    TransferSenderId                 = request.TransferSenderId,
                    TransferSenderName               = request.TransferSenderName ?? string.Empty,
                    TransferApprovalStatus           = (Domain.Entities.TransferApprovalStatus?)request.TransferApprovalStatus,
                    TransferApprovalActionedOn       = request.TransferApprovalActionedOn
                });
            }
            catch (ValidationException ex)
            {
                _logger.Warn(ex, "Invalid request", accountId: request.EmployerAccountId, providerId: request.ProviderId, @event: request.Event);
                throw;
            }
            catch (Exception ex)
            {
                _logger.Error(ex, ex.Message);
                throw;
            }
        }
        public async Task CreateEvent(AccountEvent request)
        {
            try
            {
                _logger.Info($"Creating Account Event ({request.Event})", accountId: request.ResourceUri, @event: request.Event);

                await _mediator.SendAsync(new CreateAccountEventCommand
                {
                    Event       = request.Event,
                    ResourceUri = request.ResourceUri
                });
            }
            catch (ValidationException ex)
            {
                _logger.Warn(ex, "Invalid request", accountId: request.ResourceUri, @event: request.Event);
                throw;
            }
            catch (Exception ex)
            {
                _logger.Error(ex, ex.Message);
                throw;
            }
        }
        public async Task CreateEvent(AgreementEvent request)
        {
            try
            {
                _logger.Info($"Creating Agreement Event ({request.Event}), Contract: {request.ContractType}, Provider: {request.ProviderId}", providerId: request.ProviderId, @event: request.Event);

                await _mediator.SendAsync(new CreateAgreementEventCommand
                {
                    Event        = request.Event,
                    ProviderId   = request.ProviderId,
                    ContractType = request.ContractType
                });
            }
            catch (ValidationException ex)
            {
                _logger.Warn(ex, "Invalid request", providerId: request.ProviderId, @event: request.Event);
                throw;
            }
            catch (Exception ex)
            {
                _logger.Error(ex, ex.Message);
                throw;
            }
        }