try {
if (productStoreId != null && ebayProductId != null) {
ebayProductStoreInventory = delegator.findByPrimaryKey("EbayProductStoreInventory", UtilMisc.toMap("productId", productId, "facilityId", facilityId, "productStoreId", productStoreId));
GetSellingManagerInventoryCall call = new GetSellingManagerInventoryCall(EbayStoreHelper.getApiContext(productStoreId, locale, delegator));
req = new GetSellingManagerInventoryRequestType();
resp = (GetSellingManagerInventoryResponseType) call.execute(req);
if (resp != null && "SUCCESS".equals(resp.getAck().toString())) {
SellingManagerProductType[] sellingManagerProductTypeList = resp.getSellingManagerProduct();
for (SellingManagerProductType sellingManagerProductType : sellingManagerProductTypeList) {
SellingManagerProductDetailsType productDetail = sellingManagerProductType.getSellingManagerProductDetails();
if (String.valueOf(productDetail.getFolderID()).equals(folderId) && String.valueOf(productDetail.getProductID()).equals(ebayProductId) && String.valueOf(productDetail.getCustomLabel()).equals(productId)) {