fix(medusa-plugin-brightpearl): more gentle inventory syncs

This commit is contained in:
Sebastian Rindom
2020-08-28 11:19:20 +02:00
parent 70e8fcde41
commit e25478034b
4 changed files with 86 additions and 38 deletions
@@ -289,6 +289,18 @@ class BrightpearlClient {
})
.then(({ data }) => data.response && data.response[0])
},
search: (search) => {
return this.client_
.request({
url: `/product-service/product-search?${search}`,
})
.then(({ data }) => {
return {
products: this.buildSearchResults_(data.response),
metadata: data.response.metaData,
}
})
},
retrieveBySKU: (sku) => {
return this.client_
.request({