public static void strikeThroughPrice(ApiContext context,String testItemID,double retailPrice,double advPrice){
ReviseFixedPriceItemCall reviseItemCall = new ReviseFixedPriceItemCall(context);
ItemType itemType = new ItemType();
itemType.setItemID(testItemID);//test product
itemType.setCurrency(CurrencyCodeType.AUD);
DiscountPriceInfoType infoType = new DiscountPriceInfoType();
AmountType origin = new AmountType();
origin.setValue(retailPrice);//the value must be more than start price
infoType.setOriginalRetailPrice(origin);
AmountType adv = new AmountType();
adv.setValue(advPrice);
infoType.setMinimumAdvertisedPrice(adv);
infoType.setPricingTreatment(PricingTreatmentCodeType.STP);
itemType.setDiscountPriceInfo(infoType);
reviseItemCall.setItemToBeRevised(itemType);
try {
reviseItemCall.reviseFixedPriceItem();
if (reviseItemCall.getResponseObject().getAck() == AckCodeType.SUCCESS
|| reviseItemCall.getResponseObject().getAck() == AckCodeType.WARNING) {
if (reviseItemCall.getResponseObject().getAck() == AckCodeType.WARNING) {
System.out.println("upload warning...");
System.out.println(reviseItemCall.getApiException().getMessage());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
我怎么能在ebay上生效,我在ebay网站上看不到任何变化,如果我需要设置其他东西来设置?
答案 0 :(得分:0)
最后,我自己解决了这个问题,它可能会生效但不是enter link description here
,它可以在enter link description here生效,代码可以正常运行