Package org.multibit.mbm.client.interfaces.rest.api.cart.purchaseorder

Examples of org.multibit.mbm.client.interfaces.rest.api.cart.purchaseorder.BuyerUpdatePurchaseOrderRequest


  public void adminUpdatePurchaseOrderAsHalJson() throws Exception {

    // Starting condition is Belinda requires {book1: 1, book2: 2}
    // Ending condition is Belinda requires {book1: 0, book2: 2, book3: 3}

    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);
View Full Code Here

TOP

Related Classes of org.multibit.mbm.client.interfaces.rest.api.cart.purchaseorder.BuyerUpdatePurchaseOrderRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.