mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-26 22:50:29 +01:00
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
// SPDX-FileCopyrightText: 2024 Andreas Palm
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
namespace Xentral\Modules\Onlineshop\Data;
|
|
|
|
class OrderStatusUpdateRequest
|
|
{
|
|
/**
|
|
* @var int ID of the (primary/imported) order (ERP domain)
|
|
*/
|
|
public int $orderId;
|
|
|
|
/**
|
|
* @var string ID of the order (Shop domain)
|
|
*/
|
|
public string $shopOrderId;
|
|
|
|
/**
|
|
* @var OrderStatus current order status
|
|
*/
|
|
public OrderStatus $orderStatus;
|
|
|
|
/**
|
|
* @var Shipment[] list of shipments for this order
|
|
*/
|
|
public array $shipments = array();
|
|
|
|
public function getTrackingNumberList() : array {
|
|
$list = [];
|
|
foreach ($this->shipments as $shipment) {
|
|
if (!empty($shipment->trackingNumber))
|
|
$list[] = $shipment->trackingNumber;
|
|
}
|
|
return $list;
|
|
}
|
|
|
|
public function getTrackingUrlList() : array {
|
|
$list = [];
|
|
foreach ($this->shipments as $shipment) {
|
|
if (!empty($shipment->trackingUrl))
|
|
$list[] = $shipment->trackingUrl;
|
|
}
|
|
return $list;
|
|
}
|
|
}
|