UNPKG

theendsoaper

Version:

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

17 lines (16 loc) 487 B
const Item = require('./active-orders-item'); module.exports = class ActiveOrders { constructor(order) { var list = []; if (order['item'].length === undefined) { // console.log('h'); list.push(new Item(order['item'])); } else { // console.log('y'); for (var i in order['item']) { list.push(new Item(order['item'][i])); } } this.items = list; } }