public function updateRepositoryPermission(RepositoryPermission $permission)
    {
        $url = $this->service_url . '/permissions' . $permission->uri;
        $url .= ";recipient=" . str_replace('/', '%2F', $permission->recipient);
        $data = $this->service->prepAndSend($url, array(200), 'PUT', json_encode($permission), true);
        return RepositoryPermission::createFromJSON($data);
    }