mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim.git
synced 2026-08-19 12:34:03 +00:00
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Orders\Processors;
|
|
|
|
|
|
use App\Classes\Modules\ControllerLogic\Exceptions\InternalServerErrorException;
|
|
use App\Classes\Modules\Orders\DataTransferObjects\StepObject;
|
|
use App\Classes\ValueObjects\Constants\OrderSteps;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class WarehouseArrivalOrder extends AbstractStepProcessor
|
|
{
|
|
|
|
/** @var string */
|
|
const STEP_REFERENCE = OrderSteps::ORDER_WAREHOUSE_ARRIVAL_STEP;
|
|
|
|
/** @var int */
|
|
private $orderId;
|
|
|
|
/** @var StepObject */
|
|
private $step;
|
|
|
|
/**
|
|
* WarehousePackOrder constructor.
|
|
* @param int $orderId
|
|
* @param string $completeDate
|
|
*/
|
|
public function __construct(int $orderId, string $completeDate = null)
|
|
{
|
|
$this->orderId = $orderId;
|
|
$this->step = new StepObject(self::STEP_REFERENCE, $completeDate);
|
|
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function validator(): bool {
|
|
return true;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return JsonResponse
|
|
* @throws InternalServerErrorException
|
|
*/
|
|
public function execute(): JsonResponse {
|
|
return $this->handler($this->orderId, $this->step);
|
|
}
|
|
|
|
|
|
} |