code: def refund(self, idempotency_key=None, **params):
          
          headers = populate_headers(idempotency_key)
          url = self.instance_url() + '/refund'
          d = self.request('post', url, params, headers)
          return d.addCallback(self.refresh_from).addCallback(lambda _: self)
docs: Return a deferred.