public async Task <OrganisationRiskViewModel> GetOrganisationRiskViewModel(GetOrganisationRiskRequest request)
        {
            _logger.LogInformation($"Retrieving Organisation high risk check details for application {request.ApplicationId}");

            var model = new OrganisationRiskViewModel();
            await model.PopulatePageCommonDetails(_applyApiClient, request.ApplicationId, GatewaySequences.OrganisationChecks,
                                                  GatewayPageIds.OrganisationRisk,
                                                  request.UserId,
                                                  request.UserName,
                                                  RoatpGatewayConstants.Captions.OrganisationChecks,
                                                  RoatpGatewayConstants.Headings.OrganisationRisk,
                                                  NoSelectionErrorMessages.Errors[GatewayPageIds.OrganisationRisk]);

            model.OrganisationType = await _organisationSummaryApiClient.GetTypeOfOrganisation(request.ApplicationId);

            model.TradingName = await _applyApiClient.GetTradingName(request.ApplicationId);

            _logger.LogInformation($"Retrieving company number in organisation high risk for application {request.ApplicationId}");
            model.CompanyNumber = await _organisationSummaryApiClient.GetCompanyNumber(request.ApplicationId);

            _logger.LogInformation($"Retrieving charity number in organisation high risk for application {request.ApplicationId}");
            model.CharityNumber = await _organisationSummaryApiClient.GetCharityNumber(request.ApplicationId);

            return(model);
        }
        public async Task <PeopleInControlPageViewModel> GetPeopleInControlViewModel(GetPeopleInControlRequest request)
        {
            _logger.LogInformation($"Retrieving people in control details for application {request.ApplicationId}");

            var model = new PeopleInControlPageViewModel();
            await model.PopulatePageCommonDetails(_applyApiClient, request.ApplicationId, GatewaySequences.PeopleInControlChecks,
                                                  GatewayPageIds.PeopleInControl,
                                                  request.UserId,
                                                  request.UserName,
                                                  RoatpGatewayConstants.Captions.PeopleInControlChecks,
                                                  RoatpGatewayConstants.Headings.PeopleInControl,
                                                  NoSelectionErrorMessages.Errors[GatewayPageIds.PeopleInControl]);

            _logger.LogInformation($"Retrieving people in control - type of organisation for application {request.ApplicationId}");
            model.TypeOfOrganisation = await _organisationSummaryApiClient.GetTypeOfOrganisation(request.ApplicationId);

            _logger.LogInformation($"Retrieving company number in control for application {request.ApplicationId}");
            model.CompanyNumber = await _organisationSummaryApiClient.GetCompanyNumber(request.ApplicationId);

            _logger.LogInformation($"Retrieving company number in control for application {request.ApplicationId}");
            model.CharityNumber = await _organisationSummaryApiClient.GetCharityNumber(request.ApplicationId);


            _logger.LogInformation($"Retrieving people in control - [{RoatpGatewayConstants.PeopleInControl.Heading.CompanyDirectors}] for application {request.ApplicationId}");
            model.CompanyDirectorsData = new PeopleInControlData
            {
                Caption = RoatpGatewayConstants.PeopleInControl.Heading.CompanyDirectors,
                ExternalSourceHeading    = RoatpGatewayConstants.PeopleInControl.Caption.CompaniesHouse,
                FromExternalSource       = await _organisationSummaryApiClient.GetDirectorsFromCompaniesHouse(request.ApplicationId),
                FromSubmittedApplication = await _organisationSummaryApiClient.GetDirectorsFromSubmitted(request.ApplicationId)
            };

            _logger.LogInformation($"Retrieving people in control - [{RoatpGatewayConstants.PeopleInControl.Heading.PeopleWithSignificantControl}] for application {request.ApplicationId}");
            model.PscData = new PeopleInControlData
            {
                Caption = RoatpGatewayConstants.PeopleInControl.Heading.PeopleWithSignificantControl,
                ExternalSourceHeading    = RoatpGatewayConstants.PeopleInControl.Caption.CompaniesHouse,
                FromExternalSource       = await _organisationSummaryApiClient.GetPscsFromCompaniesHouse(request.ApplicationId),
                FromSubmittedApplication = await _organisationSummaryApiClient.GetPscsFromSubmitted(request.ApplicationId)
            };

            _logger.LogInformation($"Retrieving people in control - [{RoatpGatewayConstants.PeopleInControl.Heading.Trustees}] for application {request.ApplicationId}");
            model.TrusteeData = new PeopleInControlData
            {
                Caption = RoatpGatewayConstants.PeopleInControl.Heading.Trustees,
                ExternalSourceHeading    = RoatpGatewayConstants.PeopleInControl.Caption.CharityCommission,
                FromExternalSource       = await _organisationSummaryApiClient.GetTrusteesFromCharityCommission(request.ApplicationId),
                FromSubmittedApplication = await _organisationSummaryApiClient.GetTrusteesFromSubmitted(request.ApplicationId)
            };

            _logger.LogInformation($"Retrieving people in control - [{RoatpGatewayConstants.PeopleInControl.Heading.WhosInControl}] for application {request.ApplicationId}");
            model.WhosInControlData = new PeopleInControlData
            {
                Caption = RoatpGatewayConstants.PeopleInControl.Heading.WhosInControl,
                ExternalSourceHeading    = null,
                FromExternalSource       = null,
                FromSubmittedApplication =
                    await _organisationSummaryApiClient.GetWhosInControlFromSubmitted(request.ApplicationId)
            };

            return(model);
        }