Feat/decline order edit (#2234)

**What**
- Decline an order edit from a store endpoint
- Refactor totals setting to a service method

Fixes CORE-502
This commit is contained in:
Philip Korsholm
2022-09-21 11:02:10 +00:00
committed by GitHub
parent de85a971c6
commit c661cc789b
17 changed files with 486 additions and 67 deletions
@@ -69,6 +69,15 @@ export const storeHandlers = [
)
}),
rest.post("/store/order-edits/:id/decline", (req, res, ctx) => {
return res(
ctx.status(200),
ctx.json({
order_edit: {...fixtures.get("order_edit"), declined_reason: req.body.declined_reason, status: 'declined'},
})
)
}),
rest.get("/store/orders/:id", (req, res, ctx) => {
return res(
ctx.status(200),