예제 #1
0
        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));
        }
예제 #2
0
        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));
        }