Пример #1
0
        public CounterpartiesApiTest()
        {
            HttpClient       httpClient = new HttpClient();
            RevolutApiClient api        = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN);

            _counterpartiesApiClient = new CounterPartiesApiClient(api);
        }
Пример #2
0
        public AccountApiTest()
        {
            var httpClient       = new HttpClient();
            RevolutApiClient api = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN);

            _accountClient = new AccountApiClient(api);
        }
Пример #3
0
        public AccountApiTest()
        {
            tokenManager = new TokenManager($"{Environment.CurrentDirectory}\\Certificats\\token.json");
            memoryCache  = new MemoryCacheFactory().CreateInstance(token = tokenManager.LoadToken());
            var config     = new ConfigTest();
            var httpClient = new HttpClient();
            var api        = new RevolutApiClient(config, token.AccessToken, httpClient, memoryCache);

            _accountClient = new AccountApiClient(api);
        }
Пример #4
0
        public TokenFactoryTest()
        {
            tokenManager = new TokenManager($"{Environment.CurrentDirectory}\\Certificats\\token.json");
            token        = tokenManager.LoadToken();
            memoryCache  = new MemoryCacheFactory().CreateInstance(token);
            var config     = new ConfigTest();
            var httpClient = new HttpClient();
            var api        = new RevolutApiClient(config, httpClient);

            tokenFactory = new TokenFactory(new AuthorizationApiClient(api, config), memoryCache);
        }
Пример #5
0
        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);
        }