Feat(medusa): remove item from order (#2273)

* wait for update to order edit model

* delete line item tests

* create remove method for lineitem with tax lines

* add remove item tests

* split delete allocation tests into two: more and less than total

* remove unused import

* cleanup

* add medusa-js and react endpoints

* pr feedback fixes

* linting

* remove unused relation from query

* remove removed-event and unused imports

* add await
This commit is contained in:
Philip Korsholm
2022-09-30 09:48:18 +02:00
committed by GitHub
parent 95c0dc653a
commit 00959f79bc
15 changed files with 811 additions and 11 deletions
@@ -95,6 +95,15 @@ class AdminOrderEditsResource extends BaseResource {
const path = `/admin/order-edits/${orderEditId}/items/${itemId}`
return this.client.request("POST", path, payload, {}, customHeaders)
}
removeLineItem(
orderEditId: string,
itemId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {
const path = `/admin/order-edits/${orderEditId}/items/${itemId}`
return this.client.request("DELETE", path, undefined, {}, customHeaders)
}
}
export default AdminOrderEditsResource