Spree::InventoryUnit object is created every time that an item is sold.
It tracks a sold item as it changes location: from being a sold item waiting in the
warehouse to be shipped, to being a shipped item (or potentially a returned item).
Note that the
Spree::InventoryUnit tracks an item as an object associated with
Spree::Shipment and a specific
allows you to more closely track the status of an order and the line items and
shipments associated with it.
Spree::InventoryUnit object has the following attributes:
state: The current state of the inventory unit. The state value can be
variant_id: The ID for the
Spree::Variantcorresponding with the inventory unit that has been sold.
shipment_id: The ID for the
Spree::Shipmentthat the inventory unit is being shipped in.
pending: Documents whether the current unit is pending or finalized. If
true, the stock for this unit has not yet been allocated to a shipment. If
false, the stock has been finalized and is no longer tracked in the
line_item_id: The ID for the
Spree::LineItemthat the inventory unit corresponds with.
carton_id: The ID for the
Spree::Cartonthat the inventory unit belongs to.
Solidus is an open source platform supported by the community. We encourage everyone using Solidus to contribute back to the documentation and the code.