Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion to .net standard #4

Open
LunicLynx opened this issue Apr 20, 2024 · 6 comments
Open

Conversion to .net standard #4

LunicLynx opened this issue Apr 20, 2024 · 6 comments

Comments

@LunicLynx
Copy link
Contributor

Hello,

is a conversion to .NET standard planned or in the works?

Would a PR accepted for that?

@LunicLynx
Copy link
Contributor Author

LunicLynx commented Apr 23, 2024

I have a version ready for net standard:
https://www.nuget.org/packages/eBay.Service.Fork/4.0.1-pre

It would probably be best if it is supplied by you instead.

@romtrix
Copy link

romtrix commented Nov 12, 2024

I have a version ready for net standard: https://www.nuget.org/packages/eBay.Service.Fork/4.0.1-pre
@LunicLynx

If I set "DetailLevel" to "ItemReturnDescription": Returns the description, plus the ListingDesigner node and some additional information if applicable.
Then when some item has "ListingDesigner" included in response, like
<ListingDesigner> <LayoutID>10000</LayoutID><ThemeID>10</ThemeID> </ListingDesigner>
Allmost all fields in the item response are null, Title for example - failed to deserialize.
Any chance you can fix it our upload the source code?

@LunicLynx
Copy link
Contributor Author

@lovetofail
I will try to do both. Just on the wrong machine right now.

How critical is this for you?

@romtrix
Copy link

romtrix commented Nov 12, 2024

How critical is this for you?
Not that critical, I will use xmlserializer for now. But would use it if it was available. Thank you for your work.

@LunicLynx
Copy link
Contributor Author

I updated my fork. Can you create a minimal example, how I can test your issue?

Beware, I went very berserk on the source to make this work. I had mainly my own usecase in focus, as I wasn't sure that my effort will have any value for anyone else as this repository seems pretty dead.

@romtrix
Copy link

romtrix commented Nov 14, 2024

Deserialization fails because "ListingDesigner" contained in ebay response when DetailLevelCodeType.ReturnAll or DetailLevelCodeType.ReturnDescription.
IntangibleItem - also causes issue for some reason.

Appreciate your help, I would never converted this to .NET

*Update: When IncludePrefilledItemInformation is present in ProductListingDetails it makes ProductListingDetails fields default too.
PostCheckoutExperienceEnabled also an issue.

Code sample

private static void DeserializeFail(string apiToken)
{

//fails because "ListingDesigner" contained in ebay response.
var failingCodeType = new DetailLevelCodeType[] { DetailLevelCodeType.ReturnAll };
var workingCodeType = new DetailLevelCodeType[] { DetailLevelCodeType.ItemReturnAttributes };
var call = new GetItemCall();
call.DetailLevelList = failingCodeType;
call.ApiContext = new ApiContext() { ApiCredential = new ApiCredential(apiToken) };
var itemType = call.GetItem("205060707413");
if (string.IsNullOrEmpty(itemType.Title))
    Console.WriteLine("Fail");
else
    Console.WriteLine("Success");
/*
 <IntangibleItem> - causes another issue 
 Everything below <IntangibleItem> fails to deserialize - ex. ReturnPolice is null and ConditionID = 0

 <IntangibleItem>false</IntangibleItem>
   <ReturnPolicy>
    <ReturnsWithinOption>Days_60</ReturnsWithinOption>
    <ReturnsWithin>60 Tage</ReturnsWithin>
    <ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
    <ReturnsAccepted>Verbraucher haben das Recht, den Artikel unter den angegebenen Bedingungen zurückzugeben.</ReturnsAccepted>
    <ShippingCostPaidByOption>Seller</ShippingCostPaidByOption>
    <ShippingCostPaidBy>Verkäufer trägt die Kosten der Rücksendung der Waren</ShippingCostPaidBy>
    <InternationalReturnsAcceptedOption>ReturnsAccepted</InternationalReturnsAcceptedOption>
    <InternationalReturnsWithinOption>Days_60</InternationalReturnsWithinOption>
    <InternationalShippingCostPaidByOption>Seller</InternationalShippingCostPaidByOption>
   </ReturnPolicy>
   <InventoryTrackingMethod>SKU</InventoryTrackingMethod>
   <ConditionID>3000</ConditionID>
   <ConditionDisplayName>Gebraucht</ConditionDisplayName>
   <PostCheckoutExperienceEnabled>false</PostCheckoutExperienceEnabled>
   <ShippingPackageDetails>
    <ShippingIrregular>false</ShippingIrregular>
    <ShippingPackage>None</ShippingPackage>
    <WeightMajor measurementSystem="Metric" unit="kg">0</WeightMajor>
    <WeightMinor measurementSystem="Metric" unit="gm">0</WeightMinor>
   </ShippingPackageDetails>
   <HideFromSearch>false</HideFromSearch>
   <eBayPlus>false</eBayPlus>
   <eBayPlusEligible>false</eBayPlusEligible>
   <IsSecureDescription>true</IsSecureDescription>
 */

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants