feat(medusa, medusa-plugin-brightpearl): Inventory management for Brightpearl (#3192)

This commit is contained in:
Philip Korsholm
2023-04-23 12:50:19 +02:00
committed by GitHub
parent 8b6464180a
commit 4a85627435
20 changed files with 855 additions and 227 deletions
@@ -140,6 +140,12 @@ class BrightpearlClient {
data,
})
},
delete: (id) => {
return this.client_.request({
url: `/integration-service/webhook/${id}`,
method: "DELETE",
})
},
}
}
@@ -198,6 +204,15 @@ class BrightpearlClient {
data,
})
},
updateReservation: (orderId, data) => {
return this.client_
.request({
url: `/warehouse-service/order/${orderId}/reservation`,
method: "PUT",
data,
})
.then(({ data }) => data.response)
},
createReservation: (order, warehouse) => {
const id = order.id
const data = order.rows.map((r) => ({