chore(docs): merge changes from master (#3780)
* chore(docs): Generated API Reference (#3761) Co-authored-by: shahednasser <shahednasser@users.noreply.github.com> * docs: fix typo (#3771) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: shahednasser <shahednasser@users.noreply.github.com> Co-authored-by: Andre Schweighofer <fidrelity@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
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.reservations.list()
|
||||
.then(({ reservations, count, limit, offset }) => {
|
||||
console.log(reservations.length)
|
||||
})
|
||||
@@ -2,7 +2,11 @@ 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.reservations.create({
|
||||
line_item_id: 'item_123',
|
||||
location_id: 'loc_123',
|
||||
inventory_item_id: 'iitem_123',
|
||||
quantity: 1
|
||||
})
|
||||
.then(({ reservations }) => {
|
||||
console.log(reservations.id);
|
||||
.then(({ reservation }) => {
|
||||
console.log(reservation.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user