question

nathaniemcva-0 avatar image
0 Likes"
nathaniemcva-0 asked

Finding the right using statement for eBay types

First time posting, as I can typically find abundant information on my questions online. I'm working on developing some semi-autonomous listing capabilities and need to populate all of the various ReturnPolicy / ShippingDetails fields in an ItemType object. My issue is that the eBay API indicates there are Enumerations available in the SDK for populating these fields, but I have been unable to track down which using statement to add into code to make these enumerations accessible. Beyond the question of "what using statement do I add to gain access to the 'ReturnsAcceptedOptionsCodeType' enumeration", I would like to figure out how to answer this for myself in the future. I have spent about an hour googling, reviewing API documentation, checking the Enumeration Type List, and adding in random using statements in to try and get VS to recognize the enumeration. I am guessing I am just missing a page somewhere or another that associates enumerations to a particular dll / using statement. Any pointers on finding this information on my own in the future to avoid having to post these questions would be greatly appreciated. For those interested in specifics of my current problem: - Environment: Visual Studio 2015 - SDK Version: v939 - Ebay Specific References: eBay.Service.dll and eBay.Service.SDK.Attribute - Current Using Statements: eBay.Service.Call eBay.Service.Core.Sdk eBay.Service.Core.Soap (for this particular class) My code listing is honestly pretty irrelevant to the question but suppose the following: ItemType newItem = new ItemType(); newItem.ReturnPolicy = new ReturnPolicyType(); newItem.ReturnPolicy.ReturnsAcceptedOption = My Expectation is that the last line of the above code snippet would be as follows with the proper using statement: newItem.ReturnPolicy.ReturnsAcceptedOption = ReturnsAcceptedOptionsCodeType.ReturnsNotAccepted If you've made it this far, thanks for taking the time!
.NETc#sdkenumreturnsacceptedoptionscodetype
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

devanathan.developersupport@ebay.com avatar image
0 Likes"
devanathan.developersupport@ebay.com answered
Hello nathaniemcva-0, ReturnsAcceptedOption is not a Enumerations field. It is of type string. item.ReturnPolicy.ReturnsAccepted = "ReturnsAccepted"; // Set ReturnPolicy item.ReturnPolicy = new ReturnPolicyType(); item.ReturnPolicy.ReturnsAccepted = "ReturnsAccepted"; item.ReturnPolicy.ReturnsAcceptedOption = "ReturnsAccepted"; item.ReturnPolicy.ReturnsWithinOption = "Days_14"; Thanks Devanathan eBay Developer technical Support
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nathaniemcva-0 avatar image
0 Likes"
nathaniemcva-0 answered
Unfortunately, eBay tends to utilize the name 'Enumeration' in a flexible way, and it does not necessarily correspond to an element which translates to an integer (traditional definition of an enumeration). For example: [ReturnsAcceptedOptionCodeType][1] [1]: https://developer.ebay.com/devzone/xml/docs/Reference/ebay/types/ReturnsAcceptedOptionsCodeType.html If you boil my original question down: 1. In C# .Net SDK Version 939, how do you include the above listed class. Specifically, what using statement do you use. 2. Where do you find (in documentation) what includes the above listed class, so that I don't need to go to forums every time I have issues including the appropriate 'CodeType' class (of which there are numerous examples, and they are apparently not all in the same includes since I can use about half of them currently, and the other half I manually type a string which is a terrible method for long term software support. Thanks for the response. I don't typically have to articulate my software issues so my apologies if my language is confusing / not accurate (Enumeration for instance!).
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

[ReturnPolicyType][1] [1]: http://developer.ebay.com/devzone/xml/docs/reference/ebay/types/ReturnPolicyType.html#ReturnsAccepted There is a statement in the ReturnsAcceptedOption block in the above link that indicates to me that it would be a type, but I could be wrong. In addition, there are numerous examples in building an ItemType object where similarly named classes are used in the same fashion. - ListingTypeCodeType - CurrencyCodeType - BuyerPaymentMethodCodeType - HitCounterCodeType All of the above function as follows newItem.Currency = CurrencyCodeType.USD;
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.