feat(medusa, medusa-js, medusa-react): Implement store complete order… (#2275)
**What** Allow a customer to complete a requested order edit. **Test** - Unit tests complete flow - Unit tests medusa react - Integration tests of order edit completion FIXES CORE-501
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import { StoreOrderEditsRes, StorePostOrderEditsOrderEditDecline } from "@medusajs/medusa"
|
||||
import {
|
||||
StoreOrderEditsRes,
|
||||
StorePostOrderEditsOrderEditDecline,
|
||||
} from "@medusajs/medusa"
|
||||
import { ResponsePromise } from "../typings"
|
||||
import BaseResource from "./base"
|
||||
|
||||
@@ -12,13 +15,18 @@ class OrderEditsResource extends BaseResource {
|
||||
}
|
||||
|
||||
decline(
|
||||
id: string,
|
||||
id: string,
|
||||
payload: StorePostOrderEditsOrderEditDecline,
|
||||
customHeaders: Record<string, any> = {}
|
||||
) {
|
||||
const path = `/store/order-edits/${id}/decline`
|
||||
return this.client.request("POST", path, payload, {}, customHeaders)
|
||||
}
|
||||
|
||||
complete(id: string, customHeaders: Record<string, any> = {}) {
|
||||
const path = `/store/order-edits/${id}/complete`
|
||||
return this.client.request("POST", path, undefined, {}, customHeaders)
|
||||
}
|
||||
}
|
||||
|
||||
export default OrderEditsResource
|
||||
|
||||
Reference in New Issue
Block a user