2026-07-19 17:41:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Core\Shipping\Contracts;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
2026-09-03 15:58:51 +03:00
|
|
|
use Modules\Core\Shipping\DTOs\TrackingCheckpoint;
|
2026-07-19 17:41:09 +03:00
|
|
|
use Modules\Core\Shipping\Models\Shipment;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Optional capability for carriers that expose shipment tracking. Carriers
|
|
|
|
|
* without a tracking API simply don't implement it.
|
|
|
|
|
*/
|
|
|
|
|
interface SupportsTracking
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Return the shipment's known checkpoints from the carrier — as many
|
|
|
|
|
* as the carrier's API returns in one call, not just the latest one.
|
|
|
|
|
* Deduplication against what's already stored happens elsewhere.
|
|
|
|
|
*
|
|
|
|
|
* @return Collection<int, TrackingCheckpoint>
|
|
|
|
|
*/
|
|
|
|
|
public function trackShipment(Shipment $shipment): Collection;
|
|
|
|
|
}
|