internal static async Task <FortnoxDataCopier> Create( ILogger logger, WebcrmClientFactory webcrmClientFactory, FortnoxConfiguration configuration) { var webcrmClient = await webcrmClientFactory.Create(configuration.WebcrmApiKey); var fortnoxApiKeys = new FortnoxApiKeys(configuration.FortnoxAccessToken, configuration.FortnoxClientSecret); return(new FortnoxDataCopier(logger, fortnoxApiKeys, webcrmClient)); }
public static async Task <PowerofficeDataCopier> Create( ILogger logger, WebcrmClientFactory webcrmClientFactory, PowerofficeClientFactory powerofficeClientFactory, PowerofficeConfiguration configuration) { var powerofficeClient = await powerofficeClientFactory.Create(configuration.PowerofficeClientKey); var webcrmClient = await webcrmClientFactory.Create(configuration.WebcrmApiKey); return(new PowerofficeDataCopier(logger, configuration, powerofficeClient, webcrmClient)); }