Package com.ebay.sdk.call

Examples of com.ebay.sdk.call.AddSecondChanceItemCall


        String itemID = (String) context.get("itemId");
        String sellerMessage = (String) context.get("sellerMessage");
        String recipientBidderUserID = (String) context.get("recipientBidderUserId");
        try {
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            AddSecondChanceItemCall api = new AddSecondChanceItemCall(apiContext);
            SecondChanceOfferDurationCodeType duration = SecondChanceOfferDurationCodeType.valueOf(durationString);
            api.setDuration(duration);
            AmountType buyItNowPrice = new AmountType();
            if (UtilValidate.isNotEmpty((String) context.get("buyItNowPrice"))) {
                buyItNowPrice.setValue(Double.parseDouble((String) context.get("buyItNowPrice")));
                buyItNowPrice.setCurrencyID(CurrencyCodeType.USD);
                api.setBuyItNowPrice(buyItNowPrice);
            }
            api.setRecipientBidderUserID(recipientBidderUserID);
            api.setItemID(itemID);
            api.setSellerMessage(sellerMessage);
            api.addSecondChanceItem();
        } catch (Exception e) {
            return ServiceUtil.returnError(e.getMessage());
        }
        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "EbayStoreAddSecondChanceOfferSuccessful", locale));
    }
View Full Code Here


        String itemID = (String) context.get("itemId");
        String sellerMessage = (String) context.get("sellerMessage");
        String recipientBidderUserID = (String) context.get("recipientBidderUserId");
        try {
            ApiContext apiContext = EbayStoreHelper.getApiContext(productStoreId, locale, delegator);
            AddSecondChanceItemCall api = new AddSecondChanceItemCall(apiContext);
            SecondChanceOfferDurationCodeType duration = SecondChanceOfferDurationCodeType.valueOf(durationString);
            api.setDuration(duration);
            AmountType buyItNowPrice = new AmountType();
            if (UtilValidate.isNotEmpty((String) context.get("buyItNowPrice"))) {
                buyItNowPrice.setValue(Double.parseDouble((String) context.get("buyItNowPrice")));
                buyItNowPrice.setCurrencyID(CurrencyCodeType.USD);
                api.setBuyItNowPrice(buyItNowPrice);
            }
            api.setRecipientBidderUserID(recipientBidderUserID);
            api.setItemID(itemID);
            api.setSellerMessage(sellerMessage);
            api.addSecondChanceItem();
        } catch (Exception e) {
            return ServiceUtil.returnError(e.getMessage());
        }
        return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "EbayStoreAddSecondChanceOfferSuccessful", locale));
    }
View Full Code Here

TOP

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

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.