Comments (7)
Thanks for filing this issue! As we discussed, Shopify has changed the enums it uses for fulfillment statuses. We'll need to add the four new values and mark the old ones as obsolete to be removed in ShopifySharp 3.0.
We just moved into our new house this week, and I still don't have my dev machine set up yet. I'll get this fixed as soon as I do -- hopefully later today, but possibly not until tomorrow or Tuesday.
from shopifysharp.
Not a problem, I'm working around this at the moment while I'm running through testing/finalization of my app. Thought I'd raise the issue here in case other users are seeing the same thing.
Thanks!
from shopifysharp.
Just leaving some notes while I work through these changes.
- There are now three versions of a
FulfillmentStatus
:- On
ShopifyOrder.FulfillmentStatus
andShopifyLineItem.FulfillmentStatus
; values are stillfulfilled
,none
andpartial
. - When filtering the
.ListAsync
result; values are nowshipped
,partial
,unshipped
andany
. - On
ShopifyFulfillment.Status
; values are nowpending
,open
,success
,cancelled
,error
andfailure
.
- On
- ShopifyOrderStatus enum itself hasn't changed and is still used.
I'm guessing ShopifyOrder.FulfillmentStatus
and ShopifyLineItem.FulfillmentStatus
values have actually changed to the new shipped
, partial
, unshipped
and any
, but they just didn't update the docs.
from shopifysharp.
Currently considering a quick 3.0 release (and bump the other 3.0 issues to 4.0) to switch these to strings rather than hardcoded enums, and would then carefully consider removing the other enums in 4.0. Enums are more much convenient than researching the docs to determine which string needs to be used, but they quickly become a hassle and break apps when Shopify makes an unannounced change like this.
If switched to strings, the developer could at least fix their app on their own without waiting for a new ShopifySharp release. Enums would be much better suited to this if Shopify had API versioning a la Stripe, but sadly they don't.
from shopifysharp.
Definitely like the idea, especially if my app hit production and this occurred - would save me being dependant on another person making a fix.
Stupid question, given that I'm not sure how you'd implement this fix, If I'm using the Nuget library instead of the actual source code as a project in my app, would I have the same freedom to amend the strings?
from shopifysharp.
Yep, the strings would be coming from your own code rather than living inside this library. Right now the ShopifyOrderFilter looks something like this:
public class ShopifyOrderFilter : BaseFilter
{
...
public ShopifyFulfillmentStatus FulfillmentStatus { get; set; }
...
}
And it gets used like this:
var filter = new ShopifyOrderFilter()
{
FulfillmentStatus = ShopifyFulfillmentStatus.Fulfilled
}
As it is right now, you don't have any way to fix that FulfillmentStatus when the expected values are changed (unless you're using the source code), because they're hardcoded in the lib. It wants that enum rather than the raw string that gets sent to the Shopify API behind the scenes.
If I switched it to strings, the class would look like this instead:
public class ShopifyOrderFilter : BaseFilter
{
...
public string FulfillmentStatus { get; set; }
...
}
And it would be used like this in your app:
...
var filter = new ShopifyOrderFilter()
{
FulfillmentStatus = "Whatever string you want"
}
Since that string is coming from your own app, you'd be able to quickly update it and change the string rather than wait for a new ShopifySharp release.
from shopifysharp.
Ah! Yes that would work well. I may just extend the ShopifyOrderFilter and add my own enums, at least they're in my control that way and I can amend them faster than a ShopifySharp release.
from shopifysharp.
Related Issues (20)
- Adding delay and time buffer to requests to accommodate API Throttling HOT 1
- How to know the delivery type of a certain Shopify order?
- .Net standard support HOT 19
- Remove fulfillment
- SmartCollectionRules: Add ConditionObjectId Property HOT 2
- Extending Orders for CustomerJourneySummary? HOT 6
- Generic ListFilter issue HOT 1
- "SmartRetryExecutionPolicy" has this been deprecated HOT 1
- FulfillmentService function not working after update to latest version ! HOT 3
- Search product by part of title HOT 4
- Support Storefront-Access-Token for GraphQL HOT 3
- Shipping Line ID (missing property) HOT 2
- Shopify issues HOT 1
- Neither fulfillments nor tracking works in current version
- Listing products in English HOT 9
- Unable to create a new product (deserialization error with object not found) HOT 14
- Split readme documentation into Wiki Docs HOT 2
- How to use an offline token? HOT 2
- How can I get the 'current_quantity' of 'line_items' from Order HOT 3
- Is there any way to use ShopifySharp to create Theme App Extensions HOT 3
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.