| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Service; |
| 4 |
|
| 5 |
use App\Billingo\Models\BillingoModel; |
| 6 |
|
| 7 |
class BillingoResponse |
| 8 |
{ |
| 9 |
|
| 10 |
public function __construct( |
| 11 |
private readonly string $reasonPhrase, |
| 12 |
private readonly int $statusCode, |
| 13 |
private readonly array $meta = [], |
| 14 |
private array|BillingoCollection|BillingoModel $data = [], |
| 15 |
private readonly array $errors = [], |
| 16 |
) |
| 17 |
{ |
| 18 |
} |
| 19 |
|
| 20 |
public function getMeta(): array |
| 21 |
{ |
| 22 |
return $this->meta; |
| 23 |
} |
| 24 |
|
| 25 |
public function getReasonPhrase(): string |
| 26 |
{ |
| 27 |
return $this->reasonPhrase; |
| 28 |
} |
| 29 |
|
| 30 |
public function getStatusCode(): int |
| 31 |
{ |
| 32 |
return $this->statusCode; |
| 33 |
} |
| 34 |
|
| 35 |
public function getData(): array|BillingoCollection|BillingoModel |
| 36 |
{ |
| 37 |
return $this->data; |
| 38 |
} |
| 39 |
|
| 40 |
public function setData(array|BillingoCollection|BillingoModel $data): void |
| 41 |
{ |
| 42 |
$this->data = $data; |
| 43 |
} |
| 44 |
|
| 45 |
public function getErrors(): array |
| 46 |
{ |
| 47 |
return $this->errors; |
| 48 |
} |
| 49 |
} |
| 50 |
|