Package com.ebay.soap.eBLBaseComponents

Examples of com.ebay.soap.eBLBaseComponents.ItemType


                    };
            GetItemCall getItemCall = new GetItemCall(apiContext);
            getItemCall.setDetailLevel(detailLevel);
            getItemCall.setItemID(itemId);
            getItemCall.getItem();
            ItemType item = getItemCall.getReturnedItem();
            String itemName = item.getTitle();
            GetBestOffersCall getBestOffersCall = new GetBestOffersCall(apiContext);
            getBestOffersCall.setDetailLevel(detailLevel);
            getBestOffersCall.setItemID(itemId);
            getBestOffersCall.setBestOfferID(bestOfferId);
            getBestOffersCall.getBestOffers();
View Full Code Here


            // Display active items in table.
            AbstractTableModel dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return activeItems == null ? 0 : activeItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = activeItems[row];
                    return itemToColumns(item);
                }
            };
            //add To List
            List<Map<Object, Object>> activeList = getDataModelToList(dataModel);
            int activeSize = dataModel.getRowCount();
            ItemType[] tempItems = null;
            if (api.getReturnedScheduledList() != null) tempItems = (api.getReturnedScheduledList().getItemArray()).getItem();
            final ItemType[] scheItems = tempItems;
            // Display Scheduled items in table.
            dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return scheItems == null ? 0 : scheItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = scheItems[row];
                    return schItemToColumns(item);
                }
            };
            // set data
            List<Map<Object, Object>> scheduledList = getDataModelToList(dataModel);
            int scheduledSize = dataModel.getRowCount();
            OrderTransactionType[] tempSoldItems = null;
            if (UtilValidate.isNotEmpty(api.getReturnedSoldList())) tempSoldItems = (api.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();
            // add to list
            List<Map<String, Object>> soldList = FastList.newInstance();
            if (UtilValidate.isNotEmpty(tempSoldItems)) {
                soldList =  EbayStore.getOrderTransactions(tempSoldItems);
            }
            int soldSize = tempSoldItems == null ? 0 : tempSoldItems.length;
            ItemType[] tempUnSoldItems = null;
            if (UtilValidate.isNotEmpty(api.getReturnedUnsoldList())) tempUnSoldItems = (api.getReturnedUnsoldList().getItemArray()).getItem();
            final ItemType[] unSoldItems = tempUnSoldItems;
            // Display unsold items in table.
            dataModel = new AbstractTableModel() {
                public int getColumnCount() { return 0; }
                public int getRowCount() { return unSoldItems == null ? 0 : unSoldItems.length;}
                public Map<String, Object> getValueAt(int row, int col) {
                    ItemType item = unSoldItems[row];
                    return unsoldItemToColumns(item);
                }
            };
            // add to list
            List<Map<Object, Object>> unsoldList = getDataModelToList(dataModel);
View Full Code Here

        return colsList;
    }

    public static Map<String, Object> getTransaction(TransactionType transaction){
        Map<String, Object> cols = FastMap.newInstance();
        ItemType item = transaction.getItem();
        String itemId = null;
        String title = null;
        String SKU = null;
        if (UtilValidate.isNotEmpty(item)) {
            itemId = item.getItemID();
            title = item.getTitle();
            SKU = item.getSKU();
        }
        cols.put("itemId", itemId);
        cols.put("title", title);
        cols.put("SKU", SKU);
        UserType buyer = transaction.getBuyer();
        String user = null;
        if (UtilValidate.isNotEmpty(buyer)) user = buyer.getUserID();
        cols.put("buyer", user);
        cols.put("listingType", item.getListingType().value());
        Date paidTime = null;
        String checkoutStatus = null;
        String eBayPaymentStatus = null;
        String completeStatus = null;
        String buyerPaidStatus = null;
View Full Code Here

            };
            api.setDetailLevel(detailLevels);
            api.getItem(itemID);

            // Set item type.
            ItemType item = api.getReturnedItem();
            String title = item.getTitle();
            String description = item.getDescription();
            String listingType = item.getListingType().value();

            if (item.getPictureDetails() != null) {
                String url[] = item.getPictureDetails().getPictureURL();
                if (url.length != 0) {
                    result.put("pictureURL", url[0]);
                } else {
                    result.put("pictureURL", null);
                }
            } else {
                result.put("pictureURL", null);
            }

            result.put("title", title);
            result.put("description", description);
            AmountType amt = item.getStartPrice();
            result.put("price", amt != null ? (new Double(amt.getValue()).toString()) : "");
            result.put("currencyId", amt.getCurrencyID().toString());
            result.put("listingType", listingType);
        } catch (Exception e) {
            return ServiceUtil.returnError(e.getMessage());
View Full Code Here

            String sandboxEPSURL = "https://api.sandbox.ebay.com/ws/api.dll";
            apiContext.setEpsServerUrl(sandboxEPSURL);
            ReviseItemCall api = new ReviseItemCall(apiContext);

            // Set item type.
            ItemType itemToBeRevised = new ItemType();
            itemToBeRevised.setItemID(itemID);

            if (UtilValidate.isNotEmpty(title)) {
                itemToBeRevised.setTitle(title);
            }

            if (UtilValidate.isNotEmpty(description)) {
                itemToBeRevised.setDescription(description);
            }

            // Set startPrice value.
            AmountType startPrice = new AmountType();
            if (UtilValidate.isNotEmpty(price)) {
                startPrice.setValue(Double.parseDouble(price));
                startPrice.setCurrencyID(CurrencyCodeType.valueOf(currencyId));
                itemToBeRevised.setStartPrice(startPrice);
            }

            // Check upload image file.
            if (UtilValidate.isNotEmpty(imageFileName)) {

                // Upload image to ofbiz path /runtime/tmp .
                ByteBuffer byteWrap = (ByteBuffer) context.get("imageData");
                File file = new File(System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName);
                FileChannel wChannel = new FileOutputStream(file, false).getChannel();
                wChannel.write(byteWrap);
                wChannel.close();

                // Set path file picture to api and set picture details.
                String [] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
                PictureDetailsType pictureDetails = new PictureDetailsType();
                pictureDetails.setGalleryType(GalleryTypeCodeType.GALLERY);
                pictureDetails.setPhotoDisplay(PhotoDisplayCodeType.NONE);
                pictureDetails.setPictureSource(PictureSourceCodeType.EPS);
                itemToBeRevised.setPictureDetails(pictureDetails);

                api.setItemToBeRevised(itemToBeRevised);
                api.uploadPictures(pictureFiles, pictureDetails);
            } else {
                api.setItemToBeRevised(itemToBeRevised);
View Full Code Here

            OrderTransactionType[] tempSoldItems = null;
            if (UtilValidate.isNotEmpty(getMyeBaySelling.getReturnedSoldList())) tempSoldItems  = (getMyeBaySelling.getReturnedSoldList().getOrderTransactionArray()).getOrderTransaction();

            if (UtilValidate.isNotEmpty(tempSoldItems)) {
                for(int i = 0; i < tempSoldItems.length; i++) {
                    ItemType soldItem = tempSoldItems[i].getTransaction().getItem();
                    Map <String, Object> soldItemMap = getClosedItem(soldItem);
                    soldItemMap.put("sellingStatus", "sold");
                    closedItems.add(soldItemMap);
                }
            }
View Full Code Here

            float salesTaxPercent = 0;
            Map<String, Object> itemSold = FastMap.newInstance();
            Map<String, Object> address = FastMap.newInstance();

            if(UtilValidate.isNotEmpty(transaction.getItem())) {
                ItemType item = transaction.getItem();
                itemId = item.getItemID();
                title = item.getTitle();
                SKU = item.getSKU();
                buyItNowPrice = item.getBuyItNowPrice().getValue();
                currency = item.getCurrency().value();

                if(UtilValidate.isNotEmpty(item.getListingDetails())) {
                    viewItemURL = item.getListingDetails().getViewItemURL();
                }
            }

            externalId = transaction.getTransactionID();
            if ("0".equals(externalId)) {
View Full Code Here

                String itemId = null;
                String productId = null;
                double startPrice = 0.0;
                String title = null;
                if (UtilValidate.isNotEmpty(transaction.getItem())) {
                    ItemType item = transaction.getItem();
                    if (UtilValidate.isNotEmpty(item.getSKU())) {
                        productId = item.getSKU();
                    }
                    if (UtilValidate.isNotEmpty(item.getItemID())) {
                        itemId = item.getItemID();
                    }
                    if (UtilValidate.isNotEmpty(item.getStartPrice())) {
                        startPrice = item.getStartPrice().getValue();
                    }
                    if (UtilValidate.isNotEmpty(item.getTitle())) {
                        title = item.getTitle();
                    }
                }
                orderItemCtx.put("orderId", externalOrderId);
                orderItemCtx.put("closedDate", createdDate);
                orderItemCtx.put("goodIdentificationIdValue", itemId);
View Full Code Here

            if (itemListCustomizationType != null) {
                ItemArrayType itemArrayType = itemListCustomizationType.getItemArray();
                int itemArrayTypeSize = itemArrayType.getItemLength();
                for (int i = 0; i < itemArrayTypeSize; i++) {
                    Map<String, Object> entry = FastMap.newInstance();
                    ItemType item = itemArrayType.getItem(i);
                    entry.put("itemId", item.getItemID());
                    entry.put("title", item.getTitle());
                    if (item.getPictureDetails() != null) {
                        String url[] = item.getPictureDetails().getPictureURL();
                        if (url.length != 0) {
                            entry.put("pictureURL", url[0]);
                        } else {
                            entry.put("pictureURL", null);
                        }
                    } else {
                        entry.put("pictureURL", null);
                    }
                    entry.put("timeLeft",item.getTimeLeft());
                    if (item.getBuyItNowPrice() != null) {
                        entry.put("buyItNowPrice", item.getBuyItNowPrice().getValue());
                    } else {
                        entry.put("buyItNowPrice", null);
                    }
                    if (item.getStartPrice() != null) {
                        entry.put("startPrice", item.getStartPrice().getValue());
                    } else {
                        entry.put("startPrice", null);
                    }
                    if (item.getListingDetails() != null) {
                        entry.put("relistedItemId", item.getListingDetails().getRelistedItemID());
                    } else {
                        entry.put("relistedItemId", null);
                    }
                    if (item.getListingType() != null) {
                    entry.put("listingType", item.getListingType().value());
                    } else {
                        entry.put("listingType", null);
                    }
                    activeItems.add(entry);
                }
View Full Code Here

                                      DetailLevelCodeType.RETURN_ALL,
                                      DetailLevelCodeType.ITEM_RETURN_ATTRIBUTES,
                                      DetailLevelCodeType.ITEM_RETURN_DESCRIPTION
                                  };
                            api.setDetailLevel(detailLevels);
                            ItemType itemType = api.getItem();
                            String itemUrl = null;

                            entry.put("SKU", itemType.getSKU());
                            if (UtilValidate.isNotEmpty(itemType.getReservePrice())) reservPrice = itemType.getReservePrice().getValue();
                            entry.put("reservePrice", reservPrice);
                            entry.put("hitCount", itemType.getHitCount() != null ? itemType.getHitCount() : 0);

                            if (itemType.getListingDetails() != null) {
                                itemUrl  = itemType.getListingDetails().getViewItemURL();
                            }
                            entry.put("itemUrl", itemUrl);
                            String itemUrlNatural = null;
                            if (itemType.getListingDetails() != null) {
                                itemUrlNatural  = itemType.getListingDetails().getViewItemURLForNaturalSearch();
                            }
                            entry.put("itemUrlNatural", itemUrlNatural);
                            String unpaidItemStatus = null;
                            if (sellingManagerSoldOrder.getUnpaidItemStatus() != null) {
                                unpaidItemStatus  = sellingManagerSoldOrder.getUnpaidItemStatus().value();
View Full Code Here

TOP

Related Classes of com.ebay.soap.eBLBaseComponents.ItemType

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.