@delopay/sdk 0.18.1 → 0.18.3
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.
- package/dist/{chunk-6UL5TW3X.js → chunk-CFM23H56.js} +21 -12
- package/dist/chunk-CFM23H56.js.map +1 -0
- package/dist/index.cjs +20 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -18
- package/dist/index.d.ts +113 -18
- package/dist/index.js +1 -1
- package/dist/internal.cjs +20 -11
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +18 -1
- package/dist/internal.d.ts +18 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6UL5TW3X.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1593,7 +1593,8 @@ var Routing = class {
|
|
|
1593
1593
|
* Create a new routing algorithm.
|
|
1594
1594
|
*
|
|
1595
1595
|
* @param params - Routing algorithm definition (rule-based, priority, or volume-based).
|
|
1596
|
-
* @returns
|
|
1596
|
+
* @returns Metadata record for the created routing configuration. The full
|
|
1597
|
+
* algorithm body is not echoed back — use `retrieve(id)` if you need it.
|
|
1597
1598
|
*
|
|
1598
1599
|
* @example
|
|
1599
1600
|
* ```typescript
|
|
@@ -1610,32 +1611,40 @@ var Routing = class {
|
|
|
1610
1611
|
* Retrieve a routing algorithm by its ID.
|
|
1611
1612
|
*
|
|
1612
1613
|
* @param algorithmId - The routing algorithm ID.
|
|
1613
|
-
* @returns The routing configuration.
|
|
1614
|
+
* @returns The full routing configuration including the algorithm body.
|
|
1614
1615
|
*/
|
|
1615
1616
|
async retrieve(algorithmId) {
|
|
1616
1617
|
return this.request("GET", `/routing/${encodeURIComponent(algorithmId)}`);
|
|
1617
1618
|
}
|
|
1618
1619
|
/**
|
|
1619
|
-
* Activate a routing algorithm, making it the active routing strategy
|
|
1620
|
+
* Activate a routing algorithm, making it the active routing strategy.
|
|
1621
|
+
*
|
|
1622
|
+
* Always sends a JSON body (default `{}`) so the request carries the
|
|
1623
|
+
* `Content-Type: application/json` header that the server requires.
|
|
1620
1624
|
*
|
|
1621
1625
|
* @param algorithmId - The routing algorithm ID to activate.
|
|
1622
|
-
* @
|
|
1626
|
+
* @param params - Optional activation payload (e.g. `transaction_type`).
|
|
1623
1627
|
*/
|
|
1624
|
-
async activate(algorithmId) {
|
|
1625
|
-
return this.request("POST", `/routing/${encodeURIComponent(algorithmId)}/activate
|
|
1628
|
+
async activate(algorithmId, params = {}) {
|
|
1629
|
+
return this.request("POST", `/routing/${encodeURIComponent(algorithmId)}/activate`, {
|
|
1630
|
+
body: params
|
|
1631
|
+
});
|
|
1626
1632
|
}
|
|
1627
1633
|
/**
|
|
1628
1634
|
* Deactivate the currently active routing algorithm (falls back to default routing).
|
|
1629
1635
|
*
|
|
1630
|
-
*
|
|
1636
|
+
* Always sends a JSON body (default `{}`) so the request carries the
|
|
1637
|
+
* `Content-Type: application/json` header that the server requires.
|
|
1638
|
+
*
|
|
1639
|
+
* @param params - Optional deactivation payload.
|
|
1631
1640
|
*/
|
|
1632
|
-
async deactivate() {
|
|
1633
|
-
return this.request("POST", "/routing/deactivate");
|
|
1641
|
+
async deactivate(params = {}) {
|
|
1642
|
+
return this.request("POST", "/routing/deactivate", { body: params });
|
|
1634
1643
|
}
|
|
1635
1644
|
/**
|
|
1636
|
-
* List all routing algorithms for the current
|
|
1645
|
+
* List all routing algorithms for the current merchant.
|
|
1637
1646
|
*
|
|
1638
|
-
* @returns
|
|
1647
|
+
* @returns The routing dictionary (records + currently active id).
|
|
1639
1648
|
*/
|
|
1640
1649
|
async list() {
|
|
1641
1650
|
return this.request("GET", "/routing");
|