Esempio n. 1
0
 public UpdateApprenticeshipStatusCommandHandler(IEmployerCommitmentApi commitmentsApi, IMediator mediator, ICurrentDateTime currentDateTime, IValidator <UpdateApprenticeshipStatusCommand> validator)
 {
     _commitmentsApi  = commitmentsApi;
     _mediator        = mediator;
     _currentDateTime = currentDateTime;
     _validator       = validator;
 }
Esempio n. 2
0
 public GetAccountEmployerAgreementsRemoveQueryHandler(IValidator <GetAccountEmployerAgreementsRemoveRequest> validator, IEmployerAgreementRepository employerAgreementRepository, IHashingService hashingService, IEmployerCommitmentApi employerCommitmentApi)
 {
     _validator = validator;
     _employerAgreementRepository = employerAgreementRepository;
     _hashingService        = hashingService;
     _employerCommitmentApi = employerCommitmentApi;
 }
Esempio n. 3
0
 public RemoveLegalEntityCommandHandler(
     IValidator <RemoveLegalEntityCommand> validator,
     ILog logger,
     IEmployerAgreementRepository employerAgreementRepository,
     IMediator mediator,
     IAccountLegalEntityPublicHashingService accountLegalEntityHashingService,
     IHashingService hashingService,
     IGenericEventFactory genericEventFactory,
     IEmployerAgreementEventFactory employerAgreementEventFactory,
     IMembershipRepository membershipRepository,
     IEventPublisher eventPublisher,
     IEmployerCommitmentApi employerCommitmentApi)
 {
     _validator = validator;
     _logger    = logger;
     _employerAgreementRepository = employerAgreementRepository;
     _mediator = mediator;
     _accountLegalEntityHashingService = accountLegalEntityHashingService;
     _hashingService                = hashingService;
     _genericEventFactory           = genericEventFactory;
     _employerAgreementEventFactory = employerAgreementEventFactory;
     _membershipRepository          = membershipRepository;
     _eventPublisher                = eventPublisher;
     _employerCommitmentApi         = employerCommitmentApi;
 }
 public RemoveLegalEntityCommandValidator(IMembershipRepository membershipRepository, IEmployerAgreementRepository employerAgreementRepository, IHashingService hashingService, IEmployerCommitmentApi employerCommitmentApi)
 {
     _membershipRepository        = membershipRepository;
     _employerAgreementRepository = employerAgreementRepository;
     _hashingService        = hashingService;
     _employerCommitmentApi = employerCommitmentApi;
 }
Esempio n. 5
0
 public GetCommitmentQueryHandler(IEmployerCommitmentApi commitmentsApi)
 {
     if (commitmentsApi == null)
     {
         throw new ArgumentNullException(nameof(commitmentsApi));
     }
     _commitmentsApi = commitmentsApi;
 }
Esempio n. 6
0
 public DeleteApprenticeshipCommandHandler(
     IEmployerCommitmentApi commitmentsApi,
     IValidator <DeleteApprenticeshipCommand> validator, IProviderEmailNotificationService providerEmailNotificationService)
 {
     _validator = validator;
     _providerEmailNotificationService = providerEmailNotificationService;
     _commitmentsApi = commitmentsApi;
 }
 public CreateApprenticeshipCommandHandler(IEmployerCommitmentApi commitmentsApi)
 {
     if (commitmentsApi == null)
     {
         throw new ArgumentNullException(nameof(commitmentsApi));
     }
     _commitmentsApi = commitmentsApi;
     _validator      = new CreateApprenticeshipCommandValidator();
 }
 public PaymentService(IPaymentsEventsApiClient paymentsEventsApiClient, IEmployerCommitmentApi commitmentsApiClient, IApprenticeshipInfoServiceWrapper apprenticeshipInfoService, IMapper mapper, ILog logger, ICacheProvider cacheProvider)
 {
     _paymentsEventsApiClient   = paymentsEventsApiClient;
     _commitmentsApiClient      = commitmentsApiClient;
     _apprenticeshipInfoService = apprenticeshipInfoService;
     _mapper        = mapper;
     _logger        = logger;
     _cacheProvider = cacheProvider;
 }
        public GetApprenticeshipUpdateHandler(IEmployerCommitmentApi commitmentApi)
        {
            if (commitmentApi == null)
            {
                throw new ArgumentNullException(nameof(commitmentApi));
            }

            _commitmentApi = commitmentApi;
        }
 public EmployerFeedbackDataRetrievalService(
     IEmployerCommitmentApi commitmentApiClient,
     IAccountApiClient accountApiClient,
     IStoreEmployerEmailDetails emailDetailsRepository)
 {
     _commitmentApiClient    = commitmentApiClient;
     _accountApiClient       = accountApiClient;
     _emailDetailsRepository = emailDetailsRepository;
 }
