public BusinessController(IBankClient bankClient, IPublicShareOwnerControlClient publicShareOwnerControlClient, IStockShareProviderClient stockShareProviderClient, ILogger <StockController> logger)
 {
     _bankClient = bankClient;
     _publicShareOwnerControlClient = publicShareOwnerControlClient;
     _stockShareProviderClient      = stockShareProviderClient;
     _logger = logger;
 }
Exemple #2
0
 public RegisterModel(ILogger <RegisterModel> logger, IEmailSender emailSender, IAuthorizationClient client, IBankClient bankClient)
 {
     _logger              = logger;
     _emailSender         = emailSender;
     _authorizationClient = client ?? throw new ArgumentNullException(nameof(client));
     _bankClient          = bankClient;
 }
Exemple #3
0
 public AuthorizationClient(IOptionsMonitor <Services> serviceOptions, IBankClient bankClient)
 {
     _bankClient           = bankClient;
     _authorizationService = serviceOptions.CurrentValue.AuthorizationService ??
                             throw new ArgumentNullException(nameof(serviceOptions.CurrentValue
                                                                    .AuthorizationService));
 }
Exemple #4
0
        public void NotifyClient(IBankClient client, int accountNumber)
        {
            string response = System.String.Empty;
            string cellResponse;

            cellResponse = client.UpdateAccountStatus(accountNumber);
            Console.WriteLine(cellResponse);
        }
Exemple #5
0
 public PaymentService(IPaymentRepository paymentRepository,
                       IMerchantRepository merchantRepo,
                       IEncryption encryption, IBankClient bankClient)
 {
     _paymentRepository = paymentRepository;
     _encryption        = encryption;
     _merchantRepo      = merchantRepo;
     _bankClient        = bankClient;
 }
Exemple #6
0
 public StockBidController(ILogger <StockBidController> logger, IPublicShareOwnerControlClient publicShareOwnerControlClient,
                           IBankClient bankClient, ITobinTaxerClient tobinTaxerClient, IStockTraderBrokerClient stockTraderBrokerClient)
 {
     _logger = logger;
     _publicShareOwnerControlClient = publicShareOwnerControlClient;
     _bankClient              = bankClient;
     _tobinTaxerClient        = tobinTaxerClient;
     _stockTraderBrokerClient = stockTraderBrokerClient;
 }
Exemple #7
0
 public BalanceController(IBankClient bankClient, IPublicShareOwnerControlClient publicShareOwnerControlClient,
                          IStockShareRequesterClient stockShareRequesterClient, IStockShareProviderClient stockShareProviderClient,
                          ILogger <BalanceController> logger)
 {
     _bankClient = bankClient;
     _publicShareOwnerControlClient = publicShareOwnerControlClient;
     _stockShareRequesterClient     = stockShareRequesterClient;
     _stockShareProviderClient      = stockShareProviderClient;
     _logger = logger;
 }
        public IBankClient Create(string cardNumber)
        {
            // Assume that the first 4 digits of card number are used to identify a bank
            IBankClient bankClient = cardNumber.Substring(0, 4) switch
            {
                "1111" => new SantanderClient(),
                "2222" => new BarclayClient(),
                _ => new NullClient()
            };

            return(bankClient);
        }
    }
Exemple #9
0
        public async Task <IEnumerable <CurrencyRate> > GetRatesFromBanks(DateTime date)
        {
            List <CurrencyRate> currencyRates = new List <CurrencyRate>();
            IEnumerable <Task>  tasks         = _bankClientTypes.Select(bankClientType => Task.Run(async() =>
            {
                IBankClient bankClient           = _bankClientFactory.GetByType(bankClientType);
                IEnumerable <CurrencyRate> rates = await bankClient.GetCurrencyRatesByDate(date);
                currencyRates.AddRange(rates);
            })
                                                                        );

            await Task.WhenAll(tasks);

            return(currencyRates);
        }
