feat(medusa): Migrate and fix order service (#1894)
* feat(medusa): Migrate and fix order service * fix(medusa): Order service pass Payment instead of the session: * fix(medusa): Remove unnecessary method in the client library * test(medusa): Fix unit tests * test(medusa): Fix unit tests * fix(medusa): Typo * test(meduas): fix unit test * feat(medusa): Update base service used and missing transaction * test(meduas): fix unit test * fix(medusa): cleanup and missing transaction * fix(medusa): missing withTransaction on some mocks * feat(medusa): Update order service method visibility * include feedback * feat(medusa); revert order payment status" * test(medusa): fix unit Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Oliver Windall Juhl
parent
1998902a94
commit
b54d5178c9
@@ -15,21 +15,12 @@ import {
|
||||
AdminPostOrdersOrderSwapsReq,
|
||||
AdminPostOrdersOrderSwapsSwapFulfillmentsReq,
|
||||
AdminPostOrdersOrderSwapsSwapShipmentsReq,
|
||||
AdminPostOrdersReq,
|
||||
} from "@medusajs/medusa"
|
||||
import qs from "qs"
|
||||
import { ResponsePromise } from "../../typings"
|
||||
import BaseResource from "../base"
|
||||
|
||||
class AdminOrdersResource extends BaseResource {
|
||||
create(
|
||||
payload: AdminPostOrdersReq,
|
||||
customHeaders: Record<string, any> = {}
|
||||
): ResponsePromise<AdminOrdersRes> {
|
||||
const path = `/admin/orders`
|
||||
return this.client.request("POST", path, payload, {}, customHeaders)
|
||||
}
|
||||
|
||||
update(
|
||||
id: string,
|
||||
payload: AdminPostOrdersOrderReq,
|
||||
@@ -261,15 +252,6 @@ class AdminOrdersResource extends BaseResource {
|
||||
const path = `/admin/orders/${id}/claims/${claimId}/shipments`
|
||||
return this.client.request("POST", path, payload, {}, customHeaders)
|
||||
}
|
||||
|
||||
deleteMetadata(
|
||||
id: string,
|
||||
key: string,
|
||||
customHeaders: Record<string, any> = {}
|
||||
): ResponsePromise<AdminOrdersRes> {
|
||||
const path = `/admin/orders/${id}/metadata/${key}`
|
||||
return this.client.request("DELETE", path, undefined, {}, customHeaders)
|
||||
}
|
||||
}
|
||||
|
||||
export default AdminOrdersResource
|
||||
|
||||
Reference in New Issue
Block a user