mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 05:39:35 +00:00
Ship orders: shipments with delivery notes
$order->shipments()->create([...]) records a delivery of a paid order's goods on Anikeen ID, which adds its delivery note to the user's order documents and sends order.shipped. $shipment->deliveryNote() downloads the PDF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
60b4b80f17
commit
5349ee81f6
5 files changed
+219
No files matched your search
@@ -101,6 +101,19 @@ class Order extends BaseResource
|
||||
->request('DELETE', sprintf('v1/orders/%s', $this->id))->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deliveries of this order's goods; `create()` ships them (see Shipments::create()).
|
||||
*
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function shipments(): Shipments
|
||||
{
|
||||
return Shipments::builder(fn() => $this->billable->anikeenId()
|
||||
->request('GET', sprintf('v1/orders/%s/shipments', $this->id)))
|
||||
->setBillable($this->billable)
|
||||
->setParent($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get order items from given order.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user