Exemple #10
0
 public PaymentService(IPaymentRepository repository, IBankClient bankClient, IPaymentMapper paymentMapper)
 {
     _repository    = repository;
     _bankClient    = bankClient;
     _paymentMapper = paymentMapper;
 }
Exemple #11
0
 public OpenExchangeRateBankClientTest(IConfigurationFixture fixture)
 {
     _configuration = fixture.Configuration;
     _httpModule    = new HttpModule();
     _bankClient    = new OpenExchangeRateBankClient(_configuration);
 }
 public BankClientFactory(IBankClient client)
 {
     _client = client;
 }
Exemple #13
0
 public PaymentGatewayService(IBankClient bankClient, IPaymentRequestValidator paymentRequestValidator, ILogger <PaymentGatewayService> logger)
 {
     this._bankClient = bankClient;
     this._paymentRequestValidator = paymentRequestValidator;
     this._logger = logger;
 }
 public NationalBankUaTest(IConfigurationFixture fixture)
 {
     _configuration = fixture.Configuration;
     _bankClient    = new NationalBankUa(_configuration);
 }
 public BankApiHealthCheck(IBankClient client, ILogger <BankApiHealthCheck> logger)
 {
     this.client = client;
     this.logger = logger;
 }
Exemple #16
0
 public PaymentGatewayService(IPaymentRepository paymentRepository, IBankClient bankClient, ILogger <PaymentGatewayService> logger)
 {
     _paymentRepository = paymentRepository;
     _bankClient        = bankClient;
     _logger            = logger;
 }
Exemple #17
0
 public void SetUp()
 {
     _bankClient = Substitute.For <IBankClient>();
     _service    = new PaymentGatewayService(_bankClient, _validator, _logger);
 }
Exemple #18
0
 public BankService(IBankClient bankClient)
 {
     _bankClient = bankClient ?? throw new ArgumentNullException(nameof(bankClient));
 }
Exemple #19
0
 public AcquiringBankService(IMapper mapper, IBankClient bankClient, IStatusCodeConverter statusCodeConverter)
 {
     _mapper              = mapper;
     _bankClient          = bankClient;
     _statusCodeConverter = statusCodeConverter;
 }
Exemple #20
0
 /// <summary>
 /// Создание модели
 /// </summary>
 /// <param name="cl1">клиент для которого будет выполнен добавление</param>
 public ModelCredit(IBankClient cl1, IInjection injClass)
 {
     Client    = cl1;
     Injection = injClass;
 }
 public PaymentProcessing(IBankClient bankClient, IPaymentRepository repository)
 {
     _bankClient = bankClient;
     _repository = repository;
 }
Exemple #22
0
 public PaymentsProcessor(ILogger <PaymentsProcessor> logger, IPaymentsRepository paymentsRepository, IBankClient bankClient)
 {
     this.logger             = logger;
     this.paymentsRepository = paymentsRepository;
     this.bankClient         = bankClient;
 }
Exemple #23
0
 public PaymentService(ILogger <PaymentService> logger, IPaymentRepository paymentRepository, IBankClient bankClient)
 {
     _logger            = logger;
     _paymentRepository = paymentRepository;
     _bankClient        = bankClient;
 }
Exemple #24
0
 public PaymentService(IBankClient bankClient, IRepository repository, IMapper mapper)
 {
     _bankClient = bankClient;
     _repository = repository;
     _mapper     = mapper;
 }
Exemple #25
0
 public AcquiringBank(IBankClient client)
 {
     this.client = client;
 }
Exemple #26
0
 public PaymentManager(IPaymentRepository paymentRepository, IBankClient bankClient)
 {
     _paymentRepository = paymentRepository;
     _bankClient        = bankClient;
 }
 public NationalBankKzTest(IConfigurationFixture fixture)
 {
     _configuration = fixture.Configuration;
     _httpModule    = new HttpModule();
     _bankClient    = new NationalBankKz(_configuration);
 }