UNPKG

paccurate

Version:

Reduce fulfillment costs and wasted material by finding the optimal way to pack every shipment, in real time.

30 lines 857 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Paccurate = void 0; const request_1 = require("./request"); class Paccurate { /** * @param apiKey - Paccurate API key. * @param apiUrl - Paccurate API endpoint. */ constructor(apiKey, apiUrl = 'https://api.paccurate.io/') { this.apiKey = apiKey; this.apiUrl = apiUrl; } /** * Finds the optimal way to pack a shipment. * * @param body - Packing configuration. * @param url - Paccurate API endpoint. * @returns - Pack response. */ pack(body, url = this.apiUrl) { return (0, request_1.post)(url, body, { headers: { Authorization: `apikey ${this.apiKey}`, }, }); } } exports.Paccurate = Paccurate; //# sourceMappingURL=Paccurate.js.map