Factory
ShipmentDocumentFactory
Magento\Sales\Model\Order\ShipmentDocumentFactory
What it does
This factory class creates shipment documents for orders in Magento 2.
Developers use it when they need to programmatically create shipments, specifying which order items to ship, tracking numbers, comments, and other shipment details.
It handles the complexity of building a complete shipment object from various input parameters like items, tracks, packages, and comments.
Public Methods
- create()