feat: correct determination of inquiry status and conditional voucher field display

This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:11 +01:00
1 parent 85998534fe
commit 1f2f2751e4
19 files changed
+468 -193

No files matched your search

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Model;
/**
* Response model for service availability API calls.
*
* Contains both service-level availability data and travel-level
* booking status information from the VERFUEGBARKEIT endpoint.
*/
class ServiceAvailabilityResponse
{
/**
* @param array<int, Availability> $services Service availability data indexed by service ID
* @param array<string> $allowedBookingStatus Allowed booking status codes (e.g., ['F', 'O', 'A'])
* @param string|null $travelStatus Travel status from API (e.g., 'frei', 'anfrage')
*/
public function __construct(
private readonly array $services,
public readonly array $allowedBookingStatus = [],
public readonly ?string $travelStatus = null,
) {
}
/**
* @return array<int, Availability>
*/
public function getServices(): array
{
return $this->services;
}
}