merchi_sdk_js 0.0.41 → 0.0.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_js",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "type": "module",
5
5
  "main": "src/merchi.js",
6
6
  "module": "src/merchi.js",
package/src/category.js CHANGED
@@ -14,6 +14,7 @@ export function Category() {
14
14
  addPropertyTo(this, 'showDashboard');
15
15
  addPropertyTo(this, 'showPublic');
16
16
  addPropertyTo(this, 'showPublicSupplierResell');
17
+ addPropertyTo(this, 'descendant');
17
18
  addPropertyTo(this, 'image', MerchiFile);
18
19
  addPropertyTo(this, 'domain', Domain);
19
20
  addPropertyTo(this, 'subcategories', Category);
package/src/job.js CHANGED
@@ -583,13 +583,13 @@ export function Job() {
583
583
  return assignment ? assignment.isUserSupplier(user) : false;
584
584
  }
585
585
 
586
- this.tryDeduct = function (success, error) {
586
+ this.deduct = function (success, error) {
587
587
  var request = new Request(),
588
588
  data = serialise(this)[0],
589
589
  query = new Dictionary(),
590
590
  self = this;
591
591
  query.add('embed', JSON.stringify({inventory: {}}));
592
- request.resource('/jobs/' + this.id() + '/deduct/');
592
+ request.resource('/jobs/' + this.id() + '/inventories_subtract/');
593
593
  request.method('POST');
594
594
  request.data().merge(data);
595
595
  request.query().merge(query);