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 save, update_tracking, and cancel actions to FulfillmentOrderFulfillment resource #666

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

karmakaze
Copy link
Contributor

[This PR is a copy of #639 which was mistakenly merged into a non-master branch.]

This PR adds the following POST requests:

POST fulfillments (via FulfillmentOrderFulfillment.save)
POST fulfillments/:fulfillment_id/update_tracking
POST fulfillments/:fulfillment_id/cancel

GET requests are in PR #633
FulfillmentOrder actions move, cancel, close are in PR #635
FulfillmentOrder actions fulfillment_request (+ accept/reject), cancellation_request (+ accept/reject) are in PR #637
Subsequent PRs will add other fulfillment order related requests to relevant resources.

Since all that's really needed is the fulfillment_id, if it's known you can do (rather than querying it first):

  FulfillmentOrderFulfillment.new(id: <the-fulfillment-id>).update_tracking(<params>)

Notes to reviewer:

  • there's already a Fulfillment resource which I haven't yet determined is the same/compatible with FO fulfillments so created a new resource FulfillmentOrderFulfillment
  • the specific statuses used in the tests may not make logical sense in terms of fulfillment order/fulfillment lifecycle. the tests do verify proper request dispatching and serialization

@karmakaze karmakaze requested a review from a team as a code owner January 13, 2020 21:19
@karmakaze karmakaze changed the base branch from master to fulfillment-orders-fulfillment-cancellation-request January 14, 2020 15:40
@karmakaze karmakaze changed the base branch from fulfillment-orders-fulfillment-cancellation-request to master January 14, 2020 15:41
@karmakaze karmakaze merged commit 2818c3b into master Jan 14, 2020
@karmakaze karmakaze deleted the fulfillment-orders-fulfillment branch January 14, 2020 15:41
@linzhao125 linzhao125 temporarily deployed to rubygems January 27, 2020 20:49 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants