Feature: Order Updates, Events, Order Flows, Shipment And COD support

This commit is contained in:
2026-09-14 00:03:06 +03:00
parent 78bbd8390a
commit 44c6b7defd
73 changed files with 2854 additions and 464 deletions
+5 -3
View File
@@ -3,24 +3,26 @@
namespace Modules\Core\Shipping\DTOs;
use Illuminate\Support\Collection;
use Modules\Core\Shipping\Models\Manifest;
class ManifestResult
{
private function __construct(
public readonly bool $success,
public readonly ?string $reference,
public readonly ?Manifest $manifest,
public readonly Collection $includedShipments,
public readonly Collection $blockedShipments,
public readonly ?string $reason,
) {}
public static function success(string $reference, Collection $includedShipments): self
public static function success(Manifest $manifest, Collection $includedShipments): self
{
return new self(true, $reference, $includedShipments, collect(), null);
return new self(true, $manifest->reference, $manifest, $includedShipments, collect(), null);
}
public static function blocked(Collection $blockedShipments, string $reason): self
{
return new self(false, null, collect(), $blockedShipments, $reason);
return new self(false, null, null, collect(), $blockedShipments, $reason);
}
}