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!
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
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] :
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!).