Added functionality to upsert pickup exceptions for public holidays and query for auto-updated exceptions. This includes new classes for handling input and service integration with the public holidays API.
23 lines
552 B
PHP
23 lines
552 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Cqs\Actions\PickupExceptions;
|
|
|
|
use App\Contracts\ActionInput;
|
|
use App\Dto\PublicHolidayDto;
|
|
use Webmozart\Assert\Assert;
|
|
|
|
final readonly class UpsertShopsPickupExceptionsForYearInput implements ActionInput
|
|
{
|
|
/**
|
|
* @param list<PublicHolidayDto> $holidays
|
|
*/
|
|
public function __construct(
|
|
public int $year,
|
|
public array $holidays,
|
|
) {
|
|
Assert::greaterThanEq($this->year, 2026);
|
|
Assert::allIsInstanceOf($this->holidays, PublicHolidayDto::class);
|
|
}
|
|
}
|