- shipment:
- Added currentTrackingInfo in shipment.ts.
- shipment:
- Fixed typo in shipFromCountry declaration.
Eff. 2022-07-01, Walmart requires a ShipFromCountry for each line item submitted via Shipping Updates.
Eff. 2019-08-28, Walmart is deprecating the signature based request and requiring an update to use the Token API instead. Requests have been updated to use the new authentication method.
Walmart returns a 404 error when no results exist for API method. For example, if
calling getAllReleased()
, Walmart returns a 404 if no new released orders exist.
However, when using this method with a time-based trigger, it's expected that some
calls will return no results. Therefore, the 404 INFO
response is now caught and
returned as a Promise.resolve()
rather than a thrown error.
[{"code":"CONTENT_NOT_FOUND.GMP_ORDER_API","description":"Failed when called getAllOrders. Orders not found for given search parameters"}]
- error:
- Added
WMTErrorResponse
classes to help with handling Walmart errors. (Kane McConnell) #15
- Added
- request:
- Improved
ContentNotFoundError
handler to separate info messages from actual error messages. (Kane McConnell) #15
- Improved
- request:
- Added
ContentNotFoundError
filter to catch chain to handle parsing of Walmart error response when no results are returned for the requested parameters. The error description(s) are stringified as a JSON array and thrown as a newError
. (Kane McConnell) #15
- Added
The return type of requests was updated to Request.Promise
rather than PromiseLike
.
The PromiseLike
type does not carry a catch()
method, which meant parent modules
could not chain catches onto the methods.
Now when using the Orders methods, developers can add custom .catch()
:
WMT.Orders.getAllReleased({
// params
})
.then((response: string) => {
// do something with the response
})
.catch((error: Error) => {
// handle the error.
});
- request:
- Changed return type of
execute
toPromise
rather thanPromiseLike
, which did not have the.catch()
method available when imported into parent modules. (Kane McConnell) #13
- Changed return type of
- orders:
- Changed return type of all Orders methods to
Request.Promise
to pass through the.catch()
method to parent modules. (Kane McConnell) #13
- Changed return type of all Orders methods to
- README:
- Added documentation regarding the inaccuracies between Walmart Marketplace API documentation and production responses received. (Kane McConnell) #11
- request:
- Added timeout of
120000
ms (2 minutes) to request promise to avoid overuse of resources when the API is down or slow to return response headers. (Kane McConnell) #11
- Added timeout of
- purchase:
- Added
SingleOrderResponse
toWMT.Orders.PurchaseOrder
to match object strutcture received when using theWMT.Orders.ackOrder()
method. (Kane McConnell) #11
- Added
- README:
- Added example call for
WMT.Orders.postShippingUpdate()
. (Kane McConnell) #9
- Added example call for
- orders:
- Added
postShipingUpdate()
method toWMT.Orders
module. (Kane McConnell) #9 - Added
Shipment
to theWMT.Orders
exports. (Kane McConnell) #9
- Added
- shipment:
- Added
Shipment
classes. (Kane McConnell) #9
- Added
- purchase:
- Changed the
OrderLineTrackingInfo.trackingUrl
property to optional. It is only required whenCarrierName.otherCarrier
is set. (Kane McConnell) #9 - Changed the documentation for
OrderLinePackageCarrier
with more detail and acceptable carrier names. (Kane McConnell) #9
- Changed the
- request:
- Added optional
Body
property to the request, used when the API expects a body in the request (i.e. shipping updates). (Kane McConnell) #9
- Added optional
- README:
- Added example call for
WMT.Orders.ackOrder()
. (Kane McConnell) #7
- Added example call for
- orders:
- Added
ackOrder()
method toWMT.Orders
module. (Kane McConnell) #7
- Added
- request:
- Changed
Method
in in theRequest.RequestParams
interface to an optional property to support calls that do not require query parameters. (Kane McConnell) #7 - Added
method
property to the request promise. Previously, all calls were using theGET
method. (Kane McConnell) #7
- Changed
- package.json:
- Changed versions of dependencies rather than relying on
latest
. (Kane McConnell) #7
- Changed versions of dependencies rather than relying on
Created new module, which includes the first Orders method: getAllReleased()
.