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:
@@ -1,4 +1,4 @@
|
||||
import { StoreOrderEditsRes } from "@medusajs/medusa"
|
||||
import { StoreOrderEditsRes, StorePostOrderEditsOrderEditDecline } from "@medusajs/medusa"
|
||||
import { ResponsePromise } from "../typings"
|
||||
import BaseResource from "./base"
|
||||
|
||||
@@ -10,6 +10,15 @@ class OrderEditsResource extends BaseResource {
|
||||
const path = `/store/order-edits/${id}`
|
||||
return this.client.request("GET", path, undefined, {}, customHeaders)
|
||||
}
|
||||
|
||||
decline(
|
||||
id: string,
|
||||
payload: StorePostOrderEditsOrderEditDecline,
|
||||
customHeaders: Record<string, any> = {}
|
||||
) {
|
||||
const path = `/store/order-edits/${id}/decline`
|
||||
return this.client.request("POST", path, payload, {}, customHeaders)
|
||||
}
|
||||
}
|
||||
|
||||
export default OrderEditsResource
|
||||
|
||||
Reference in New Issue
Block a user