Skip to content

Commit 22750ae

Browse files
authored
APE-1706 | Payment rail based filtering in get banks (#427)
1 parent 037f10c commit 22750ae

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@token-io/core",
3-
"version": "1.0.26",
3+
"version": "1.0.27",
44
"description": "Token JavaScript Core SDK",
55
"license": "ISC",
66
"author": {

core/src/http/HttpClient.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export class HttpClient {
9191
const formattedOptions = Object.assign({}, {
9292
// Can be at most 1000
9393
ids: options.ids || [],
94+
supportedPaymentNetworks: options.supportedPaymentNetworks || [],
9495
search: options.search || '',
9596
country: options.country || '',
9697
// Default to 1 if not specified
@@ -112,6 +113,7 @@ export class HttpClient {
112113
});
113114
const {
114115
ids,
116+
supportedPaymentNetworks,
115117
search,
116118
country,
117119
page,
@@ -126,6 +128,9 @@ export class HttpClient {
126128
for (const id of ids) {
127129
url += `ids=${encodeURIComponent(id)}&`;
128130
}
131+
for (const paymentNetwork of supportedPaymentNetworks) {
132+
url += `supportedPaymentNetworks=${encodeURIComponent(paymentNetwork)}&`;
133+
}
129134
if (search) url += `search=${encodeURIComponent(search)}&`;
130135
if (country) url += `country=${encodeURIComponent(country)}&`;
131136
if (page) url += `page=${encodeURIComponent(page)}&`;

core/src/main/TokenClient.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export class TokenClient {
148148
destinationCountry?: string,
149149
bankFeatures?: Object,
150150
memberId?: string,
151+
supportedPaymentNetworks?: Array<string>,
151152
}
152153
): Promise<{banks: Array<Bank>, paging: Paging}> {
153154
return Util.callAsync(this.getBanks, async () => {

0 commit comments

Comments
 (0)