UNPKG

theendsoaper

Version:

Access Untill Tills with SOAP from Node.js and parse the results as objects, some extra useful functions in as well.

26 lines (22 loc) 662 B
const soaper = require('./index') const Type = import("./modules/function-types.js"); const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 2); const today = new Date(); today.setDate(today.getDate() - 1); soaper.detailedTurnoverReport( "API", "VEZX%XNsAwYYBPv4", "http://81.206.44.37:3063/soap/ITPAPIPOS", "GetDetailedTurnoverReport", yesterday.toISOString().split("Z")[0], today.toISOString().split("Z")[0], "nw0IxN1Ezczg" ) .then((values2) => { }) .catch((error) => { // console.log(error); eventEmitter.emit("api_" + bar, bar, { error: error }); });