code: public static Collection<Info> getPendingCollaborations(BoxAPIConnection api) {
          URL url = PENDING_COLLABORATIONS_URL.build(api.getBaseURL());
  
          BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
          BoxJSONResponse response = (BoxJSONResponse) request.send();
          JsonObject responseJSON = JsonObject.readFrom(response.getJSON());
  
          int entriesCount = responseJSON.get("total_count").asInt();
          Collection<BoxCollaboration.Info> collaborations = new ArrayList<BoxCollaboration.Info>(entriesCount);
          JsonArray entries = responseJSON.get("entries").asArray();
          for (JsonValue entry : entries) {
              JsonObject entryObject = entry.asObject();
              BoxCollaboration collaboration = new BoxCollaboration(api, entryObject.get("id").asString());
              BoxCollaboration.Info info = collaboration.new Info(entryObject);
              collaborations.add(info);
          }
  
          return collaborations;
      }
docs: Gets all pending collaboration invites for the current user.
  
  @param api the API connection to use.
  @return a collection of pending collaboration infos.