@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 +4 -2
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/package.json +1 -1
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
|
|
370
|
-
`
|
|
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
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
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
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
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
|