code: public void parseObjectAsQueryMap(List<String> params, Object o) throws FoxHttpRequestException {
          try {
              Class clazz = o.getClass();
              HashMap<String, String> paramMap = new HashMap<>();
              for (String param : params) {
                  Field field = clazz.getDeclaredField(param);
                  field.setAccessible(true);
                  String paramName = field.getName();
                  String value = String.valueOf(field.get(o));
                  if (field.get(o) != null && !value.isEmpty()) {
                      paramMap.put(paramName, value);
                  }
              }
              queryMap = paramMap;
          } catch (Exception e) {
              throw new FoxHttpRequestException(e);
          }
      }
docs: Parse an object as query map
  
  @param params list of attribute names which will be included
  @param o      object with the attributes
  @throws FoxHttpRequestException can throw an exception if a field does not exist