chore(docs): Updated API Reference (automated) (#12268)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cb53b8a529
commit
c7065fcd2b
@@ -8,9 +8,6 @@ export const sdk = new Medusa({
|
||||
},
|
||||
})
|
||||
|
||||
To convert a draft order to an order:
|
||||
|
||||
```ts
|
||||
sdk.admin.draftOrder.convertToOrder("order_123")
|
||||
.then(({ order }) => {
|
||||
console.log(order)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import Medusa from "@medusajs/js-sdk"
|
||||
|
||||
export const sdk = new Medusa({
|
||||
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||
debug: import.meta.env.DEV,
|
||||
auth: {
|
||||
type: "session",
|
||||
},
|
||||
})
|
||||
|
||||
sdk.admin.draftOrder.removeShippingMethod(
|
||||
"order_123",
|
||||
"shipping_method_123"
|
||||
)
|
||||
.then(({ draft_order_preview }) => {
|
||||
console.log(draft_order_preview)
|
||||
})
|
||||
@@ -0,0 +1,2 @@
|
||||
curl -X DELETE '{backend_url}/admin/draft-orders/{id}/edit/shipping-methods/method/{method_id}' \
|
||||
-H 'Authorization: Bearer {access_token}'
|
||||
Reference in New Issue
Block a user