mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 20:43:56 +00:00
37 lines
984 B
PHP
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,
|
|
];
|
|
}
|
|
}
|