Giter VIP home page Giter VIP logo

Comments (17)

nozzlegear avatar nozzlegear commented on July 22, 2024 1

Hey @shahrukh192, most enums were removed in 3.0. You can read the reasoning for that right here, but to summarize: Shopify devs sometimes change enums and they become invalid, or they add enums and don't document the changes. Instead of hardcoding the values, all enums were converted to plain old strings so that the developer can quickly update their own app to whatever value they need instead of waiting for ShopifySharp to put out a new update with the new enum values.

For ShopifyChargeStatus, you'll want to use one of these strings: pending, accepted, active, cancelled, declined or expired. I've got an update for the book coming within the next few days that will also fix any references to the enums that were removed.

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

Rather than making each enum implement an "Unknown" value, it's probably better to just make them all nullable. Checking if an enum is null takes the same effort as checking if it's "unknown". To avoid breaking changes, we'll have to save fixing this for existing enums until a v 2.0 release.

Enums created from now on, though, will be nullable and make use of a dedicated NullableEnumConverter<T>.

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

TODO

  • Convert the ShopifyFulfillment.Status property type to a nullable enum.

from shopifysharp.

mdossantos avatar mdossantos commented on July 22, 2024

Hi team, just curious if this fix will be available soon? We are currently having issues with it and hoping that it will be resolved soon before we jump to another package or workaround. thanks

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

Hey @mdossantos, I'm looking at starting this soon but can't make any promises on exactly when it would be ready. Could you list which enums are specifically giving you trouble? I'd be happy to push a small update to fix it.

from shopifysharp.

mdossantos avatar mdossantos commented on July 22, 2024

Hi Joshua,

Thanks for the quick reply. The enum we are having trouble with is
ShopifySharp.Enums.ShopifyProductFulfillmentService.
We get error converting the type "xxxxFulfillmentServiceNamexxxx" to
ShopifySharp.Enums.ShopifyProductFulfillmentService.
We get the error anytime our products are from a different fulfillment
service from shopify that isn't 'Manual'. This is when grabbing the list of
products from shopify.
Thanks
On Mar 23, 2016 5:54 PM, "Joshua Harms" [email protected] wrote:

Hey @mdossantos https://github.com/mdossantos, I'm looking at starting
this soon but can't make any promises on exactly when it would be ready.
Could you list which enums are specifically giving you trouble? I'd be
happy to push a small update to fix it.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10 (comment)

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

Thanks! I've just opened up an issue (#41) to track this. The fix will be switching ShopifyProductFulfillmentService to a string because there's no way to track all of the custom fulfillment services that apps and developers can create. I'll try to get it in this weekend if my schedule cooperates.

from shopifysharp.

mdossantos avatar mdossantos commented on July 22, 2024

Thank you
On Mar 23, 2016 6:46 PM, "Joshua Harms" [email protected] wrote:

Thanks! I've just opened up an issue (#41
#41) to track this.
The fix will be switching ShopifyProductFulfillmentService to a string
because there's no way to track all of the custom fulfillment services that
apps and developers can create. I'll try to get it in this weekend if my
schedule cooperates.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10 (comment)

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

Hey @mdossantos, just a quick update on this. I've just created a PR for v2.0.0 of ShopifySharp which contains the fix for the error you've found. I'll be working on v2 over the next few days and hope to get it merged by this time next week.

from shopifysharp.

shahrukh192 avatar shahrukh192 commented on July 22, 2024

I am not able to use enum ShopifyChargeStatus

from shopifysharp.

L0G1C avatar L0G1C commented on July 22, 2024

@nozzlegear Just reading this here after getting stuck on this exact thing for a moment when going through your book! Thanks for the update. BTW love the book and the ShopifySharp solution in general. really clean and easy to work with, our team is loving it.

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

Thanks @L0G1C, glad to hear you like it! The next update to the book will use v4 of ShopifySharp, so there won't be any more outdated enum usage.

from shopifysharp.

L0G1C avatar L0G1C commented on July 22, 2024

@nozzlegear Great to hear. Doing this app for work actually has me thinking about a great App idea I want to make on my own, so I may pick up my own copy once the next update when its available. Curious, if I purchase the handbook now,, is the update free, or should I wait until the update?

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

@L0G1C The update will be free for anybody that's already purchased the book. You'll get an email with links to the updated version as soon as it's released.

from shopifysharp.

ishahrier avatar ishahrier commented on July 22, 2024

from shopifysharp.

nozzlegear avatar nozzlegear commented on July 22, 2024

@ishahrier Hey, the update hasn't been released yet, I'm still working on it. You'll get it for free at the email address you used to purchase the current version.

from shopifysharp.

ishahrier avatar ishahrier commented on July 22, 2024

from shopifysharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.