/// <summary> /// Returns a list of token enabled banks. /// </summary> /// <param name="ids">If specified, return banks whose 'id' matches any one of the given ids /// (case-insensitive). Can be at most 1000.</param> /// <param name="search">If specified, return banks whose 'name' or 'identifier' contains the given /// search string (case-insensitive)</param> /// <param name="country">If specified, return banks whose 'country' matches the given ISO 3166-1 /// alpha-2 country code(case-insensitive)</param> /// <param name="page">Result page to retrieve. Default to 1 if not specified.</param> /// <param name="perPage">Maximum number of records per page. Can be at most 200. Default to 200 /// if not specified.</param> /// <param name="sort">The key to sort the results. Could be one of: name, provider and country. /// Defaults to name if not specified.</param> /// <param name="provider">If specified, return banks whose 'provider' matches the given provider /// (case insensitive).</param> /// <param name="bankFeatures">If specified, return banks who meet the bank features requirement.</param> /// <returns>banks with paging information</returns> public Task <PagedBanks> GetBanks( IList <string> ids, string search, string country, int?page, int?perPage, string sort, string provider, BankFeatures bankFeatures) { var request = new GetBanksRequest() { Filter = new BankFilter(), }; if (ids != null) { request.Filter.Ids.Add(ids); } if (search != null) { request.Filter.Search = search; } if (country != null) { request.Filter.Country = country; } if (page.HasValue) { request.Page = page.Value; } if (perPage.HasValue) { request.PerPage = perPage.Value; } if (sort != null) { request.Sort = sort; } if (provider != null) { request.Filter.Provider = provider; } if (bankFeatures != null) { request.Filter.BankFeatures = bankFeatures; } return(gateway.GetBanksAsync(request) .ToTask(response => new PagedBanks(response))); }
/// <summary> /// Returns a list of token enabled banks. /// </summary> /// <param name="bankIds">bankIds If specified, return banks whose 'id' matches any one of the given id /// (case-insensitive). Can be at most 1000.</param> /// <param name="search">search If specified, return banks whose 'name' or 'identifier' contains the given /// search string (case-insensitive).</param> /// <param name="country">country If specified, return banks whose 'country' matches the given ISO 3166-1 /// alpha-2 country code (case-insensitive).</param> /// <param name="page">page Result page to retrieve. Default to 1 if not specified.</param> /// <param name="perPage">perPage Maximum number of records per page. Can be at most 200. Default to 200 /// if not specified.</param> /// <param name="sort">sort The key to sort the results. Could be one of: name, provider and country. Defaults to name if not specified.</param> /// <param name="provider">If specified, return banks whose 'provider' matches the given provider /// (case insensitive)</param> /// <param name="bankFeatures">If specified, return banks who meet the bank features requirement.</param> /// <returns>banks with paging information</returns> public Task <PagedBanks> GetBanks( IList <string> bankIds, string search, string country, int?page, int?perPage, string sort, string provider, BankFeatures bankFeatures) { var unauthenticated = ClientFactory.Unauthenticated(channel); return(unauthenticated.GetBanks( bankIds, search, country, page, perPage, sort, provider, bankFeatures)); }