As a user
I need to have a way to save an item in my shopping cart
So that I can purchase them in the future not now
Details and Assumptions
Using the verb PUT with the URI ~shopcarts/{user_id}/items/{item_id}/hold~ shopcarts//items//hold [EDIT]
that item in that shopcart will be held (won't be ordered when user checks out the shopcart);
return 200 OK upon success
~if the user_id or item_id is invalid (not non-negative integers), return 400 BAD_REQUEST~ [EDIT]
~If the user id or item_id are valid but do not exist, return 404 not found error~ [EDIT]
Add new column to database model, a boolean flag to indicate whether that shopcart-item entry has been held
Need to refactor into Flask-X/swagger (including creating a new swagger data model now that we have this extra hold column, and add swagger docs to the route) [EDIT]
BELOW are done automatically if we refactor using Flask-RESTX first
Need to update functions accordingly like serialize() and deserialize(), make sure GET POST PUT etc. all work with this new column
Acceptance Criteria
Given we have item_id 100 in user_id 300
When we call PUT on shopcarts/300/items/100/hold
Then we receive 200 OK
When we call PUT on shopcarts/300/items/true/hold
Then we receive 404 Not Found
As a user I need to have a way to save an item in my shopping cart So that I can purchase them in the future not now
Details and Assumptions
Need to update functions accordingly like serialize() and deserialize(), make sure GET POST PUT etc. all work with this new column
Acceptance Criteria