BuyerUpdatePurchaseOrderRequest updatePurchaseOrderRequest = new BuyerUpdatePurchaseOrderRequest();
// TODO Consider providing ID (sequences etc)
//updatePurchaseOrderRequest.setId(1L);
// Add a few new items
updatePurchaseOrderRequest.getPurchaseOrderItems().add(new BuyerPurchaseOrderItem("0316184136", 3, "1.1", "GBP"));
// Remove by setting to zero
updatePurchaseOrderRequest.getPurchaseOrderItems().add(new BuyerPurchaseOrderItem("0099410672", 0, "2.2", "GBP"));
String actualResponse = configureAsClient("/admin/purchase-orders/1")
.accept(HalMediaType.APPLICATION_HAL_JSON)
.entity(updatePurchaseOrderRequest, MediaType.APPLICATION_JSON_TYPE)
.put(String.class);