chore(docs): Updated API Reference (automated) (#13794)
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
1d63ed8ce9
commit
3d0f4086b4
@@ -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.refundReason.create({
|
||||
value: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
console.log(refund_reason)
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
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.refundReason.delete("ret_123")
|
||||
.then(({ deleted }) => {
|
||||
console.log(deleted)
|
||||
})
|
||||
@@ -0,0 +1,14 @@
|
||||
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.refundReason.retrieve("refr_123")
|
||||
.then(({ refund_reason }) => {
|
||||
console.log(refund_reason)
|
||||
})
|
||||
@@ -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.refundReason.update("ret_123", {
|
||||
value: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
console.log(refund_reason)
|
||||
})
|
||||
Reference in New Issue
Block a user