Package com.google.checkout.sdk.domain

Examples of com.google.checkout.sdk.domain.CancelItemsRequest


    // cancels just the items
    @Override
    public void cancelItems(
        String reason) throws CheckoutException {
      CancelItemsRequest cancelItems = new CancelItemsRequest();
      cancelItems.setGoogleOrderNumber(commandPoster.googleOrderNumber);
      CancelItemsRequest.ItemIds idsObject = new CancelItemsRequest.ItemIds();
      idsObject.getItemId().addAll(itemIds);
      cancelItems.setItemIds(idsObject);
      cancelItems.setReason(reason);
      cancelItems.setSendEmail(commandPoster.sendEmails);
      postCommand(cancelItems.toJAXB());
    }
View Full Code Here


  public void testNoEmailCancelItems() {
    OrderCommands tester = new CommandPosterImplTester(
        apiContext(), "googleOrderNumber", false, commands);
    tester.itemCommands("itemId").cancelItems("because");
    assertEquals(1, commands.size());
    CancelItemsRequest cancelItemsRequest =
      (CancelItemsRequest) commands.get(0).getValue();
    assertEquals(Boolean.FALSE, cancelItemsRequest.isSendEmail());
    assertEquals("googleOrderNumber", cancelItemsRequest.getGoogleOrderNumber());
    assertEquals("because", cancelItemsRequest.getReason());
    assertEquals(1, cancelItemsRequest.getItemIds().getItemId().size());
    assertEquals("itemId", cancelItemsRequest.getItemIds().getItemId().get(0).getMerchantItemId());
  }
View Full Code Here

TOP

Related Classes of com.google.checkout.sdk.domain.CancelItemsRequest

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.