Workflow to create fulfillments in Spree, moving inventory units.
# Source: https://github.com/spree/spree | License: BSD-3-Clause | Copyright 2024-present, Vendo Sp. z o.o., Vendo Connect Inc
# Provided via justclaw.it.com; keep this notice with the code.
module Spree
module Fulfillments
# Manually creates a fulfillment (Spree::Fulfillment) on a completed order,
# bypassing order routing. Moves the requested quantities of each line
# item's not-yet-shipped inventory units out of their current shipments
# into the new fulfillment, mirroring externally-managed fulfillment
# (3PL, courier API, drop-shipping) back into Spree.
#
# Stock bookkeeping follows the split/transfer semantics: when the source
# and target stock locations differ, moved quantities are restocked at the
# source and unstocked at the target. Source s
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key