0
我正在使用易趣交易API獲取用戶的庫存。易趣交易API - 郵資在哪裏?
我使用GetSellerList()粒度=罰款,然後我遍歷每個ItemType的ItemTypeCollection。 我需要的所有信息都是郵資除外。
這些產品的郵資價格爲7.50英鎊,但這在ItemType中無處可用?
任何想法如何找到/得到這個?
我正在使用易趣交易API獲取用戶的庫存。易趣交易API - 郵資在哪裏?
我使用GetSellerList()粒度=罰款,然後我遍歷每個ItemType的ItemTypeCollection。 我需要的所有信息都是郵資除外。
這些產品的郵資價格爲7.50英鎊,但這在ItemType中無處可用?
任何想法如何找到/得到這個?
嗯,我發現它潛伏的方式在內心深處的位置:
myItemTypeCollection[x].ShippingDetails.ShippingServiceOptions[x].ShippingServiceCost.Value
請在這裏看到的堅果和如何從易趣賣家名單螺栓:http://developer.ebay.com/devzone/xml/docs/reference/ebay/GetSellerList.html
你叫GetSellerList後下面的代碼應該可以獲得郵費,我只在此選擇RoyalMail送貨服務,但如果您檢查該物品,您將看到其他選項:
//get the seller list from EBay
ItemTypeCollection itemLists = apiGetSellerList.GetSellerList();
//loop through the itemTypeCollection to get each item
foreach (ItemType oItem in itemLists)
{
foreach (ShippingServiceOptionsType shipType in oItem.ShippingDetails.ShippingServiceOptions)
{
////loop through the various shipping options
switch (shipType.ShippingService)
{
case "UK_RoyalMailSecondClassStandard":
//this is the standard postage so add this
addProduct.DeliveryStandard = (decimal)shipType.ShippingServiceCost.Value;
break;
default:
break;
}
}
}