// TODO Allow for currency conversion
BigMoney purchaseOrderTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
BigMoney taxTotal = MoneyUtils.parseBitcoin("BTC 0.0000");
for (PurchaseOrderItem purchaseOrderItem: purchaseOrder.getPurchaseOrderItems()) {
purchaseOrderTotal = purchaseOrderTotal.plus(purchaseOrderItem.getPriceSubtotal());
taxTotal = taxTotal.plus(purchaseOrderItem.getTaxSubtotal());
}
// Create top-level resource
Representation purchaseOrderRepresentation = new DefaultRepresentationFactory()
.newRepresentation(basePath)