diff --git a/package-lock.json b/package-lock.json index ee45e2c..a031cfa 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.6", - "@seamapi/types": "1.700.0", + "@seamapi/types": "1.703.0", "del": "^7.1.0", "prettier": "^3.0.0" } @@ -456,9 +456,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.700.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.700.0.tgz", - "integrity": "sha512-EnuGUjBRtPaL/b/Smessj5O1SZNtBBycVHReWF75eC9hC9GhaLCJvbrF9e1tr+OP7Y5vDm4e4wotwMUFuSJEHQ==", + "version": "1.703.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.703.0.tgz", + "integrity": "sha512-iDZ+RYChXpttg+tUGZi6hnRNJen2QRLVZpFXYcbx51GuANJDLoVI7l0VIazlLoPHDIJt850ot8YUO7SIfbhicw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 95b6ca7..9a311f8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@prettier/plugin-php": "^0.24.0", "@seamapi/nextlove-sdk-generator": "^1.19.6", - "@seamapi/types": "1.700.0", + "@seamapi/types": "1.703.0", "del": "^7.1.0", "prettier": "^3.0.0" } diff --git a/src/Objects/Event.php b/src/Objects/Event.php index 1b5998c..0e95e27 100644 --- a/src/Objects/Event.php +++ b/src/Objects/Event.php @@ -53,6 +53,7 @@ public static function from_json(mixed $json): Event|null ends_at: $json->ends_at ?? null, enrollment_automation_id: $json->enrollment_automation_id ?? null, error_code: $json->error_code ?? null, + error_message: $json->error_message ?? null, event_id: $json->event_id ?? null, event_type: $json->event_type ?? null, fan_mode_setting: $json->fan_mode_setting ?? null, @@ -127,6 +128,7 @@ public function __construct( public string|null $ends_at, public string|null $enrollment_automation_id, public string|null $error_code, + public string|null $error_message, public string|null $event_id, public string|null $event_type, public string|null $fan_mode_setting, diff --git a/src/SeamClient.php b/src/SeamClient.php index d86fe2e..8c3c2af 100644 --- a/src/SeamClient.php +++ b/src/SeamClient.php @@ -1032,10 +1032,13 @@ public function list( ?string $acs_entrance_id = null, ?string $acs_system_id = null, ?string $customer_key = null, + ?float $limit = null, ?string $location_id = null, + ?string $page_cursor = null, ?string $reservation_key = null, ?string $space_id = null, ?string $user_identity_id = null, + ?callable $on_response = null, ): array { $request_payload = []; @@ -1051,9 +1054,15 @@ public function list( if ($customer_key !== null) { $request_payload["customer_key"] = $customer_key; } + if ($limit !== null) { + $request_payload["limit"] = $limit; + } if ($location_id !== null) { $request_payload["location_id"] = $location_id; } + if ($page_cursor !== null) { + $request_payload["page_cursor"] = $page_cursor; + } if ($reservation_key !== null) { $request_payload["reservation_key"] = $reservation_key; } @@ -1070,6 +1079,10 @@ public function list( json: (object) $request_payload, ); + if ($on_response !== null) { + $on_response($res); + } + return array_map( fn($r) => AccessGrant::from_json($r), $res->access_grants,