def to_representation(self, instance):
request = self.context['<STR_LIT>']<EOL>enterprise_customer = instance.enterprise_customer<EOL>representation = super(EnterpriseCustomerCatalogDetailSerializer, self).to_representation(instance)<EOL>paginated_content = instance.get_paginated_content(request.GET)<EOL>count = paginated_content['<STR_LIT:count>']<EOL>search_results = paginated_content['<STR_LIT>']<EOL>for item in search_results:<EOL><INDENT>content_type = item['<STR_LIT>']<EOL>marketing_url = item.get('<STR_LIT>')<EOL>if marketing_url:<EOL><INDENT>item['<STR_LIT>'] = utils.update_query_parameters(<EOL>marketing_url, utils.get_enterprise_utm_context(enterprise_customer)<EOL>)<EOL><DEDENT>if content_type == '<STR_LIT>':<EOL><INDENT>item['<STR_LIT>'] = instance.get_course_enrollment_url(item['<STR_LIT:key>'])<EOL><DEDENT>if content_type == '<STR_LIT>':<EOL><INDENT>item['<STR_LIT>'] = instance.get_course_run_enrollment_url(item['<STR_LIT:key>'])<EOL><DEDENT>if content_type == '<STR_LIT>':<EOL><INDENT>item['<STR_LIT>'] = instance.get_program_enrollment_url(item['<STR_LIT>'])<EOL><DEDENT><DEDENT>previous_url = None<EOL>next_url = None<EOL>page = int(request.GET.get('<STR_LIT>', '<STR_LIT:1>'))<EOL>request_uri = request.build_absolute_uri()<EOL>if paginated_content['<STR_LIT>']:<EOL><INDENT>previous_url = utils.update_query_parameters(request_uri, {'<STR_LIT>': page - <NUM_LIT:1>})<EOL><DEDENT>if paginated_content['<STR_LIT>']:<EOL><INDENT>next_url = utils.update_query_parameters(request_uri, {'<STR_LIT>': page + <NUM_LIT:1>})<EOL><DEDENT>representation['<STR_LIT:count>'] = count<EOL>representation['<STR_LIT>'] = previous_url<EOL>representation['<STR_LIT>'] = next_url<EOL>representation['<STR_LIT>'] = search_results<EOL>return representation<EOL>
Serialize the EnterpriseCustomerCatalog object.

Arguments:
    instance (EnterpriseCustomerCatalog): The EnterpriseCustomerCatalog to serialize.

Returns:
    dict: The EnterpriseCustomerCatalog converted to a dict.