@nylas_excepted
    def _update_resource(self, cls, id, data, **kwargs):
        name = cls.collection_name
        url = "{}/{}/{}".format(self.api_server, name, id)

        if len(kwargs.keys()) > 0:
            url = "{}?{}".format(url, urlencode(kwargs))

        session = self._get_http_session(cls.api_root)

        response = session.put(url, json=data)

        result = _validate(response).json()
        return cls.create(self, **result)
dataset/ETHPy150Open nylas/nylas-python/nylas/client/client.py/APIClient._update_resource/original