Home
Find the answer to your question
How can I remove the InternationalShippingService Options using the .NET SDK?
To remove all the InternationalShippingServiceOption tags for an Item, you need to send in all the domestic shipping services and specify an empty tag for InternationalShippingServiceOption. Here is a sample C# code using the .NET SDK to make a call to ReviseItem for removing just the International ShippingServiceOption (s).
using System;
using eBay.Service.Call;
using eBay.Service.Core.Sdk;
using eBay.Service.Util;
using eBay.Service.Core.Soap;
namespace SDK3Examples
{
opt[1] = new ShippingServiceOptionsType();
opt[1].ShippingServiceCost = new AmountType();
opt[1].ShippingServiceCost.currencyID = CurrencyCodeType.USD;
opt[1].ShippingServiceCost.Value = 7.0;
opt[1].ShippingServiceAdditionalCost = new AmountType();
opt[1].ShippingServiceAdditionalCost.currencyID = CurrencyCodeType.USD;
opt[1].ShippingServiceAdditionalCost.Value = 3;
opt[1].ShippingService = "USPSPriority";
opt[1].ShippingServicePriority = 2;
item.ShippingDetails.ShippingServiceOptions.Add(opt[1]);
//Specify an empty InternationShippingServiceOption object
item.ShippingDetails.InternationalShippingServiceOption = new InternationalShippingServiceOptionsTypeCollection();
InternationalShippingServiceOptionsType Iopt = new InternationalShippingServiceOptionsType();
Iopt = new InternationalShippingServiceOptionsType();
item.ShippingDetails.InternationalShippingServiceOption.Add(Iopt);
FeeTypeCollection fees = call.ReviseItem(item, null);
}
public ApiContext GetContext()
{
ApiContext context = new ApiContext();
// Set the URL
context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi";
// Set logging
context.ApiLogManager = newApiLogManager();
context.ApiLogManager.ApiLoggerList.Add(new eBay.Service.Util.FileLogger("Messages.log", true, true, true));
context.ApiLogManager.EnableLogging = true;
// Set the version
context.Version = "1131";
return context;
}