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

29 lines
725 B
PHP

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