public function renderRest(
        $request,
        $data,
        $statusCode = Response::HTTP_OK,
        $headers = []
    ) {
        $requestSerializer = $this->get('ongr_api.request_serializer');

        return new Response(
            $requestSerializer->serializeRequest($request, $data),
            $statusCode,
            array_merge(
                ['Content-Type' => 'application/' . $requestSerializer->checkAcceptHeader($request)],
                $headers
            )
        );
    }