feat: promotional and purchase vouchers

This commit is contained in:
Björn Fromme
2025-11-20 18:41:46 +01:00
parent 26681e5c62
commit aaa7e9f4c3
21 changed files with 847 additions and 6 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\BusProNet\Model;
/**
* Purchase voucher validation response from BPN API.
*
* Represents a validated purchase voucher (Gutschein) with redemption code.
* These vouchers have a remaining balance that can be redeemed against bookings.
* The voucher reduces the booking price by its balance until depleted.
*
* Purchase vouchers can be regular purchased vouchers or goodwill vouchers (Kulanz)
* issued to customers for complaints or other reasons.
*/
final readonly class PurchaseVoucher
{
public function __construct(
public string $voucherNumber,
public string $redemptionCode,
public int $voucherId,
public float $remainingBalance,
public string $type,
) {
}
}