Closed TwinMist closed 5 years ago
To set the primary endpoint for a user, use UserModifyRequest17sp4
. The following example assumes you have a device named TestDevice
in the same group as user testuser@test.com
and you're setting the lineport as testuser_primary@test.com
.
use CWM\BroadWorksConnector\Ocip\Models\AccessDevice;
use CWM\BroadWorksConnector\Ocip\Models\AccessDeviceMultipleContactEndpointModify;
use CWM\BroadWorksConnector\Ocip\Models\UserModifyRequest17sp4;
use CWM\BroadWorksConnector\Ocip\Models\UserModifyRequest17sp4\Endpoint;
use CWM\BroadWorksConnector\OcipClient;
$request = (new UserModifyRequest17sp4())
->setUserId('testuser@test.com')
->setEndpoint(
(new Endpoint())
->setAccessDeviceEndpoint(
(new AccessDeviceMultipleContactEndpointModify())
->setLinePort('testuser_primary@test.com')
->setAccessDevice(
(new AccessDevice())
->setDeviceLevel('Group')
->setDeviceName('TestDevice')
)
)
);
since V3 has it changed the way you code this? thanks
Hi Would it be possible if you can write up an example code on now to update the lineport of a user
many thanks