'Retrieve all credit requests for a user.
Arguments:
username (unicode): The username of the user.
Returns: list
Example Usage:
>>> CreditRequest.credit_requests_for_user("bob")
"uuid": "557168d0f7664fe59097106c67c3f847",
"timestamp": 1434631630,
"course_key": "course-v1:HogwartsX+Potions101+1T2015",
"provider": {
"id": "HogwartsX",
"display_name": "Hogwarts School of Witchcraft and Wizardry",
"status": "pending"  # or "approved" or "rejected"'

@classmethod
def credit_requests_for_user(cls, username):

    return [{'uuid': request.uuid, 'timestamp': request.parameters.get('timestamp'), 'course_key': request.course.course_key, 'provider': {'id': request.provider.provider_id, 'display_name': request.provider.display_name}, 'status': request.status} for request in cls.objects.select_related('course', 'provider').filter(username=username)]
