26 lines
654 B
PHP
26 lines
654 B
PHP
<?php
|
|
|
|
namespace Modules\Core\Shipping\Contracts;
|
|
|
|
use Lunar\Models\Order;
|
|
use Modules\Core\Shipping\DataTransferObjects\ShipmentRequest;
|
|
use Modules\Core\Shipping\Models\Shipment;
|
|
|
|
interface CarrierFulfillmentInterface
|
|
{
|
|
/**
|
|
* Create a shipment with the carrier for the given order.
|
|
*/
|
|
public function createShipment(Order $order, ShipmentRequest $request): 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;
|
|
}
|