| 1 |
<?php |
| 2 |
|
| 3 |
declare( strict_types=1 ); |
| 4 |
|
| 5 |
namespace Packetery\Core\Api\Rest; |
| 6 |
|
| 7 |
class PickupPointValidateResponse { |
| 8 |
|
| 9 |
/** @var bool */ |
| 10 |
private $isValid; |
| 11 |
|
| 12 |
/** @var array<int, array{code: string, description: string}> */ |
| 13 |
private $errors; |
| 14 |
|
| 15 |
/** |
| 16 |
* @param bool $isValid |
| 17 |
* @param array<int, array{code: string, description: string}> $errors |
| 18 |
*/ |
| 19 |
public function __construct( bool $isValid, array $errors ) { |
| 20 |
$this->isValid = $isValid; |
| 21 |
$this->errors = $errors; |
| 22 |
} |
| 23 |
|
| 24 |
public function isValid(): bool { |
| 25 |
return $this->isValid; |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* @return array<int, array{code: string, description: string}> |
| 30 |
*/ |
| 31 |
public function getErrors(): array { |
| 32 |
return $this->errors; |
| 33 |
} |
| 34 |
} |
| 35 |
|