Esempio n. 11
0
 public UpdateApprenticeshipStatusCommandHandler(IEmployerCommitmentApi commitmentsApi,
                                                 ICurrentDateTime currentDateTime,
                                                 IValidator <UpdateApprenticeshipStatusCommand> validator,
                                                 IProviderEmailNotificationService providerEmailNotificationService)
 {
     _commitmentsApi  = commitmentsApi;
     _currentDateTime = currentDateTime;
     _validator       = validator;
     _providerEmailNotificationService = providerEmailNotificationService;
 }
 public ValidateStatusChangeDateQueryHandler(IValidator <ValidateStatusChangeDateQuery> queryValidator,
                                             ICurrentDateTime currentDate,
                                             IAcademicYearValidator academicYearValidator,
                                             IEmployerCommitmentApi commitmentsApi)
 {
     _queryValidator        = queryValidator;
     _currentDate           = currentDate;
     _academicYearValidator = academicYearValidator;
     _commitmentsApi        = commitmentsApi;
 }
 public GetTransferRequestsQueryHandler(
     Lazy <EmployerAccountsDbContext> db,
     IConfigurationProvider configurationProvider,
     IEmployerCommitmentApi employerCommitmentApi,
     IHashingService hashingService)
 {
     _db = db;
     _configurationProvider = configurationProvider;
     _employerCommitmentApi = employerCommitmentApi;
     _hashingService        = hashingService;
 }
        public SubmitCommitmentCommandHandler(
            IEmployerCommitmentApi commitmentApi,
            EmployerCommitmentsServiceConfiguration configuration,
            ILog logger, IProviderEmailService providerEmailService)
        {
            _commitmentApi        = commitmentApi;
            _configuration        = configuration;
            _logger               = logger;
            _providerEmailService = providerEmailService;

            _validator = new SubmitCommitmentCommandValidator();
        }
Esempio n. 15
0
 public PaymentService(IPaymentsEventsApiClient paymentsEventsApiClient,
                       IEmployerCommitmentApi commitmentsApiClient, IApprenticeshipInfoServiceWrapper apprenticeshipInfoService,
                       IMapper mapper, ILog logger, IInProcessCache inProcessCache, IProviderService providerService)
 {
     _paymentsEventsApiClient   = paymentsEventsApiClient;
     _commitmentsApiClient      = commitmentsApiClient;
     _apprenticeshipInfoService = apprenticeshipInfoService;
     _mapper          = mapper;
     _logger          = logger;
     _inProcessCache  = inProcessCache;
     _providerService = providerService;
 }
Esempio n. 16
0
 public TransferApprovalCommandHandler(
     IEmployerCommitmentApi commitmentsApi,
     EmployerCommitmentsServiceConfiguration configuration,
     ILog logger,
     IProviderEmailNotificationService providerEmailNotificationService,
     IEmployerEmailNotificationService employerEmailNotificationService)
 {
     _commitmentsService = commitmentsApi;
     _configuration      = configuration;
     _logger             = logger;
     _providerEmailNotificationService = providerEmailNotificationService;
     _employerEmailNotificationService = employerEmailNotificationService;
 }
Esempio n. 17
0
        public DeleteCommitmentCommandHandler(IEmployerCommitmentApi commitmentsApi, IValidator <DeleteCommitmentCommand> validator)
        {
            if (validator == null)
            {
                throw new ArgumentNullException(nameof(validator));
            }
            if (commitmentsApi == null)
            {
                throw new ArgumentNullException(nameof(commitmentsApi));
            }

            _validator          = validator;
            _commitmentsService = commitmentsApi;
        }
Esempio n. 18
0
        public ReviewApprenticeshipUpdateCommandHandler(Validation.IValidator <ReviewApprenticeshipUpdateCommand> validator,
                                                        IEmployerCommitmentApi commitmentsApi)
        {
            if (validator == null)
            {
                throw new ArgumentNullException(nameof(validator));
            }
            if (commitmentsApi == null)
            {
                throw new ArgumentNullException(nameof(commitmentsApi));
            }

            _validator      = validator;
            _commitmentsApi = commitmentsApi;
        }
        public SubmitCommitmentCommandHandler(
            IEmployerCommitmentApi commitmentApi,
            IMediator mediator,
            EmployerApprenticeshipsServiceConfiguration configuration,
            IProviderEmailLookupService providerEmailLookupService,
            ILogger logger)
        {
            _commitmentApi = commitmentApi;
            _mediator      = mediator;
            _configuration = configuration;
            _providerEmailLookupService = providerEmailLookupService;
            _logger = logger;

            _validator = new SubmitCommitmentCommandValidator();
        }
