Feature: Creating Shipping Carrier Contracts

This commit is contained in:
2026-07-16 17:14:41 +03:00
parent e18b2fa44c
commit 08135c4c8f
3 changed files with 60 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
namespace Modules\Core\Shipping\Contracts;
use Lunar\Models\Order;
use Modules\Core\Shipping\Models\Shipment;
interface CarrierFulfillmentInterface
{
/**
* Create a shipment with the carrier for the given order.
*/
public function createShipment(Order $order, array $overrides = []): Shipment;
/**
* Fetch the printable label for a shipment (raw file bytes).
*/
public function printLabel(Shipment $shipment): string;
/**
* Cancel a shipment with the carrier.
*/
public function cancelShipment(Shipment $shipment): void;
}