@billkit-eu/sdk 0.8.0 → 0.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billkit-eu/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Official Node.js SDK for BillKit: a Stripe-Billing-shape multi-tenant SaaS API on Mollie.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/src/resources.ts CHANGED
@@ -239,7 +239,9 @@ export interface UpdateProductParams extends IdempotencyOptions {
239
239
  name?: string;
240
240
  /** An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone. */
241
241
  description?: string | null;
242
- marketing_features?: string[];
242
+ /** `null` empties the list. An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone. */
243
+ marketing_features?: string[] | null;
244
+ /** Replaces the stored object whole; send `{}` to empty it. */
243
245
  metadata?: Record<string, string>;
244
246
  /** Set false to stop selling a product without deleting history. */
245
247
  active?: boolean;
@@ -271,6 +273,9 @@ export interface UpdateProductParams extends IdempotencyOptions {
271
273
  * the price is still `"unspecified"` and never changed again, because
272
274
  * flipping it would restate whether tax was inside or on top of an amount
273
275
  * somebody has already paid.
276
+ *
277
+ * Only the two refund windows accept `null`, which clears the price's
278
+ * override. The API refuses a `null` on any other field here with a 400.
274
279
  */
275
280
  export interface UpdatePriceParams extends IdempotencyOptions {
276
281
  /** `false` withdraws the price from sale, `true` puts it back. */
@@ -283,9 +288,13 @@ export interface UpdatePriceParams extends IdempotencyOptions {
283
288
  "creditcard" | "directdebit" | "ideal" | "eps" | "applepay" | "paypal" | (string & {})
284
289
  >;
285
290
  refund_on_cancel?: "none" | "full" | "prorated";
286
- /** `0` disables refunds for that charge type; `N > 0` is an N-day window. */
287
- refund_window_initial_days?: number;
288
- refund_window_renewal_days?: number;
291
+ /**
292
+ * `0` disables refunds for that charge type; `N > 0` is an N-day window.
293
+ * `null` drops the price's override. An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone.
294
+ */
295
+ refund_window_initial_days?: number | null;
296
+ /** As {@link UpdatePriceParams.refund_window_initial_days}, for renewals. */
297
+ refund_window_renewal_days?: number | null;
289
298
  }
290
299
 
291
300
  /**
@@ -673,8 +682,10 @@ export interface UpdateCouponParams extends IdempotencyOptions {
673
682
  max_redemptions?: number | null;
674
683
  /** Epoch seconds. `null` removes the expiry. An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone. */
675
684
  redeem_by?: number | null;
676
- applies_to_price_ids?: string[];
677
- min_amount_cents?: number;
685
+ /** `null` lifts the price restriction. An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone. */
686
+ applies_to_price_ids?: string[] | null;
687
+ /** `null` lifts the minimum. An explicit `null` **clears** it and is sent as a JSON null rather than pruned (only `undefined` is dropped); omit the field to leave it alone. */
688
+ min_amount_cents?: number | null;
678
689
  }
679
690
 
680
691
  export interface ValidateCouponParams {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.8.0";
1
+ export const VERSION = "0.8.1";