Examples of CancelItemsRequest


Examples of com.google.checkout.orderprocessing.lineitem.CancelItemsRequest

            if (orderItem != null) {
                MerchantInfo mInfo = getMerchantInfo(delegator, getProductStoreFromOrder(order));
                if (mInfo != null) {
                    String externalId = order.getString("externalId");
                    CancelItemsRequest cir = new CancelItemsRequest(mInfo, externalId, "Item Cancelled", ""); // TODO: configure the reason and comment
                    cir.addItem(orderItem.getString("productId"));
                    try {
                        cir.send();
                    } catch (CheckoutException e) {
                        Debug.logError(e, module);
                    }
                }
            }
View Full Code Here

Examples of com.google.checkout.orderprocessing.lineitem.CancelItemsRequest

            if (orderItem != null) {
                MerchantInfo mInfo = getMerchantInfo(delegator, getProductStoreFromOrder(order));
                if (mInfo != null) {
                    String externalId = order.getString("externalId");
                    CancelItemsRequest cir = new CancelItemsRequest(mInfo, externalId, "Item Cancelled", ""); // TODO: configure the reason and comment
                    cir.addItem(orderItem.getString("productId"));
                    try {
                        cir.send();
                    } catch (CheckoutException e) {
                        Debug.logError(e, module);
                    }
                }
            }
View Full Code Here

Examples of com.google.checkout.orderprocessing.lineitem.CancelItemsRequest

            if (orderItem != null) {
                MerchantInfo mInfo = getMerchantInfo(delegator, getProductStoreFromOrder(order));
                if (mInfo != null) {
                    String externalId = order.getString("externalId");
                    CancelItemsRequest cir = new CancelItemsRequest(mInfo, externalId, "Item Cancelled", ""); // TODO: configure the reason and comment
                    cir.addItem(orderItem.getString("productId"));
                    try {
                        cir.send();
                    } catch (CheckoutException e) {
                        Debug.logError(e, module);
                    }
                }
            }
View Full Code Here

Examples of com.google.checkout.orderprocessing.lineitem.CancelItemsRequest

            if (orderItem != null) {
                MerchantInfo mInfo = getMerchantInfo(delegator, getProductStoreFromOrder(order));
                if (mInfo != null) {
                    String externalId = order.getString("externalId");
                    CancelItemsRequest cir = new CancelItemsRequest(mInfo, externalId, "Item Cancelled", ""); // TODO: configure the reason and comment
                    cir.addItem(orderItem.getString("productId"));
                    try {
                        cir.send();
                    } catch (CheckoutException e) {
                        Debug.logError(e, module);
                    }
                }
            }
View Full Code Here

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

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

  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
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.