@delopay/sdk 0.62.0 → 0.64.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.
- package/README.md +430 -430
- package/dist/{chunk-2OWZIFZO.js → chunk-UQ47CRAI.js} +43 -1
- package/dist/chunk-UQ47CRAI.js.map +1 -0
- package/dist/index.cjs +42 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +161 -6
- package/dist/index.d.ts +161 -6
- package/dist/index.js +1 -1
- package/dist/internal.cjs +42 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/package.json +63 -64
- package/dist/chunk-2OWZIFZO.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1880,6 +1880,48 @@ var Routing = class {
|
|
|
1880
1880
|
* algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },
|
|
1881
1881
|
* });
|
|
1882
1882
|
* ```
|
|
1883
|
+
*
|
|
1884
|
+
* @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.
|
|
1885
|
+
* Rules run top-down (first match wins); `defaultSelection` is the fallback.
|
|
1886
|
+
* Splits must sum to 100; `amount` conditions are in minor units.
|
|
1887
|
+
* ```typescript
|
|
1888
|
+
* const config = await delopay.routing.create({
|
|
1889
|
+
* name: 'Card split 90/10',
|
|
1890
|
+
* profile_id: 'pro_...',
|
|
1891
|
+
* algorithm: {
|
|
1892
|
+
* type: 'advanced',
|
|
1893
|
+
* data: {
|
|
1894
|
+
* defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },
|
|
1895
|
+
* rules: [
|
|
1896
|
+
* {
|
|
1897
|
+
* name: 'cards',
|
|
1898
|
+
* connectorSelection: {
|
|
1899
|
+
* type: 'volume_split',
|
|
1900
|
+
* data: [
|
|
1901
|
+
* { connector: { connector: 'epayouts' }, split: 90 },
|
|
1902
|
+
* { connector: { connector: 'stripe' }, split: 10 },
|
|
1903
|
+
* ],
|
|
1904
|
+
* },
|
|
1905
|
+
* statements: [
|
|
1906
|
+
* {
|
|
1907
|
+
* condition: [
|
|
1908
|
+
* {
|
|
1909
|
+
* lhs: 'payment_method',
|
|
1910
|
+
* comparison: 'equal',
|
|
1911
|
+
* value: { type: 'enum_variant', value: 'card' },
|
|
1912
|
+
* metadata: {},
|
|
1913
|
+
* },
|
|
1914
|
+
* ],
|
|
1915
|
+
* },
|
|
1916
|
+
* ],
|
|
1917
|
+
* },
|
|
1918
|
+
* ],
|
|
1919
|
+
* metadata: {},
|
|
1920
|
+
* },
|
|
1921
|
+
* },
|
|
1922
|
+
* });
|
|
1923
|
+
* await delopay.routing.activate(config.id);
|
|
1924
|
+
* ```
|
|
1883
1925
|
*/
|
|
1884
1926
|
async create(params) {
|
|
1885
1927
|
return this.request("POST", "/routing", { body: params });
|