möglich and nothing else, so every * other field is only set by the actual purchase (buchungsart Buchung, erfolgt). * * The redemption code is deliberately not exposed to the customer before payment: BusPro mails the * voucher itself once the transfer has arrived. */ final readonly class VoucherSaleResponse { public const string SALE_POSSIBLE = 'möglich'; public const string SALE_PROCESSED = 'erfolgt'; public function __construct( public string $status, public ?int $voucherId = null, public ?string $voucherNumber = null, public ?string $redemptionCode = null, public ?float $price = null, public ?string $invoiceNumber = null, public ?string $email = null, ) { } public function isInquiryValid(): bool { return self::SALE_POSSIBLE === $this->status; } public function isSaleSuccessful(): bool { return self::SALE_PROCESSED === $this->status; } }