protected function generatePaginatedResponse(Paginator $paginator, $type, $data, $code = 200, $status = Status::OK, $message = '')
    {
        $returnData = MicroServiceHelper::jsonResponseFormatter($type, $data, $code, $status, $message);

        // Append the pagination response to the data.
        $returnData->pagination = $paginator->preparePaginationResponse()->snakeFormat();

        return response()->json($returnData, $code);
    }