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)
- 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
- Missing Alt attribute in ArticleImage class
- HttpResponseMessage Response in RequestResult marked as Obsolete HOT 5
- Add support for IAsyncEnumerable on every service that supports ListAsync
- Add support for validating the timestamp with a default timeout period in `ShopifyRequestValidationUtility`
- IsValidShopDomainAsync should check if shopDomain is a valid uri before building the shop domain uri HOT 2
- Support for Meta Objects? HOT 6
- RefundLineItem SubTotalTaxSet - copypaste issue? HOT 1
- Feature: Generate methods based on .graphql files HOT 2
- OrderRiskService Deprecated / Obsolete HOT 2
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.