<commit_before>﻿using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EAS.Domain;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Interfaces;

namespace SFA.DAS.EAS.Infrastructure.Services
{
    public class CompaniesHouseEmployerVerificationService : IEmployerVerificationService
    {
        private readonly EmployerApprenticeshipsServiceConfiguration _configuration;
        private readonly ILogger _logger;
        private readonly IManagedCompanyLookupService _managedCompanyLookupService;

        public CompaniesHouseEmployerVerificationService(EmployerApprenticeshipsServiceConfiguration configuration, ILogger logger,IManagedCompanyLookupService managedCompanyLookupService)
        {
            _configuration = configuration;
            _logger = logger;
            _managedCompanyLookupService = managedCompanyLookupService;
        }

        public async Task<EmployerInformation> GetInformation(string id)
        {
            _logger.Info($"GetInformation({id})");

            if (_configuration.CompaniesHouse.UseManagedList)
            {<commit_msg>Change company house API request to use upper case to fix bug<commit_after>﻿using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NLog;
using SFA.DAS.EAS.Domain;
using SFA.DAS.EAS.Domain.Configuration;
using SFA.DAS.EAS.Domain.Interfaces;

namespace SFA.DAS.EAS.Infrastructure.Services
{
    public class CompaniesHouseEmployerVerificationService : IEmployerVerificationService
    {
        private readonly EmployerApprenticeshipsServiceConfiguration _configuration;
        private readonly ILogger _logger;
        private readonly IManagedCompanyLookupService _managedCompanyLookupService;

        public CompaniesHouseEmployerVerificationService(EmployerApprenticeshipsServiceConfiguration configuration, ILogger logger,IManagedCompanyLookupService managedCompanyLookupService)
        {
            _configuration = configuration;
            _logger = logger;
            _managedCompanyLookupService = managedCompanyLookupService;
        }

        public async Task<EmployerInformation> GetInformation(string id)
        {
            _logger.Info($"GetInformation({id})");

            id = id.ToUpper();

            if (_configuration.CompaniesHouse.UseManagedList)
            {
{'fraction_non_alphanumeric': 0.0615702479338843, 'fraction_numerical': 0.0, 'mean_word_length': 3.8323353293413174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1925137', 'n_tokens_mistral': 620, 'n_tokens_neox': 598, 'n_words': 125}