public PaymentApiTest() { var httpClient = new HttpClient(); RevolutApiClient api = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN); _paymentClient = new PaymentApiClient(api); var httpClient2 = new HttpClient(); RevolutApiClient api2 = new RevolutApiClient(httpClient2, Config.ENDPOINT, Config.TOKEN); _counterpartyApiClient = new CounterPartiesApiClient(api2); RevolutApiClient api3 = new RevolutApiClient(Config.ENDPOINT, Config.TOKEN); _accountApiClient = new AccountApiClient(api3); }
public PaymentApiTest() { tokenManager = new TokenManager($"{Environment.CurrentDirectory}\\Certificats\\token.json"); var memoryCache = new MemoryCacheFactory().CreateInstance(token = tokenManager.LoadToken()); var config = new ConfigTest(); var httpClient = new HttpClient(); var api = new RevolutApiClient(config, token.AccessToken, httpClient, memoryCache); _paymentClient = new PaymentApiClient(api); var httpClient2 = new HttpClient(); var api2 = new RevolutApiClient(config, token.AccessToken, httpClient2, memoryCache); _counterpartyApiClient = new CounterPartiesApiClient(api2); var api3 = new RevolutApiClient(config, token.AccessToken, memoryCache: memoryCache); _accountApiClient = new AccountApiClient(api3); }