-
Notifications
You must be signed in to change notification settings - Fork 474
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 API support for scheduled fulfillment orders #797
Conversation
Can you add an update to the |
f52e174
to
3df3fe8
Compare
@@ -51,6 +51,19 @@ def cancel | |||
keyed_fulfillment_orders | |||
end | |||
|
|||
def open | |||
load_attributes_from_response(post(:open, {}, body.to_json)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no body
here, so I think this needs to be: load_attributes_from_response(post(:open, {}, only_id))
b0a70ba
to
a3553c3
Compare
fulfillment_order.status = 'scheduled' | ||
|
||
opened = ActiveSupport::JSON.decode(load_fixture('fulfillment_order')) | ||
opened['status'] = 'open' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we set the status here before making the POST
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, we're comparing it against the fixture, I see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixture has the status open
already actually, here I am trying to make sure it is open
, it should be fine without it. Just clearer this way IMO.
FYI, the version of shopify_api in core is a little behind. I tested with the latest release recently and found a few failures, so we'd have to address those before upgrading: https://github.com/shopify/shopify/commit/84c96b3404feb604403717dfbcf4418cf7aa0adb |
PR for the above: https://github.com/Shopify/shopify/pull/269163 |
a3553c3
to
1da8edf
Compare
1da8edf
to
d3998c2
Compare
Fixes: https://github.com/Shopify/shopify/issues/255067
Add
open
andreschedule
APIs support forscheduled
fulfillment orders.POST /admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/open.json
POST /admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/reschedule.json