def METHOD_NAME(
    self,
    request: Request,
    resource_type: str = "orders",
    export_format: str = "csv",
    **kwargs,
):
    try:
        """Generate a file to export."""
        query_params = request.GET
        self.attachment = "download" in query_params
        self.resource = resource_type
        self.format = export_format
        self.dataset = resources.export(
            resource_type, query_params, context=request
        )
        response = super(DataExport, self).METHOD_NAME(request, **kwargs)
        response["X-Frame-Options"] = "ALLOWALL"
        return response
    except Exception as e:
        return JsonResponse(
            dict(errors=[{"message": str(e)}]),
            status=status.HTTP_409_CONFLICT,
        )