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

Add ListForFulfillmentAsync method to FulfillmentService #826

Conversation

thomotron
Copy link
Contributor

@thomotron thomotron commented Jan 10, 2023

This implements the 'Retrieves fulfillments associated with a fulfillment order' endpoint from the REST API. It allows listing fulfilments from a particular fulfilment order.

This endpoint is available for for API versions 2022-04 and above.

The method arguments are ambiguous with ListAsync, so to distinguish the two this is named similarly to CreateForFulfillmentAsync.

The test requires a fulfilment order ID, so the FulfillmentService instance was roped in to deal with that.

I haven't added an entry to the README for this one but I'm happy to if needed.

Implements the 'Retrieves filfillments associated with a fulfillment order' endpoint documented here: https://shopify.dev/api/admin-rest/latest/resources/fulfillment#get-fulfillment-orders-fulfillment-order-id-fulfillments

The method arguments are ambiguous with `ListAsync`, so to distinguish
the two this is named similarly to `CreateForFulfillmentAsync`.
@thomotron thomotron force-pushed the feature/list-fulfillment-by-fulfillmentorder branch from 4b78097 to 6336fda Compare January 10, 2023 11:28
@nozzlegear
Copy link
Owner

Thanks @thomotron! Do you think this method would make more sense in the FulfillmentOrderService class, or where you have it now in the FulfillmentService? I think if I understand it correctly it makes more sense where you have it now, but maybe it should be renamed something like ListForFulfillmentOrderAsync?

@thomotron
Copy link
Contributor Author

Given it's returning fulfilments I would imagine it would be best under FulfillmentService. That's where it was listed under the API docs too so it supported the case in my head.

And yeah ListForFulfillmentOrderAsync sounds a lot better. I think I was a bit poorly timed with the latest release coming out a day or so after putting this up! I'll switch it over and push it through once I'm off the road for a sec.

@nozzlegear nozzlegear merged commit 1beeffd into nozzlegear:master Feb 18, 2023
@nozzlegear nozzlegear added missing or invalid endpoints Issues dealing with a Shopify API endpoints implemented by ShopifySharp services. and removed new method/endpoint labels Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing or invalid endpoints Issues dealing with a Shopify API endpoints implemented by ShopifySharp services.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants