cimpress-fulfillment-location
Advanced tools
Comparing version 0.1.17 to 0.1.21
@@ -9,2 +9,6 @@ # Change Log | ||
### Added | ||
- Implemented client for Fulfillment Location service, with caching. | ||
- Implemented client for Fulfillment Location service, with caching. | ||
## [0.2] - 2018-10-03 | ||
### Added | ||
- Enable showArchived flag for listing fulfillment locations. |
@@ -127,2 +127,5 @@ 'use strict'; | ||
var showArchived = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
return new Promise(function (resolve, reject) { | ||
@@ -139,3 +142,3 @@ handleAuthorization(authorization, reject); | ||
if (!_this2.useCaching) { | ||
return _this2._getFulfillmentLocationsFromService(instance).then(function (locations) { | ||
return _this2._getFulfillmentLocationsFromService(instance, showArchived).then(function (locations) { | ||
return resolve(locations); | ||
@@ -156,3 +159,3 @@ }).catch(function (err) { | ||
return _this2._getFulfillmentLocationsFromService(instance).then(function (locations) { | ||
return _this2._getFulfillmentLocationsFromService(instance, showArchived).then(function (locations) { | ||
flCache.set(cacheKey, locations); | ||
@@ -179,5 +182,2 @@ return resolve(locations); | ||
url: endpoint, | ||
qs: { | ||
showArchived: false | ||
}, | ||
timeout: _this3.timeout | ||
@@ -208,3 +208,3 @@ }; | ||
key: '_getFulfillmentLocationsFromService', | ||
value: function _getFulfillmentLocationsFromService(instance) { | ||
value: function _getFulfillmentLocationsFromService(instance, showArchived) { | ||
var _this4 = this; | ||
@@ -217,4 +217,4 @@ | ||
url: endpoint, | ||
qs: { | ||
showArchived: false | ||
params: { | ||
showArchived: showArchived | ||
}, | ||
@@ -221,0 +221,0 @@ timeout: _this4.timeout |
{ | ||
"name": "cimpress-fulfillment-location", | ||
"version": "0.1.17", | ||
"version": "0.1.21", | ||
"author": "LogisticsQuotingandPlanning@cimpress.com", | ||
@@ -5,0 +5,0 @@ "description": "A simple client for the Cimpress Fulfillment Location service", |
@@ -34,2 +34,9 @@ # Cimpress Fulfillment Location client | ||
}); | ||
// To include also archived fulfillment locations | ||
client.getLocations(req.headers.authorization, true) | ||
.then(fulfillmentLocations => { | ||
// do stuff | ||
}); | ||
``` | ||
@@ -36,0 +43,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28066
414
45
0
201