diff --git a/src/DataTransferObject/SalesOrder/SalesOrder.php b/src/DataTransferObject/SalesOrder/SalesOrder.php index edd8cf3..9207324 100644 --- a/src/DataTransferObject/SalesOrder/SalesOrder.php +++ b/src/DataTransferObject/SalesOrder/SalesOrder.php @@ -30,9 +30,6 @@ final class SalesOrder extends AbstractDataTransferObject public ?PickAgainReason $pickAgainReason; - /** @var list */ - public array $orderLines = []; - /** * @param list $orderLines */ @@ -84,7 +81,8 @@ public function __construct( public ?Address $senderAddress = null, public ?string $sendWithOrder = null, public bool $generateAndPrintDeliveryNote = false, - array $orderLines = [], + /** @var list $orderLines */ + public array $orderLines = [], ) { $this->orderId = (string) $orderId; $this->orderNumber = (string) $orderNumber; @@ -94,16 +92,5 @@ public function __construct( $this->onHoldReason = self::convertEnum($onHoldReason, OnHoldReason::class); $this->paymentStatus = self::convertEnum($paymentStatus, PaymentStatus::class); $this->pickAgainReason = self::convertEnum($pickAgainReason, PickAgainReason::class); - - foreach ($orderLines as $orderLine) { - $this->addOrderLine($orderLine); - } - } - - public function addOrderLine(SalesOrderLine $orderLine): self - { - $this->orderLines[] = $orderLine; - - return $this; } }