lightspeed-retail-sdk 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/index.js +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -288,6 +288,22 @@ class LightspeedRetailSDK {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
async getOpenOrdersByVendorID(vendorID) {
|
|
292
|
+
const options = {
|
|
293
|
+
url: `${this.baseUrl}/${this.accountID}/Order.json?load_relations=["Vendor", "OrderLines"]&vendorID=${vendorID}&complete=false`,
|
|
294
|
+
method: "GET",
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
// if (relations) options.url = options.url + `?load_relations=${relations}`;
|
|
298
|
+
|
|
299
|
+
try {
|
|
300
|
+
const response = await this.getAllData(options);
|
|
301
|
+
return response;
|
|
302
|
+
} catch (error) {
|
|
303
|
+
return this.handleError("GET ORDER ERROR", error);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
291
307
|
async getVendors(relations) {
|
|
292
308
|
const options = {
|
|
293
309
|
url: `${this.baseUrl}/${this.accountID}/Vendor.json`,
|