create-cartbase 0.1.2 → 0.1.3
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
|
@@ -57,17 +57,23 @@ changes the total; `refreshPaymentIfTerminal()` from Stripe Elements
|
|
|
57
57
|
{
|
|
58
58
|
"shipping_options": [{
|
|
59
59
|
"id": "so_…", "name": "Standard",
|
|
60
|
-
"provider_id":
|
|
61
|
-
"
|
|
60
|
+
"provider_id": null, // the carrier, when the merchant bound one
|
|
61
|
+
"service_zone_id": "sz_…", "shipping_profile_id": "sp_…",
|
|
62
62
|
"data": null,
|
|
63
|
-
"type": { "
|
|
64
|
-
"amount": 5, //
|
|
63
|
+
"type": { "label": "Express" }, // the option's display label, or null
|
|
64
|
+
"amount": 5, // the price the cart pays; null without cart_id
|
|
65
65
|
"price_type": "flat" // calculated-rate carriers not wired yet
|
|
66
66
|
}],
|
|
67
67
|
"count": 1, "offset": 0, "limit": 1
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
- **Eligibility** — four gates run server-side before an option lists:
|
|
72
|
+
the option's shipping profile must be among the cart products' profiles;
|
|
73
|
+
its zone must cover the shipping address; its visibility rules must
|
|
74
|
+
pass; and a price must exist for the cart. Conditional rates (tiers by
|
|
75
|
+
order amount, cart weight, or cart volume) resolve here — `amount` is
|
|
76
|
+
always the tier the cart actually satisfies.
|
|
71
77
|
- **Errors** — 404 `cart_not_found` (bad `cart_id`).
|
|
72
78
|
- **SDK** — `checkout.listShippingOptions(client, {cart_id})`.
|
|
73
79
|
- **Components** — shipping picker, carrier/locker pickers (carrier
|