@spree/docs 0.1.287 → 0.1.289

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.
@@ -199,7 +199,30 @@ curl -X PATCH 'https://api.mystore.com/api/v3/admin/orders/or_xxx/claims/claim_x
199
199
 
200
200
  A replacement creates a new [fulfillment](fulfillments.md) on the original order, so the customer doesn't have to place a second one.
201
201
 
202
- The replacement is filed under the order line it replaces, but it doesn't count toward that line's quantity. Editing the line later, from a claim or an [exchange](#exchanges), adds or removes only the goods the customer paid for and leaves the replacement where it is.
202
+ The replacement is filed under the order line it replaces, but it doesn't count toward that line's quantity. Editing the line later, from a claim or an [exchange](#exchanges), adds or removes only the goods the customer paid for and leaves the replacement where it is. Adding a fulfillment for that line works the same way: it takes only the goods the customer paid for, and the replacement stays in its own fulfillment.
203
+
204
+ If a replacement's fulfillment is canceled, for example because the courier lost the booking, send the goods again by naming that fulfillment as the source of a new one. The new fulfillment takes everything the canceled one held and reserves its stock again. It is priced like any new fulfillment, so pass `cost: 0` to carry over the canceled fulfillment's delivery cost instead, which keeps a free replacement free.
205
+
206
+
207
+ ```typescript Admin SDK
208
+ await adminClient.orders.fulfillments.create('or_xxx', {
209
+ stock_location_id: 'sloc_xxx',
210
+ source_fulfillment_id: 'ful_xxx', // the canceled replacement fulfillment
211
+ cost: 0,
212
+ })
213
+ ```
214
+
215
+ ```bash cURL
216
+ curl -X POST 'https://api.mystore.com/api/v3/admin/orders/or_xxx/fulfillments' \
217
+ -H 'X-Spree-API-Key: sk_xxx' \
218
+ -H 'Content-Type: application/json' \
219
+ -d '{
220
+ "stock_location_id": "sloc_xxx",
221
+ "source_fulfillment_id": "ful_xxx",
222
+ "cost": 0
223
+ }'
224
+ ```
225
+
203
226
 
204
227
  A claim never refunds more than the customer paid for the claimed items after discounts, tax included. Each claim line reports that ceiling as `paid_amount`, and the `refund_amount` you enter for a line includes its tax. The tax goes back in proportion to the money: refunding half of what a line is worth gives back half its tax, and resolving with a replacement alone gives none back.
205
228
 
@@ -408,7 +408,7 @@ New seams with no legacy counterpart:
408
408
  | `order_discount_create_service` | `Spree::Orders::Discounts::Create` | renamed from `order_add_manual_discount_service` (never released) |
409
409
  | `order_update_statuses_service` | `Spree::Orders::UpdateStatuses` | the sole status writer |
410
410
 
411
- Removed keys (their classes no longer exist): `carts_validate_service` (completion validation is `Spree::Checkout::Requirements` directly), plus the dead legacy `Spree::Cart::*` service namespace registrations.
411
+ Removed keys (their classes no longer exist): `carts_validate_service` (completion validation is `Spree::Checkout::Requirements` directly), `cart_empty_service` and `payment_create_service` (see [Unused services are gone](#unused-services-are-gone)), plus the dead legacy `Spree::Cart::*` service namespace registrations.
412
412
 
413
413
  If you override a workflow seam, subclass the shipped workflow (or implement the same `perform` keyword contract) — workflow arguments are plain Ruby keywords, so a mismatch raises `ArgumentError` at call time, not silently.
414
414
 
@@ -497,6 +497,16 @@ Two behavior notes for extension authors: `Spree::Metadata` no longer includes t
497
497
 
498
498
  Single-store installations notice nothing. **A multi-store installation ends up with its whole schema on the default store**, and its other stores start empty: create the fields you want on each store, or run `bin/rake spree:upgrade:backfill_custom_field_definition_stores` first if the migration ran before any store existed. Existing values keep pointing at the definitions they always did, which is why the rows are not copied — copies would render blank anyway. Two definitions whose `namespace`/`key` pair flattens to one `cf_…` key (`("a_b", "c")` and `("a", "b_c")`) can no longer coexist in a store; the migration suffixes the later one and names it in its output so you can rename it.
499
499
 
500
+ ### Unused services are gone
501
+
502
+ These had no caller left in Spree, so they are removed with no replacement shim. Setting or reading their `Spree::Dependencies` keys now raises `NoMethodError`.
503
+
504
+ | Removed | Use instead |
505
+ |---|---|
506
+ | `Spree::PromotionHandler::Page` (activating a promotion by visiting its `path`) | apply the promotion with a coupon code, or as an automatic promotion |
507
+ | `Spree::Carts::Empty` and `cart_empty_service` | remove items through the Store API cart items endpoints, or delete the cart with `Spree.cart_destroy_service` |
508
+ | `Spree::Payments::Create` and `payment_create_service` | the Store API payments endpoint, `Spree::StoreCredits::Apply` or `Spree.gift_card_apply_workflow` |
509
+
500
510
  ### The Legacy order-routing strategy is gone
501
511
 
502
512
  `Spree::OrderRouting::Strategy::Legacy` — the pre-5.5 escape hatch that delegated straight to `Spree::Stock::Coordinator` and consulted no routing rules — is removed and no longer registered in `Spree.order_routing.strategies`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.287",
3
+ "version": "0.1.289",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",