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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user