22 lines
691 B
PHP
22 lines
691 B
PHP
<?php
|
|
|
|
namespace App\Domains\Ticketing\Ticket\Services;
|
|
|
|
use App\Domains\Commerce\Catalog\Models\CatalogItem;
|
|
use App\Domains\Commerce\Catalog\Models\Inventory;
|
|
use App\Domains\Commerce\Catalog\Models\Variant;
|
|
use Illuminate\Validation\ValidationException;
|
|
|
|
interface EntryReservationPolicy
|
|
{
|
|
/**
|
|
* Validate additional rules after selections are resolved and locked, before
|
|
* stock or tickets change. Idempotent replays do not run this validation.
|
|
*
|
|
* @param array<int, array{item: CatalogItem, variant: Variant|null, inventory: Inventory|null}> $selections
|
|
*
|
|
* @throws ValidationException
|
|
*/
|
|
public function validate(array $selections): void;
|
|
}
|