Comments (17)
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.
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.
TODO
- Convert the
ShopifyFulfillment.Status
property type to a nullable enum.
from shopifysharp.
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.
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.
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.
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.
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.
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.
I am not able to use enum ShopifyChargeStatus
from shopifysharp.
@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.
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.
@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.
@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.
from shopifysharp.
@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.
from shopifysharp.
Related Issues (20)
- Add .editorconfig for project
- Add Github Action to auto-update dependencies each week
- GraphService errors should throw a ShopifyGraphResultException HOT 6
- .NET Framework unit tests are broken and stuck in a loop HOT 1
- Add a timeout to Github pipeline tests
- (GraphService) How to Deserialize JSONL Content from BulkOperation to .NET Classes HOT 2
- Remove incorrect `IMetafieldService.ListAsync(MetafieldFilter filter = null)` method
- Merge fulfillment orders? HOT 1
- Add product into Exising Channels HOT 4
- Unable to add multiple images to product using ShopifySharp HOT 7
- Product Service ListAsync - Not Paging HOT 2
- Deprecated property delivery_category is being used HOT 2
- How to list order by product ? HOT 3
- API get checkout by token not working HOT 6
- Internal application stopped working HOT 2
- Order not coming in api HOT 2
- Adding Multiple Tracking Numbers with Fulfillment.TrackingNumbers HOT 3
- Add read_returns and write_returns to access scopes enums HOT 2
- Customer is not returned by graphql mutation HOT 2
- LeakyBucket does not release the Semaphore if a request fails or the task is canceled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopifysharp.