diff --git a/src/AdministrationUnit/Response/AdministrationUnit.php b/src/AdministrationUnit/Response/AdministrationUnit.php index d70bf63..cb4ecf6 100644 --- a/src/AdministrationUnit/Response/AdministrationUnit.php +++ b/src/AdministrationUnit/Response/AdministrationUnit.php @@ -4,6 +4,7 @@ use HnutiBrontosaurus\BisClient\AdministrationUnit\Category; use HnutiBrontosaurus\BisClient\Response\Coordinates; +use HnutiBrontosaurus\BisClient\Response\Image; use function str_starts_with; @@ -16,6 +17,8 @@ final class AdministrationUnit private function __construct( private int $id, private string $name, + private ?string $description, + private ?Image $image, private bool $isForKids, private string $address, private ?Coordinates $coordinates, @@ -34,6 +37,8 @@ private function __construct( * id: int, * name: string, * abbreviation: string, + * description: string, + * image: array{small: string, medium: string, large: string, original: string}|null, * is_for_kids: bool, * phone: string, * email: string, @@ -64,6 +69,8 @@ public static function fromResponseData(array $data): self return new self( $data['id'], $data['name'], + $data['description'] !== '' ? $data['description'] : null, + $data['image'] !== null ? Image::from($data['image']) : null, $data['is_for_kids'], $data['address'], $data['gps_location'] !== null @@ -104,6 +111,21 @@ public function getName(): string } + public function getDescription(): ?string + { + return $this->description; + } + + + /** + * @return array{small: string, medium: string, large: string, original: string}|null + */ + public function getImage(): ?array + { + return $this->image; + } + + public function getIsForKids(): bool { return $this->isForKids;