我正在使用.NET Ebay API创建固定价格的商品。但是我在日志中不断收到“必须指定至少一项有效的邮资服务”错误。
请参阅下面的代码,我在其中初始化了商品的运送过程。
item.DispatchTimeMax = 15; // see https://developer.ebay.com/devzone/xml/Docs/Reference/ebay/types/DispatchTimeMaxDetailsType.html
item.ShippingDetails = new ShippingDetailsType();
item.ShippingDetails.ShippingServiceUsed = ShippingServiceCodeType.AU_Registered.ToString();
item.ShippingDetails.ShippingType = ShippingTypeCodeType.Flat;
item.ShippingDetails.DefaultShippingCost = new AmountType();
item.ShippingDetails.DefaultShippingCost.currencyID = CurrencyCodeType.AUD;
item.ShippingDetails.DefaultShippingCost.Value = 10;
item.ShipToLocations = new StringCollection();
item.ShipToLocations.Add("AU"); // see https://developer.ebay.com/devzone/finding/callref/Enums/shipToLocationList.html
item.ShipToLocations.Add("NZ");
但是我打电话给
var fees = new VerifyAddFixedPriceItemCall(apiContext).VerifyAddFixedPriceItem(item);
我收到此错误
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<VerifyAddFixedPriceItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2018-12-14T13:55:16.345Z</Timestamp>
<Ack>Failure</Ack>
<CorrelationID>7f726a53-0d44-43ad-a4db-8cb6e241b0bf</CorrelationID>
<Errors>
<ShortMessage>A postage service is not specified.</ShortMessage>
<LongMessage>At least one valid postage service must be specified.</LongMessage>
<ErrorCode>21915469</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>1085</Version>
<Build>E1085_UNI_API5_18868456_R1</Build>
</VerifyAddFixedPriceItemResponse>
</soapenv:Body>
</soapenv:Envelope>
[12/15/2018 12:55:16 AM, Error]
At least one valid postage service must be specified.
我在做什么错了?