merchi_sdk_js 0.0.33 → 0.0.37
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 +1 -1
- package/src/category.js +2 -0
- package/src/job.js +2 -2
- package/src/model.js +3 -0
- package/src/variation_fields_option.js +1 -0
    
        package/package.json
    CHANGED
    
    
    
        package/src/category.js
    CHANGED
    
    | @@ -14,6 +14,8 @@ export function Category() { | |
| 14 14 | 
             
                addPropertyTo(this, 'showPublic');
         | 
| 15 15 | 
             
                addPropertyTo(this, 'showPublicSupplierResell');
         | 
| 16 16 | 
             
                addPropertyTo(this, 'domain', Domain);
         | 
| 17 | 
            +
                addPropertyTo(this, 'subCategories', Category);
         | 
| 18 | 
            +
                addPropertyTo(this, 'parent', Category);
         | 
| 17 19 |  | 
| 18 20 | 
             
                this.create = function (success, error, embed, domainId) {
         | 
| 19 21 | 
             
                    var data = serialise(this),
         | 
    
        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. | 
| 586 | 
            +
               this.tryDeduct = 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() + '/ | 
| 592 | 
            +
                    request.resource('/jobs/' + this.id() + '/deduct/');
         | 
| 593 593 | 
             
                    request.method('POST');
         | 
| 594 594 | 
             
                    request.data().merge(data);
         | 
| 595 595 | 
             
                    request.query().merge(query);
         | 
    
        package/src/model.js
    CHANGED
    
    | @@ -459,6 +459,9 @@ export function getList(resource, success, error, parameters, withUpdates) { | |
| 459 459 | 
             
                    request.query().add('query_string',
         | 
| 460 460 | 
             
                                        parameters.queryString);
         | 
| 461 461 | 
             
                }
         | 
| 462 | 
            +
                if (notEmpty(parameters.categories)) {
         | 
| 463 | 
            +
                    request.query().add('categories', parameters.categories);
         | 
| 464 | 
            +
                }
         | 
| 462 465 | 
             
                if (notEmpty(parameters.companyCustomerId)) {
         | 
| 463 466 | 
             
                    request.query().add('company_customer_id',
         | 
| 464 467 | 
             
                                        parameters.companyCustomerId);
         | 
| @@ -15,6 +15,7 @@ export function VariationFieldsOption() { | |
| 15 15 | 
             
                addPropertyTo(this, 'default');
         | 
| 16 16 | 
             
                addPropertyTo(this, 'include');
         | 
| 17 17 | 
             
                addPropertyTo(this, 'colour');
         | 
| 18 | 
            +
                addPropertyTo(this, 'noInventory');
         | 
| 18 19 | 
             
                addPropertyTo(this, 'variationCost');
         | 
| 19 20 | 
             
                addPropertyTo(this, 'variationCostDiscountGroup', DiscountGroup);
         | 
| 20 21 | 
             
                addPropertyTo(this, 'variationUnitCost');
         |