Mark many orders as paid
mishelashala opened this issue · comments
Michell Ayala commented
As a user I want to be able to mark many orders as paid.
Constraints
- User must be logged in
Scenario 1
Admin tries to mark many orders as paid.
System Response: notifies the user that the orders were marked as paid
Request:
PATH /api/v1/orders/actions
accept: application/json
{
"action": "mark_as_paid",
"ids": ["1", "2"]
}
Response:
HTTP 1.1 200 Ok
Scenario 2
User tries to mark many orders as paid, but the user is not logged in
System Response: notifies the user that is not logged in
Request:
PATH /api/v1/orders/actions
accept: application/json
{
"action": "mark_as_paid",
"ids": ["1", "2"]
}
Response:
HTTP 1.1 401 Unauthorized
{
"code": "401",
"message": "Unauthorized"
}
Scenario 3
User tries to mark many orders as paid, but the service is not available
System Response: notifies the user that the service is not available
Request:
PATH /api/v1/orders/actions
accept: application/json
{
"action": "mark_as_paid",
"ids": ["1", "2"]
}
Response:
HTTP 1.1 500 Internal Server Error
{
"code": "500",
"message": "Internal Server Error"
}