diff --git a/package-lock.json b/package-lock.json index a39bc94..e714526 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@prettier/plugin-php": "^0.24.0", "@seamapi/nextlove-sdk-generator": "^1.19.10", - "@seamapi/types": "1.809.0", + "@seamapi/types": "1.811.0", "del": "^7.1.0", "prettier": "^3.0.0" } @@ -533,9 +533,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.809.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.809.0.tgz", - "integrity": "sha512-xBrXorx5njf53vwoHSgEzXxL4Bul82kxKOzRVNs/K37VU4YcaLKQc1Q7ONuFPP/PfDSWP2pCOiRgzx99nrPiHQ==", + "version": "1.811.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.811.0.tgz", + "integrity": "sha512-pKnGG3+OBDp1JXU8zvwbrYvXLvdJNCFAuey78igPRCrNgsd1v9w7XvA4Fefb4Yx4FHjPmArNQaAHy/TbgEtx0A==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 43bdf45..0afa0ec 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@prettier/plugin-php": "^0.24.0", "@seamapi/nextlove-sdk-generator": "^1.19.10", - "@seamapi/types": "1.809.0", + "@seamapi/types": "1.811.0", "del": "^7.1.0", "prettier": "^3.0.0" } diff --git a/src/Objects/Space.php b/src/Objects/Space.php index 7e36a82..94ac6a6 100644 --- a/src/Objects/Space.php +++ b/src/Objects/Space.php @@ -17,6 +17,9 @@ public static function from_json(mixed $json): Space|null name: $json->name, space_id: $json->space_id, workspace_id: $json->workspace_id, + customer_data: isset($json->customer_data) + ? SpaceCustomerData::from_json($json->customer_data) + : null, customer_key: $json->customer_key ?? null, parent_space_id: $json->parent_space_id ?? null, parent_space_key: $json->parent_space_key ?? null, @@ -32,6 +35,7 @@ public function __construct( public string $name, public string $space_id, public string $workspace_id, + public SpaceCustomerData|null $customer_data, public string|null $customer_key, public string|null $parent_space_id, public string|null $parent_space_key, diff --git a/src/Objects/SpaceCustomerData.php b/src/Objects/SpaceCustomerData.php new file mode 100644 index 0000000..fcf515a --- /dev/null +++ b/src/Objects/SpaceCustomerData.php @@ -0,0 +1,24 @@ +default_checkin_time ?? null, + default_checkout_time: $json->default_checkout_time ?? null, + time_zone: $json->time_zone ?? null, + ); + } + + public function __construct( + public string|null $default_checkin_time, + public string|null $default_checkout_time, + public string|null $time_zone, + ) {} +} diff --git a/src/SeamClient.php b/src/SeamClient.php index 7674063..2d54094 100644 --- a/src/SeamClient.php +++ b/src/SeamClient.php @@ -4956,6 +4956,7 @@ public function add_devices(array $device_ids, string $space_id): void public function create( string $name, ?array $acs_entrance_ids = null, + mixed $customer_data = null, ?string $customer_key = null, ?array $device_ids = null, ?string $space_key = null, @@ -4968,6 +4969,9 @@ public function create( if ($acs_entrance_ids !== null) { $request_payload["acs_entrance_ids"] = $acs_entrance_ids; } + if ($customer_data !== null) { + $request_payload["customer_data"] = $customer_data; + } if ($customer_key !== null) { $request_payload["customer_key"] = $customer_key; } @@ -5133,6 +5137,7 @@ public function remove_devices(array $device_ids, string $space_id): void public function update( ?array $acs_entrance_ids = null, + mixed $customer_data = null, ?string $customer_key = null, ?array $device_ids = null, ?string $name = null, @@ -5144,6 +5149,9 @@ public function update( if ($acs_entrance_ids !== null) { $request_payload["acs_entrance_ids"] = $acs_entrance_ids; } + if ($customer_data !== null) { + $request_payload["customer_data"] = $customer_data; + } if ($customer_key !== null) { $request_payload["customer_key"] = $customer_key; }