@@ -261,8 +261,7 @@ public function testCreateListGetDeleteEndpoint() {
261261 'INBOUND ' ,
262262 getenv ("BASE_CALLBACK_URL " ) . "/brtc/events " ,
263263 null ,
264- 'php-sdk-test ' ,
265- ["meta " => "data " ]
264+ 'php-sdk-test '
266265 );
267266 try {
268267 $ createResp = $ voiceClient ->createEndpoint ($ accountId , $ createReq )->getResult ();
@@ -279,7 +278,7 @@ public function testCreateListGetDeleteEndpoint() {
279278 $ this ->fail ("[ {$ e ->getCode ()}] {$ e ->getMessage ()}" );
280279 }
281280 $ this ->assertIsArray ($ endpoints );
282- $ ids = array_map (fn ($ ep ) => $ ep ->id , $ endpoints );
281+ $ ids = array_map (fn ($ ep ) => $ ep ->endpointId , $ endpoints );
283282 $ this ->assertContains ($ createResp ->endpointId , $ ids , 'Created endpoint should be in list ' );
284283
285284 // Get endpoint
@@ -288,7 +287,7 @@ public function testCreateListGetDeleteEndpoint() {
288287 } catch (BandwidthLib \APIException $ e ) {
289288 $ this ->fail ("[ {$ e ->getCode ()}] {$ e ->getMessage ()}" );
290289 }
291- $ this ->assertEquals ($ createResp ->endpointId , $ endpoint ->id );
290+ $ this ->assertEquals ($ createResp ->endpointId , $ endpoint ->endpointId );
292291 $ this ->assertEquals ('WEBRTC ' , $ endpoint ->type );
293292
294293 // Update endpoint BXML
@@ -326,8 +325,8 @@ public function testCreateEndpointResponseFields() {
326325 $ this ->assertIsString ($ createResp ->endpointId );
327326 $ this ->assertEquals ('WEBRTC ' , $ createResp ->type );
328327 $ this ->assertNotNull ($ createResp ->status );
329- $ this ->assertNotNull ($ createResp ->createdTime );
330- $ this ->assertNotNull ($ createResp ->updatedTime );
328+ $ this ->assertNotNull ($ createResp ->creationTimestamp );
329+ $ this ->assertNotNull ($ createResp ->expirationTimestamp );
331330 $ this ->assertEquals ('php-sdk-fields-test ' , $ createResp ->tag );
332331
333332 // Cleanup
@@ -361,12 +360,12 @@ public function testGetEndpointFields() {
361360 $ this ->fail ("[ {$ e ->getCode ()}] {$ e ->getMessage ()}" );
362361 }
363362 $ this ->assertInstanceOf (BandwidthLib \Voice \Models \Endpoint::class, $ endpoint );
364- $ this ->assertEquals ($ endpointId , $ endpoint ->id );
363+ $ this ->assertEquals ($ endpointId , $ endpoint ->endpointId );
365364 $ this ->assertEquals ('WEBRTC ' , $ endpoint ->type );
366365 $ this ->assertNotNull ($ endpoint ->status );
367366 $ this ->assertNotNull ($ endpoint ->direction );
368- $ this ->assertNotNull ($ endpoint ->createdTime );
369- $ this ->assertNotNull ($ endpoint ->updatedTime );
367+ $ this ->assertNotNull ($ endpoint ->creationTimestamp );
368+ $ this ->assertNotNull ($ endpoint ->expirationTimestamp );
370369 $ this ->assertEquals ('php-sdk-get-test ' , $ endpoint ->tag );
371370
372371 // Cleanup
@@ -402,7 +401,7 @@ public function testListEndpointsContainsCreated() {
402401 $ this ->assertIsArray ($ endpoints );
403402 $ this ->assertNotEmpty ($ endpoints );
404403
405- $ ids = array_map (fn ($ ep ) => $ ep ->id , $ endpoints );
404+ $ ids = array_map (fn ($ ep ) => $ ep ->endpointId , $ endpoints );
406405 $ this ->assertContains ($ endpointId , $ ids , 'Newly created endpoint should appear in list ' );
407406
408407 // Cleanup
@@ -435,7 +434,7 @@ public function testListEndpointsEachItemIsEndpointInstance() {
435434 }
436435 foreach ($ endpoints as $ ep ) {
437436 $ this ->assertInstanceOf (BandwidthLib \Voice \Models \Endpoint::class, $ ep );
438- $ this ->assertNotNull ($ ep ->id );
437+ $ this ->assertNotNull ($ ep ->endpointId );
439438 $ this ->assertNotNull ($ ep ->type );
440439 $ this ->assertNotNull ($ ep ->status );
441440 }
@@ -513,7 +512,7 @@ public function testDeleteEndpointRemovedFromList() {
513512 } catch (BandwidthLib \APIException $ e ) {
514513 $ this ->fail ("[ {$ e ->getCode ()}] {$ e ->getMessage ()}" );
515514 }
516- $ ids = array_map (fn ($ ep ) => $ ep ->id , $ endpoints );
515+ $ ids = array_map (fn ($ ep ) => $ ep ->endpointId , $ endpoints );
517516 $ this ->assertNotContains ($ endpointId , $ ids , 'Deleted endpoint should not appear in list ' );
518517 }
519518}
0 commit comments