code: def webhook_to_object(self, webhook):
          
          if isinstance(webhook, string_type):
              # If still JSON, convert to a Python dict
              webhook = json.dumps(webhook)
  
          # if a flask.Request object, try to convert that to a webhook
          if not isinstance(webhook, dict):
              webhook = get_webhook_from_request(webhook)
  
          try:
              webhook['api_url']
          except KeyError:
              raise InvalidWebhook
  
          payload = self.get(webhook['api_url'])
  
          return payload
docs: Converts JSON sent by an Eventbrite Webhook to the appropriate
          Eventbrite object.
  
          # TODO - Add capability to handle Django request objects