UNPKG

@stylusapparel/shipstation-api-node

Version:
24 lines (22 loc) 731 B
"use strict"; const { __shipments } = require("../constants/url"); const { _formatResponse: _fr } = require("./utils"); module.exports = (__http) => { const __this = { _createLabel: (__labelObj) => _fr(__http.post(__shipments.CREATE_LABEL, __labelObj)), _getRates: (__rateObj) => _fr(__http.post(__shipments.GET_RATES, __rateObj)), _getAllShipments: (__filters = {}) => _fr( __http.get( __shipments.GET_SHIPMENTS + "?" + new URLSearchParams(__filters || {}).toString() ) ), _voidShipmentLabel: (__shipmentId) => _fr(__http.post(__shipments.VOID_LABEL, { shipmentId: __shipmentId })), }; return __this; };