producteca-sdk
Advanced tools
Comparing version 8.1.0 to 8.2.0
@@ -47,17 +47,26 @@ (function() { | ||
ProductsApi.prototype.get = function(id) { | ||
return (this.client.getAsync("/products/" + id)).then(this._convertJsonToProduct); | ||
ProductsApi.prototype.get = function(id, opts) { | ||
return (this.client.getAsync("/products/" + id, opts)).then(this._convertJsonToProduct); | ||
}; | ||
ProductsApi.prototype.getMany = function(ids) { | ||
return this._findMany("/products/multi", { | ||
ids: ids | ||
ProductsApi.prototype.getMany = function(ids, opts) { | ||
return this._findMany({ | ||
url: "/products/multi", | ||
qs: { | ||
ids: ids | ||
}, | ||
opts: opts | ||
}); | ||
}; | ||
ProductsApi.prototype.findByCode = function(code, sku, $select) { | ||
return this._findMany("/products/bycode", { | ||
code: code, | ||
sku: sku | ||
}, $select); | ||
ProductsApi.prototype.findByCode = function(code, sku, $select, opts) { | ||
return this._findMany({ | ||
url: "/products/bycode", | ||
qs: { | ||
code: code, | ||
sku: sku | ||
}, | ||
$select: $select, | ||
opts: opts | ||
}); | ||
}; | ||
@@ -74,12 +83,22 @@ | ||
ProductsApi.prototype.findByVariationSku = function(sku, $select) { | ||
return this._findMany("/products/bysku", { | ||
sku: sku | ||
}, $select); | ||
ProductsApi.prototype.findByVariationSku = function(sku, $select, opts) { | ||
return this._findMany({ | ||
url: "/products/bysku", | ||
qs: { | ||
sku: sku | ||
}, | ||
$select: $select, | ||
opts: opts | ||
}); | ||
}; | ||
ProductsApi.prototype.findByVariationIntegrationId = function(integrationId, $select) { | ||
return this._findMany("/products/byvariationintegration", { | ||
integrationId: integrationId | ||
}, $select); | ||
ProductsApi.prototype.findByVariationIntegrationId = function(integrationId, $select, opts) { | ||
return this._findMany({ | ||
url: "/products/byvariationintegration", | ||
qs: { | ||
integrationId: integrationId | ||
}, | ||
$select: $select, | ||
opts: opts | ||
}); | ||
}; | ||
@@ -192,12 +211,12 @@ | ||
ProductsApi.prototype._findMany = function(url, qs, $select) { | ||
if (qs == null) { | ||
qs = {}; | ||
} | ||
ProductsApi.prototype._findMany = function(arg) { | ||
var $select, opts, qs, ref, ref1, url; | ||
url = arg.url, qs = (ref = arg.qs) != null ? ref : {}, $select = arg.$select, opts = (ref1 = arg.opts) != null ? ref1 : {}; | ||
_.assign(qs, { | ||
$select: $select != null ? $select.join() : void 0 | ||
}); | ||
return (this.client.getAsync(url, { | ||
_.assign(opts, { | ||
qs: qs | ||
})).then(this._convertJsonToProducts); | ||
}); | ||
return (this.client.getAsync(url, opts)).then(this._convertJsonToProducts); | ||
}; | ||
@@ -204,0 +223,0 @@ |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "8.1.0", | ||
"version": "8.2.0", | ||
"main": "build/sdk.js", | ||
@@ -11,0 +11,0 @@ "dependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33483
19
834