code: private JSONObject _getByType(String company, String team, String agency, HashMap<String, String> params, Boolean hideFinDetails) throws JSONException {
          String url = "";
          if (team != null) {
              url = "/teams/" + team;
              if (hideFinDetails) {
                  url = url + "/hours";
              }
          } else if (agency != null) {
              url = "/agencies/" + agency;
          }
  
          return oClient.get("/timereports/v1/companies/" + company + url, params);
      }
docs: Generate Time Reports for a Specific Team/Comapny/Agency
  
  @param   company Company ID
  @param   team (Optional) Team ID
  @param   agency (Optional) Agency ID
  @param   params (Optional) Parameters
  @param   hideFinDetails (Optional) Hides all financial details
  @throws	JSONException If error occurred
  @return	{@link JSONObject}