use of br.com.caelum.vraptor.Consumes in project restfulie-java by caelum.
the class OrderingController method add.
@Post
@Path("/orders")
@Consumes
public void add(Order order) {
int id = 0;
for (Item i : order.getItems()) {
i.use(order, ++id);
}
database.save(order);
routes.uriFor(OrderingController.class).get(order);
status.created(routes.getUri());
}