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 authored and GitHub committed 2022-09-21 11:02:10 +00:00
1 parent de85a971c6
commit c661cc789b
17 files changed
+486 -67

No files matched your search

@@ -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),