Package com.ebay.sdk.call

Examples of com.ebay.sdk.call.VerifyAddSecondChanceItemCall


            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                    DetailLevelCodeType.RETURN_ALL,
                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
                };
            VerifyAddSecondChanceItemCall verify = new VerifyAddSecondChanceItemCall(apiContext);
            verify.setItemID(itemID);
            verify.setDetailLevel(detailLevels);

            verify.setDuration(SecondChanceOfferDurationCodeType.DAYS_1);
            Map<String, Object> serviceMap = FastMap.newInstance();
            serviceMap.put("itemId", itemID);
            serviceMap.put("productStoreId", productStoreId);
            serviceMap.put("locale", locale);
            serviceMap.put("userLogin", userLogin);
            Map<String, Object> bidderTest = UtilGenerics.checkMap(getEbayAllBidders(dctx, serviceMap));
            List<Map<String, String>> test = UtilGenerics.checkList(bidderTest.get("allBidders"));
            if (test.size() != 0) {
                verify.setRecipientBidderUserID(test.get(0).get("userId"));
            }
            result.put("checkVerify", true);
        } catch (Exception e) {
            result.put("checkVerify", checkVerify);
            result.put("errorMessage", "This item ( " + itemID + " ) can not add second chance offer.");
View Full Code Here


                        } else if (priceType.equals("SELLER_COST")) {
                            List<GenericValue> supplierProduct = delegator.findByAnd("SupplierProduct", UtilMisc.toMap("productId", SKUItem), UtilMisc.toList("availableFromDate DESC"));
                            String lastPrice = supplierProduct.get(0).getString("lastPrice");
                            doBasePrice = Double.parseDouble(lastPrice);
                        } else if (priceType.equals("SECOND_CHANCE_PRICE")) {
                            VerifyAddSecondChanceItemCall verifyAddSecondChanceItemCall = new VerifyAddSecondChanceItemCall(apiContext);
                            doBasePrice = verifyAddSecondChanceItemCall.getBuyItNowPrice().getValue();
                        } else if (priceType.equals("STORE_PRICE")) {
                            //ignore
                        }
                        BigDecimal basePrice = new BigDecimal(doBasePrice);
                        BigDecimal percent = new BigDecimal(100);
View Full Code Here

            DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[] {
                    DetailLevelCodeType.RETURN_ALL,
                    DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                    DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
                };
            VerifyAddSecondChanceItemCall verify = new VerifyAddSecondChanceItemCall(apiContext);
            verify.setItemID(itemID);
            verify.setDetailLevel(detailLevels);

            verify.setDuration(SecondChanceOfferDurationCodeType.DAYS_1);
            Map<String, Object> serviceMap = FastMap.newInstance();
            serviceMap.put("itemId", itemID);
            serviceMap.put("productStoreId", productStoreId);
            serviceMap.put("locale", locale);
            serviceMap.put("userLogin", userLogin);
            Map<String, Object> bidderTest = UtilGenerics.checkMap(getEbayAllBidders(dctx, serviceMap));
            List<Map<String, String>> test = UtilGenerics.checkList(bidderTest.get("allBidders"));
            if (test.size() != 0) {
                verify.setRecipientBidderUserID(test.get(0).get("userId"));
            }
            result.put("checkVerify", true);
        } catch (Exception e) {
            result.put("checkVerify", checkVerify);
            result.put("errorMessage", "This item ( " + itemID + " ) can not add second chance offer.");
View Full Code Here

                        } else if (priceType.equals("SELLER_COST")) {
                            List<GenericValue> supplierProduct = delegator.findByAnd("SupplierProduct", UtilMisc.toMap("productId", SKUItem), UtilMisc.toList("availableFromDate DESC"));
                            String lastPrice = supplierProduct.get(0).getString("lastPrice");
                            doBasePrice = Double.parseDouble(lastPrice);
                        } else if (priceType.equals("SECOND_CHANCE_PRICE")) {
                            VerifyAddSecondChanceItemCall verifyAddSecondChanceItemCall = new VerifyAddSecondChanceItemCall(apiContext);
                            doBasePrice = verifyAddSecondChanceItemCall.getBuyItNowPrice().getValue();
                        } else if (priceType.equals("STORE_PRICE")) {
                            //ignore
                        }
                        BigDecimal basePrice = new BigDecimal(doBasePrice);
                        BigDecimal percent = new BigDecimal(100);
View Full Code Here

TOP

Related Classes of com.ebay.sdk.call.VerifyAddSecondChanceItemCall

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.