public function setPermissions($permissions , $password)
    {
        if ( ! is_array($permissions) || ! is_string($password) || $password === '' ) {
            throw new InvalidException('Permissions and password must be respectively an array and a string');
        }
        try {
            $this->getSoapClient()->SetDocumentAccessPermissions(array(
                'permissions' => $permissions ,
                'password'    => $password ,
            ));

            return $this;
        } catch ( SoapException $ex ) {
            throw new PermissionsException('Error while setting the list of permissions and master password for the document' , $ex);
        }
    }