@delopay/sdk 0.62.0 → 0.63.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.
@@ -1805,6 +1805,48 @@ var Routing = class {
1805
1805
  * algorithm: { type: 'priority', data: [{ connector: 'stripe' }] },
1806
1806
  * });
1807
1807
  * ```
1808
+ *
1809
+ * @example Conditional volume split (advanced): cards → 90% epayouts / 10% stripe.
1810
+ * Rules run top-down (first match wins); `defaultSelection` is the fallback.
1811
+ * Splits must sum to 100; `amount` conditions are in minor units.
1812
+ * ```typescript
1813
+ * const config = await delopay.routing.create({
1814
+ * name: 'Card split 90/10',
1815
+ * profile_id: 'pro_...',
1816
+ * algorithm: {
1817
+ * type: 'advanced',
1818
+ * data: {
1819
+ * defaultSelection: { type: 'priority', data: [{ connector: 'stripe' }] },
1820
+ * rules: [
1821
+ * {
1822
+ * name: 'cards',
1823
+ * connectorSelection: {
1824
+ * type: 'volume_split',
1825
+ * data: [
1826
+ * { connector: { connector: 'epayouts' }, split: 90 },
1827
+ * { connector: { connector: 'stripe' }, split: 10 },
1828
+ * ],
1829
+ * },
1830
+ * statements: [
1831
+ * {
1832
+ * condition: [
1833
+ * {
1834
+ * lhs: 'payment_method',
1835
+ * comparison: 'equal',
1836
+ * value: { type: 'enum_variant', value: 'card' },
1837
+ * metadata: {},
1838
+ * },
1839
+ * ],
1840
+ * },
1841
+ * ],
1842
+ * },
1843
+ * ],
1844
+ * metadata: {},
1845
+ * },
1846
+ * },
1847
+ * });
1848
+ * await delopay.routing.activate(config.id);
1849
+ * ```
1808
1850
  */
1809
1851
  async create(params) {
1810
1852
  return this.request("POST", "/routing", { body: params });
@@ -4253,4 +4295,4 @@ export {
4253
4295
  applyBrandingVariables,
4254
4296
  shadowFor
4255
4297
  };
4256
- //# sourceMappingURL=chunk-2OWZIFZO.js.map
4298
+ //# sourceMappingURL=chunk-JCO4CHY7.js.map