diff --git a/src/Objects/AcsEntrance.php b/src/Objects/AcsEntrance.php index 5dd8e81..4f503fa 100644 --- a/src/Objects/AcsEntrance.php +++ b/src/Objects/AcsEntrance.php @@ -38,6 +38,11 @@ public static function from_json(mixed $json): AcsEntrance|null $json->salto_ks_metadata ) : null, + salto_space_metadata: isset($json->salto_space_metadata) + ? AcsEntranceSaltoSpaceMetadata::from_json( + $json->salto_space_metadata + ) + : null, visionline_metadata: isset($json->visionline_metadata) ? AcsEntranceVisionlineMetadata::from_json( $json->visionline_metadata @@ -56,6 +61,7 @@ public function __construct( public AcsEntranceDormakabaCommunityMetadata|null $dormakaba_community_metadata, public AcsEntranceLatchMetadata|null $latch_metadata, public AcsEntranceSaltoKsMetadata|null $salto_ks_metadata, + public AcsEntranceSaltoSpaceMetadata|null $salto_space_metadata, public AcsEntranceVisionlineMetadata|null $visionline_metadata ) { } diff --git a/src/Objects/AcsEntranceDormakabaCommunityMetadata.php b/src/Objects/AcsEntranceDormakabaCommunityMetadata.php index 781b606..720c3bd 100644 --- a/src/Objects/AcsEntranceDormakabaCommunityMetadata.php +++ b/src/Objects/AcsEntranceDormakabaCommunityMetadata.php @@ -10,10 +10,17 @@ public static function from_json( if (!$json) { return null; } - return new self(access_point_name: $json->access_point_name); + return new self( + access_point_name: $json->access_point_name, + common_area_number: $json->common_area_number ?? null, + inner_access_points_names: $json->inner_access_points_names ?? null + ); } - public function __construct(public string $access_point_name) - { + public function __construct( + public string $access_point_name, + public float|null $common_area_number, + public array|null $inner_access_points_names + ) { } } diff --git a/src/Objects/AcsEntranceSaltoSpaceMetadata.php b/src/Objects/AcsEntranceSaltoSpaceMetadata.php new file mode 100644 index 0000000..3721a41 --- /dev/null +++ b/src/Objects/AcsEntranceSaltoSpaceMetadata.php @@ -0,0 +1,26 @@ +door_name, + ext_door_id: $json->ext_door_id, + door_description: $json->door_description ?? null + ); + } + + public function __construct( + public string $door_name, + public string $ext_door_id, + public string|null $door_description + ) { + } +}