public function usersStatus($id, $status)
    {
        $statuses = ["free", "busy", "dinner", "break"];

        if (empty($status) || !in_array($status, $statuses)) {
            throw new \InvalidArgumentException(
                'Parameter `status` must be not empty & must be equal one of these values: free|busy|dinner|break'
            );
        }

        /** @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            "/users/$id/status",
            "POST",
            ['status' => $status]
        );
    }
public function usersStatus($id, $status)
    {
        $statuses = ["free", "busy", "dinner", "break"];

        if (empty($status) || !in_array($status, $statuses)) {
            throw new \InvalidArgumentException(
                'Parameter `status` must be not empty & must be equal one of these values: free|busy|dinner|break'
            );
        }

        /** @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            "/users/$id/status",
            "POST",
            ['status' => $status]
        );
    }
public function usersStatus ( $ id , $ status ) { $ statuses = [ "free" , "busy" , "dinner" , "break" ] ; if ( empty ( $ status ) || ! in_array ( $ status , $ statuses ) ) { throw new \ InvalidArgumentException ( 'Parameter `status` must be not empty & must be equal one of these values: free|busy|dinner|break' ) ; } /** @noinspection PhpUndefinedMethodInspection */ return $ this -> client -> makeRequest ( "/users/$id/status" , "POST" , [ 'status' => $ status ] ) ; }
Change user status

@param integer $id     user ID
@param string  $status user status

@return \RetailCrm\Response\ApiResponse
Change user status