public PageableBankList SearchBanks(string bankName)
        {
            var token = GetClientToken();

            var bankApi = new BanksApi(BasePath);

            bankApi.ApiClient.AddDefaultHeader("Authorization", "Bearer " + token);
            return(bankApi.GetAndSearchAllBanks(null, bankName, null, null, null, null, null, null, null));
        }
Exemplo n.º 2
0
        public override async Task <ActionResult <GetBankDetailsResponse> > HandleAsync(
            [FromRoute] GetBankDetailsRequest request, CancellationToken cancellationToken = default)
        {
            var sessionConfiguration = await _finApiService.BuildClientSessionConfiguration(cancellationToken);

            var client = new BanksApi(sessionConfiguration);
            var bank   = await client.GetBankAsync(request.Id, cancellationToken);

            var respone = bank.Adapt <GetBankDetailsResponse>();

            return(Ok(respone));
        }
Exemplo n.º 3
0
        public override async Task <ActionResult <SearchBankResponse> > HandleAsync([FromQuery] SearchBankRequest request,
                                                                                    CancellationToken cancellationToken = default)
        {
            var sessionConfiguration = await _finApiService.BuildClientSessionConfiguration(cancellationToken);

            var client = new BanksApi(sessionConfiguration);
            var banks  = await client.GetAndSearchAllBanksAsync(search : request.SearchTerm,
                                                                cancellationToken : cancellationToken);

            var respone = banks.Banks.Adapt <IReadOnlyList <BankDetails> >();

            return(Ok(respone));
        }
Exemplo n.º 4
0
        public FlutterwaveApi(string apiKey)
        {
            _apiKey = apiKey;
            _flutterwaveApiBaseUrl = new Uri("https://api.flutterwave.com/v3/");

            Card          = new CardPaymentApi(this);
            Transactions  = new TransactionsApi(this);
            Verifications = new VerificationApi(this);
            Banks         = new BanksApi(this);
            Bills         = new BillsApi(this);
            Settlements   = new SettlementsApi(this);
            Otps          = new OtpsApi(this);
            Chargebacks   = new ChargebacksApi(this);
            Misc          = new MiscApi(this);
        }