producteca-sdk
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -0,0 +0,0 @@ (function() { |
@@ -0,0 +0,0 @@ (function() { |
@@ -0,0 +0,0 @@ (function() { |
@@ -52,4 +52,4 @@ (function() { | ||
ProductsApi.prototype.findByCode = function(code) { | ||
return this._findOne("sku eq '" + code + "'")["catch"]((function(_this) { | ||
ProductsApi.prototype.findByCode = function(code, $select) { | ||
return this._findOne("sku eq '" + code + "'", $select)["catch"]((function(_this) { | ||
return function() { | ||
@@ -61,4 +61,4 @@ throw new Error("The product with code=" + code + " wasn't found"); | ||
ProductsApi.prototype.findByVariationSku = function(sku) { | ||
return this._findOne("variations/any(variation variation/barcode eq '" + sku + "')")["catch"]((function(_this) { | ||
ProductsApi.prototype.findByVariationSku = function(sku, $select) { | ||
return this._findOne("variations/any(variation variation/barcode eq '" + sku + "')", $select)["catch"]((function(_this) { | ||
return function() { | ||
@@ -119,4 +119,12 @@ throw new Error("The product with sku=" + sku + " wasn't found"); | ||
ProductsApi.prototype._findOne = function(oDataQuery) { | ||
return (this.respondMany(this.client.getAsync("/products/?$filter=" + (encodeURIComponent(oDataQuery))))).then((function(_this) { | ||
ProductsApi.prototype._findOne = function($filter, $select) { | ||
var query; | ||
if ($select == null) { | ||
$select = ""; | ||
} | ||
query = "?$filter=" + (encodeURIComponent($filter)); | ||
if ($select !== "") { | ||
query += "&$select=" + (encodeURIComponent($select)); | ||
} | ||
return (this.respondMany(this.client.getAsync("/products/" + query))).then((function(_this) { | ||
return function(products) { | ||
@@ -123,0 +131,0 @@ var firstMatch; |
@@ -21,2 +21,3 @@ (function() { | ||
this.createShipment = __bind(this.createShipment, this); | ||
this.getMultipleShipments = __bind(this.getMultipleShipments, this); | ||
this.getShipment = __bind(this.getShipment, this); | ||
@@ -67,2 +68,6 @@ this.update = __bind(this.update, this); | ||
SalesOrdersApi.prototype.getMultipleShipments = function(shipmentIds) { | ||
return this.respond(this.client.getAsync("/shipments?ids=" + shipmentIds)); | ||
}; | ||
SalesOrdersApi.prototype.createShipment = function(salesOrderId, shipment) { | ||
@@ -69,0 +74,0 @@ return this.respond(this.client.postAsync("/salesorders/" + salesOrderId + "/shipments", shipment)); |
@@ -0,0 +0,0 @@ (function() { |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"main": "build/sdk.js", | ||
@@ -11,0 +11,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
48082
547