code: def from_request(cls, request):
  		
  
  		headers = fix_django_headers(request.META)
  		assert headers
  		try:
  			body = request.body.decode(request.encoding or "utf-8")
  		except Exception:
  			body = "(error decoding body)"
  
  		ip = request.META.get("REMOTE_ADDR")
  		if ip is None:
  			warnings.warn(
  				"Could not determine remote IP (missing REMOTE_ADDR). "
  				"This is likely an issue with your wsgi/server setup."
  			)
  			ip = "0.0.0.0"
  		obj = cls.objects.create(headers=headers, body=body, remote_ip=ip)
  
  		try:
  			obj.valid = obj.validate()
  			if obj.valid:
  				if djstripe_settings.WEBHOOK_EVENT_CALLBACK:
  					# If WEBHOOK_EVENT_CALLBACK, pass it for processing
  					djstripe_settings.WEBHOOK_EVENT_CALLBACK(obj)
  				else:
  					# Process the item (do not save it, it'll get saved below)
  					obj.process(save=False)
  		except Exception as e:
  			max_length = WebhookEventTrigger._meta.get_field("exception").max_length
  			obj.exception = str(e)[:max_length]
  			obj.traceback = format_exc()
  
  			# Send the exception as the webhook_processing_error signal
  			webhook_processing_error.send(
  				sender=WebhookEventTrigger, exception=e, data=getattr(e, "http_body", "")
  			)
  
  			# re-raise the exception so Django sees it
  			raise e
  		finally:
  			obj.save()
  
  		return obj
docs: Create, validate and process a WebhookEventTrigger given a Django
  		request object.
  
  		The process is three-fold:
  		1. Create a WebhookEventTrigger object from a Django request.
  		2. Validate the WebhookEventTrigger as a Stripe event using the API.
  		3. If valid, process it into an Event object (and child resource).