@detail_route()<EOL><INDENT>@permission_required('<STR_LIT>', fn=lambda request, pk: pk)<EOL>def courses(self, request, pk=None):  <DEDENT>
enterprise_customer = self.get_object()<EOL>self.check_object_permissions(request, enterprise_customer)<EOL>self.ensure_data_exists(<EOL>request,<EOL>enterprise_customer.catalog,<EOL>error_message="<STR_LIT>".format(<EOL>enterprise_name=enterprise_customer.name,<EOL>path=request.get_full_path()<EOL>)<EOL>)<EOL>catalog_api = CourseCatalogApiClient(request.user, enterprise_customer.site)<EOL>courses = catalog_api.get_paginated_catalog_courses(enterprise_customer.catalog, request.GET)<EOL>self.ensure_data_exists(<EOL>request,<EOL>courses,<EOL>error_message=(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>enterprise_name=enterprise_customer.name,<EOL>path=request.get_full_path()<EOL>)<EOL>)<EOL>)<EOL>serializer = serializers.EnterpriseCatalogCoursesReadOnlySerializer(courses)<EOL>serializer.update_enterprise_courses(enterprise_customer, catalog_id=enterprise_customer.catalog)<EOL>return get_paginated_response(serializer.data, request)<EOL>
Retrieve the list of courses contained within the catalog linked to this enterprise.

Only courses with active course runs are returned. A course run is considered active if it is currently
open for enrollment, or will open in the future.