chore(docs): Generated API Reference (#3211)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9997485c55
commit
14b2de94e2
20
docs/api/admin/code_samples/JavaScript/regions/post.js
Normal file
20
docs/api/admin/code_samples/JavaScript/regions/post.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.regions.create({
|
||||
name: 'Europe',
|
||||
currency_code: 'eur',
|
||||
tax_rate: 0,
|
||||
payment_providers: [
|
||||
'manual'
|
||||
],
|
||||
fulfillment_providers: [
|
||||
'manual'
|
||||
],
|
||||
countries: [
|
||||
'DK'
|
||||
]
|
||||
})
|
||||
.then(({ region }) => {
|
||||
console.log(region.id);
|
||||
});
|
||||
Reference in New Issue
Block a user