@kuvarpay/sdk 1.3.15 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -441,6 +441,11 @@ class KuvarPayServer {
441
441
  * @param {Object} params - { currency, type, country }
442
442
  */
443
443
  async getBanks(params = {}) {
444
+ // If params is a string, treat it as currency and use path-based endpoint for better reliability
445
+ if (typeof params === 'string') {
446
+ return this._get(`/api/v1/banks/${encodeURIComponent(params)}`);
447
+ }
448
+
444
449
  const query = new URLSearchParams(params).toString();
445
450
  const path = query ? `/api/v1/banks?${query}` : '/api/v1/banks';
446
451
  return this._get(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuvarpay/sdk",
3
- "version": "1.3.15",
3
+ "version": "1.4.0",
4
4
  "description": "Official KuvarPay Server SDK for Node.js",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",