Updates the resource. This will trigger an api PATCH request.
        :param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
        :raises ResourceError: if the resource does not have an id (does not exist yet)
        :returns: the resource itself

def update(self, parent=None):
        """
        Updates the resource. This will trigger an api PATCH request.
        :param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
        :raises ResourceError: if the resource does not have an id (does not exist yet)
        :returns: the resource itself
        """
        if not self.id:
            raise self.ResourceError('cannot update a resource without an ID')
        data = self.__class__._process_request(
            connection.patch,
            parent=parent,
            id=self.id,
            payload=self.payload()
        )
        return self._reload(data)