for (Map.Entry<String,String> param : params.entrySet()) {
request.addQuerystringParameter(param.getKey(), param.getValue());
}
}
service.signRequest(token, request);
Response response = request.send();
if (response.getCode() != 200) {
ApiException exception = unmarshallResponse(response, ApiException.class);
throw new XeroApiException(response.getCode() + " response: Error number "
+ exception.getErrorNumber() + ". " + exception.getMessage());
}
return unmarshallResponse(response, ResponseType.class);
}