Files
exchange-2.0/app/Classes/Modules/Rules/DataTransferObjects/CheckEInvoiceAmountLimitRuleDTO.php
T

37 lines
984 B
PHP

<?php
namespace App\Classes\Modules\Rules\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class CheckEInvoiceAmountLimitRuleDTO implements DataTransferObject
{
public int $bookingId;
public int $companyId;
public ?string $amount;
public ?string $paymentMethod;
public ?string $voucherCode;
public function __construct(array $data)
{
$this->bookingId = $data['booking_id'];
$this->companyId = $data['company_id'];
$this->amount = $data['amount'] ?? null;
$this->paymentMethod = $data['payment_method'] ?? null;
$this->voucherCode = $data['voucherCode'] ?? null;
}
public function toArray(): array
{
return [
'booking_id' => $this->bookingId,
'company_id' => $this->companyId,
'amount' => $this->amount,
'payment_method' => $this->paymentMethod,
'voucher_code' => $this->voucherCode,
];
}
}