Feature: Shipment Updates to handle COD

This commit is contained in:
2026-07-19 18:27:24 +03:00
parent 435a4dd290
commit 9f30a7324e
5 changed files with 184 additions and 21 deletions
@@ -0,0 +1,20 @@
<?php
namespace Modules\Core\Shipping\DataTransferObjects;
/**
* Carrier-agnostic input for CarrierFulfillmentInterface::createShipment().
* Every field is optional — a carrier reads only what it needs and ignores
* the rest (e.g. destinationLocationId only matters to locker-delivery
* carriers like Box Now; ACS has no use for it).
*/
class ShipmentRequest
{
public function __construct(
public readonly ?float $weight = null,
public readonly int $packageCount = 1,
public readonly ?string $destinationLocationId = null,
public readonly ?string $paymentMode = null,
public readonly ?float $amountToCollect = null,
) {}
}