Examples of UpdateCartDto


Examples of org.multibit.mbm.client.interfaces.rest.api.cart.UpdateCartDto

    Preconditions.checkNotNull(clientUser.getSecretKey());

    // TODO Replace "magic string" with auto-discover based on link rel
    String path = String.format("/cart");

    UpdateCartDto updateCartRequest = new UpdateCartDto();
    updateCartRequest.setCartItems(cartItems);

    String hal = HalHmacResourceFactory.INSTANCE
      .newUserResource(locale, path, clientUser)
      .entity(updateCartRequest, MediaType.APPLICATION_JSON_TYPE)
      .put(String.class);
View Full Code Here

Examples of org.multibit.mbm.client.interfaces.rest.api.cart.UpdateCartDto

  public void updateCartAsHalJson() throws Exception {

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

    UpdateCartDto updateCartRequest = new UpdateCartDto();
    // Add a few new items
    updateCartRequest.getCartItems().add(new PublicCartItemDto("0316184136",3));
    // Remove by setting to zero
    updateCartRequest.getCartItems().add(new PublicCartItemDto("0099410672",0));

    String actualResponse = configureAsClient(PublicCartResource.class)
      .accept(HalMediaType.APPLICATION_HAL_JSON)
      .entity(updateCartRequest, MediaType.APPLICATION_JSON_TYPE)
      .put(String.class);
View Full Code Here

Examples of org.multibit.mbm.client.interfaces.rest.api.cart.UpdateCartDto

    Preconditions.checkNotNull(clientUser.getSecretKey());

    // TODO Replace "magic string" with auto-discover based on link rel
    String path = String.format("/cart");

    UpdateCartDto updateCartRequest = new UpdateCartDto();
    updateCartRequest.setCartItems(cartItems);

    String hal = HalHmacResourceFactory.INSTANCE
      .newUserResource(locale, path, clientUser)
      .entity(updateCartRequest, MediaType.APPLICATION_JSON_TYPE)
      .put(String.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.