final XmlsonObject root = new XmlsonObject("investment-transaction");
root.addProperty("id", investmentTxaction.getId());
root.addProperty("uri", String.format("/investment-transactions/%d", investmentTxaction.getId()));
root.add(accountPresenter.present(investmentTxaction.getAccount()));
root.addProperty("trade-date", ISO_BASIC.print(investmentTxaction.getTradeDate()));
root.addProperty("memo", investmentTxaction.getMemo());
root.addProperty("units", investmentTxaction.getUnits());
root.add(moneyPresenter.present("unit-price", investmentTxaction.getUnitPrice(), locale));
Money total = investmentTxaction.getTotal();
if (total != null) {
root.add(moneyPresenter.present("total", investmentTxaction.getTotal(), locale));