@usethrottle/cart 3.14.0 → 3.15.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 CHANGED
@@ -366,8 +366,10 @@ await client.items.add(cart.id, {
366
366
  to 1 year.
367
367
  - `totalPayments` (2–60) makes an installment plan; `trialDays` (0–365) a free
368
368
  trial. They cannot be combined (`400 invalid_combination`).
369
- - `type` is forced to `subscription`, and the line never ships:
370
- `requiresShipping: true` is rejected with `400 validation_error`.
369
+ - `type` is forced to `subscription`, and the line is never charged shipping.
370
+ It ships only with `deliveryMethod: 'shipment'`, which makes a physical
371
+ subscription: every renewal order owes a box. `requiresShipping: true` is
372
+ rejected with `400 validation_error`.
371
373
  - A free-trial line is stored with `unitPrice: 0` and your price on
372
374
  `recurring.amount`, and its name gets a "— 14-day free trial" suffix.
373
375
  - `PATCH` may change `quantity` (seats) and `metadata` only. Changing
package/dist/index.d.cts CHANGED
@@ -316,12 +316,20 @@ interface AddLineItemInput {
316
316
  taxAmount?: number;
317
317
  discountAmount?: number;
318
318
  /**
319
- * Makes this line a subscription: `type` is forced to `subscription`, and it
320
- * never ships (`requiresShipping: true` is rejected with it). A free-trial
321
- * line is stored with `unitPrice` 0 and your price on `recurring.amount`.
322
- * Terms cannot change later: remove the line and add it again.
319
+ * Makes this line a subscription: `type` is forced to `subscription`. It
320
+ * ships only with `deliveryMethod: 'shipment'` (a physical subscription: a
321
+ * box every cycle, no shipping charge); `requiresShipping: true` is
322
+ * rejected with it. A free-trial line is stored with `unitPrice` 0 and your
323
+ * price on `recurring.amount`. Terms cannot change later: remove the line
324
+ * and add it again.
323
325
  */
324
326
  recurring?: LineRecurringInput;
327
+ /**
328
+ * What the item needs before it counts as delivered. Omit to infer it from
329
+ * `type` and `metadata`. `digital` and `access_grant` deliver themselves on
330
+ * payment; `none` means nothing to deliver.
331
+ */
332
+ deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
325
333
  imageUrl?: string;
326
334
  /**
327
335
  * Whether this item is physically shippable. For external/ad-hoc catalogs
package/dist/index.d.ts CHANGED
@@ -316,12 +316,20 @@ interface AddLineItemInput {
316
316
  taxAmount?: number;
317
317
  discountAmount?: number;
318
318
  /**
319
- * Makes this line a subscription: `type` is forced to `subscription`, and it
320
- * never ships (`requiresShipping: true` is rejected with it). A free-trial
321
- * line is stored with `unitPrice` 0 and your price on `recurring.amount`.
322
- * Terms cannot change later: remove the line and add it again.
319
+ * Makes this line a subscription: `type` is forced to `subscription`. It
320
+ * ships only with `deliveryMethod: 'shipment'` (a physical subscription: a
321
+ * box every cycle, no shipping charge); `requiresShipping: true` is
322
+ * rejected with it. A free-trial line is stored with `unitPrice` 0 and your
323
+ * price on `recurring.amount`. Terms cannot change later: remove the line
324
+ * and add it again.
323
325
  */
324
326
  recurring?: LineRecurringInput;
327
+ /**
328
+ * What the item needs before it counts as delivered. Omit to infer it from
329
+ * `type` and `metadata`. `digital` and `access_grant` deliver themselves on
330
+ * payment; `none` means nothing to deliver.
331
+ */
332
+ deliveryMethod?: 'shipment' | 'digital' | 'access_grant' | 'service' | 'in_person' | 'custom' | 'none';
325
333
  imageUrl?: string;
326
334
  /**
327
335
  * Whether this item is physically shippable. For external/ad-hoc catalogs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usethrottle/cart",
3
- "version": "3.14.0",
3
+ "version": "3.15.0",
4
4
  "description": "Typed REST client for the Throttle Cart API.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",