I am pulling all items that I have won, but somehow the ShippingDetais are always empty; how do I populate the shipping (the tracking number) when it is present and provided by the seller?
My code:
ApiContext oContext = new ApiContext();
oContext.ApiCredential.ApiAccount.Developer = "";
oContext.ApiCredential.ApiAccount.Application = "";
oContext.ApiCredential.ApiAccount.Certificate = "";
oContext.ApiCredential.eBayToken = "";
oContext.SoapApiServerUrl = "https://api.ebay.com/wsapi";
oContext.Site = eBay.Service.Core.Soap.SiteCodeType.US;
ApiLogManager oLogManager = new ApiLogManager();
oLogManager.ApiLoggerList.Add(new eBay.Service.Util.FileLogger("GetMyeBayBuyingSDK.log", true, true, true));
oLogManager.EnableLogging = true;
oContext.ApiLogManager = oLogManager;
GetMyeBayBuyingCall oGetMyeBayBuyingCall = new GetMyeBayBuyingCall(oContext);
oGetMyeBayBuyingCall.Version = "447";
oGetMyeBayBuyingCall.Site = oContext.Site;
oGetMyeBayBuyingCall.EnableCompression = true;
ItemListCustomizationType oWonList = new ItemListCustomizationType();
oWonList.DurationInDays = 60;
oWonList.DurationInDaysSpecified = true;
oWonList.Sort = ItemSortTypeCodeType.StartPrice;
oWonList.SortSpecified = true;
PaginationType oPagination = new PaginationType();
oPagination.EntriesPerPage = 200;
oPagination.EntriesPerPageSpecified = true;
oPagination.PageNumber = 1;
oPagination.PageNumberSpecified = true;
oWonList.Pagination = oPagination;
oGetMyeBayBuyingCall.WonList = oWonList;
try
{
oGetMyeBayBuyingCall.GetMyeBayBuying();
OrderTransactionTypeCollection oOrderTransactionCollection = oGetMyeBayBuyingCall.WonListReturn.OrderTransactionArray;
foreach (OrderTransactionType oOrderTransaction in oOrderTransactionCollection)
{
if (null != oOrderTransaction.Transaction)
{
if (oOrderTransaction.Transaction.ShippingDetails != null && oOrderTransaction.Transaction.ShippingDetails.ShipmentTrackingDetails != null)
{
// MY CODE HERE
}}
}
}