code: def make_request(
      ins, method, url, stripe_account=None, params=None, headers=None, **kwargs
  ):
      
      if txstripe.api_key is None:
          raise error.AuthenticationError(
              'No API key provided. (HINT: set your API key using '
              '"stripe.api_key = <API-KEY>"). You can generate API keys '
              'from the Stripe web interface.  See https://stripe.com/api '
              'for details, or email support@stripe.com if you have any '
              'questions.')
  
      abs_url = '{}{}'.format(txstripe.api_base, url)
  
      ua = {
          'lang': 'python',
          'publisher': 'lextoumbourou',
          'httplib': 'Twisted',
      }
  
      headers = headers or {}
      headers.update({
          'X-Stripe-Client-User-Agent': util.json.dumps(ua),
          'User-Agent': 'txstripe',
          'Authorization': 'Bearer %s' % (txstripe.api_key,)
      })
  
      if stripe_account:
          headers['Stripe-Account'] = stripe_account
  
      if txstripe.api_version is not None:
          headers['Stripe-Version'] = txstripe.api_version
  
      if method == 'get' or method == 'delete':
          data = None
      elif method == 'post':
          data = {k: v for (k, v) in _api_encode(params)}
          params = None
      else:
          raise error.APIConnectionError(
              'Unrecognized HTTP method %r.  This may indicate a bug in the '
              'Stripe bindings.' % (method,))
  
      resp = yield treq.request(
          method, abs_url, params=params, data=data, headers=headers, **kwargs)
  
      if resp.code >= 400:
          yield util.handle_api_error(resp)
          return
  
      body = yield resp.json()
  
      defer.returnValue(
          convert_to_stripe_object(
              body, txstripe.api_key, stripe_account))
docs: Return a deferred or handle error.
  
      For overriding in various classes.