added requestNext function to handle api call for next class booking