@delopay/sdk 0.102.0 → 0.103.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.
@@ -3796,6 +3796,46 @@ var Settlement = class {
3796
3796
  ...options
3797
3797
  });
3798
3798
  }
3799
+ /**
3800
+ * What a period's payments cost, and what was left over: gross, the
3801
+ * platform fee, hosting fees, what the rails took, and the margin, with a
3802
+ * per-connector breakdown.
3803
+ *
3804
+ * Send `year` and `month` together to report one UTC calendar month, or
3805
+ * neither for the running month so far.
3806
+ *
3807
+ * **Host-only.** The response is the host's cost base, which a shop owner
3808
+ * must never see, so a profile-scoped caller is refused with a 403 rather
3809
+ * than given a redacted shell. Gate the surface on the caller's scope
3810
+ * instead of calling it and handling the failure.
3811
+ *
3812
+ * Two things not to flatten when rendering the result:
3813
+ * `margin_usd` is absent — not zero — whenever `margin_quality` is
3814
+ * `'unknown'`, and `unlined_captured_attempt_count` (cost definitely
3815
+ * missing) means something different from `unlined_unresolved_attempt_count`
3816
+ * (mostly ordinary abandonment).
3817
+ *
3818
+ * `GET /settlement/cost`
3819
+ *
3820
+ * @example
3821
+ * ```typescript
3822
+ * const cost = await delopay.settlement.cost({ test_mode: false, year: 2026, month: 7 });
3823
+ * if (cost.margin_quality === 'unknown') {
3824
+ * // cost.margin_usd is absent — say so, do not render 0.00
3825
+ * }
3826
+ * ```
3827
+ */
3828
+ async cost(params, options) {
3829
+ return this.request("GET", "/settlement/cost", {
3830
+ query: {
3831
+ profile_id: params?.profile_id,
3832
+ test_mode: params?.test_mode,
3833
+ year: params?.year,
3834
+ month: params?.month
3835
+ },
3836
+ ...options
3837
+ });
3838
+ }
3799
3839
  /**
3800
3840
  * List generated settlement statements, newest first.
3801
3841
  *
@@ -6237,4 +6277,4 @@ export {
6237
6277
  focusedCheckoutUrl,
6238
6278
  CHECKOUT_EVENT_KINDS
6239
6279
  };
6240
- //# sourceMappingURL=chunk-43FRIBNT.js.map
6280
+ //# sourceMappingURL=chunk-Q2PPDRUI.js.map