code: public Request<List<Enrollment>> getEnrollments(String userId) {
          Asserts.assertNotNull(userId, "user id");
  
          String url = baseUrl
                  .newBuilder()
                  .addPathSegments("api/v2/users")
                  .addPathSegment(userId)
                  .addPathSegment("enrollments")
                  .build()
                  .toString();
  
          CustomRequest<List<Enrollment>> request = new CustomRequest<>(client, url, "GET", new TypeReference<List<Enrollment>>() {
          });
          request.addHeader("Authorization", "Bearer " + apiToken);
          return request;
      }
docs: Request all the Guardian Enrollments for a given User.
  A token with scope read:users is needed.
  See https://auth0.com/docs/api/management/v2#!/Users/get_enrollments
  
  @param userId the id of the user to retrieve.
  @return a Request to execute.