Esempio n. 20
0
        public ApprenticeshipSearchQueryHandler(IEmployerCommitmentApi employerCommitmentsApi, IHashingService hashingService)
        {
            if (employerCommitmentsApi == null)
            {
                throw new ArgumentNullException(nameof(employerCommitmentsApi));
            }

            if (hashingService == null)
            {
                throw new ArgumentNullException(nameof(hashingService));
            }

            _commitmentsApi = employerCommitmentsApi;
            _hashingService = hashingService;
        }
Esempio n. 21
0
        public CreateApprenticeshipUpdateCommandHandler(
            IEmployerCommitmentApi commitmentsApi,
            IValidator <CreateApprenticeshipUpdateCommand> validator)
        {
            if (commitmentsApi == null)
            {
                throw new ArgumentNullException(nameof(commitmentsApi));
            }
            if (validator == null)
            {
                throw new ArgumentNullException(nameof(validator));
            }

            _commitmentsApi = commitmentsApi;
            _validator      = validator;
        }
        public CreateCommitmentCommandHandler(
            IEmployerCommitmentApi commitmentApi,
            IMediator mediator,
            ILogger logger,
            EmployerApprenticeshipsServiceConfiguration configuration,
            IHashingService hashingService,
            IProviderEmailLookupService providerEmailLookupService)
        {
            if (commitmentApi == null)
            {
                throw new ArgumentNullException(nameof(commitmentApi));
            }
            if (mediator == null)
            {
                throw new ArgumentNullException(nameof(mediator));
            }

            _commitmentApi              = commitmentApi;
            _mediator                   = mediator;
            _logger                     = logger;
            _configuration              = configuration;
            _hashingService             = hashingService;
            _providerEmailLookupService = providerEmailLookupService;
        }
Esempio n. 23
0
 public GetDataLockSummaryQueryHandler(IEmployerCommitmentApi commitmentApi)
 {
     _commitmentApi = commitmentApi;
 }
Esempio n. 24
0
 public ResumeApprenticeshipCommandHandler(IEmployerCommitmentApi commitmentApi)
 {
     _commitmentApi = commitmentApi;
     _validator     = new ResumeApprenticeshipCommandValidator();
 }
Esempio n. 25
0
 public GetApprenticeshipsByUlnHandler(IEmployerCommitmentApi commitmentsApi)
 {
     _commitmentsApi = commitmentsApi;
 }
Esempio n. 26
0
        private static async Task <List <DAS.Commitments.Api.Types.Apprenticeship.Apprenticeship> > GetApprenticeshipsForAccount(long employerAccountId, IEmployerCommitmentApi employerCommitmentsApi)
        {
            var apiApprenticeships =
                await employerCommitmentsApi.GetEmployerApprenticeships(
                    employerAccountId, new ApprenticeshipSearchQuery
            {
                ApprenticeshipStatuses = new List <ApprenticeshipStatus>
                {
                    ApprenticeshipStatus.WaitingToStart,
                    ApprenticeshipStatus.Live
                }
            })
                ?? new ApprenticeshipSearchResponse();

            var pageNumber = 2;

            var apprenticeships = apiApprenticeships.Apprenticeships.ToList();

            if (apiApprenticeships.TotalPages > 1)
            {
                while (pageNumber != apiApprenticeships.TotalPages)
                {
                    var pageOfApprenticeshipSearchResponse =
                        await employerCommitmentsApi.GetEmployerApprenticeships(
                            employerAccountId, new ApprenticeshipSearchQuery
                    {
                        ApprenticeshipStatuses = new List <ApprenticeshipStatus>
                        {
                            ApprenticeshipStatus.WaitingToStart,
                            ApprenticeshipStatus.Live
                        },
                        PageNumber = pageNumber
                    });

                    apprenticeships.AddRange(pageOfApprenticeshipSearchResponse.Apprenticeships);

                    pageNumber++;
                }
            }

            return(apprenticeships);
        }
 public CommitmentService(IEmployerCommitmentApi commitmentApi)
 {
     _commitmentApi = commitmentApi;
 }
 public ResolveRequestedChangesHandler(IEmployerCommitmentApi commitmentApi)
 {
     _commitmentApi = commitmentApi;
 }
 public GetTransferRequestQueryHandler(IEmployerCommitmentApi commitmentsApi)
 {
     _commitmentsApi = commitmentsApi;
 }
 public EmployerDataRetrieveFeedbackAccountsFunction(IEmployerCommitmentApi commitmentApiClient)
 {
     _commitmentApiClient = commitmentApiClient;
 }