joola / joola.sdk

Joola's Software Development Kit (SDK)
https://joo.la
Other
3 stars 3 forks source link

Beacon insert according to docs fail #63

Closed itayw closed 10 years ago

itayw commented 10 years ago

Related to joola/joola.io#352

As reported by @MattAitchison.

This will fail:

joolaio.init({
  host: 'http://localhost:7070', APIToken: 'apitoken-root'}, function (err) {
  if (err) {
    throw err;
  }
  //console.log('joola.io ready, version', joolaio.VERSION);
  //csvConverter.from(csvFileName);
  joolaio.dispatch.beacon.insert('poInvBackorderTest', {
    Company: 'xxxxxx',
    VendorID: 'xxxxxxx',
    Name: 'xxxxxxxx',
    PONUM: '8103',
    POLine: '2',
    OpenLine: '1',
    PartNum: 'STxx-xx-xx',
    LineDesc: 'xxxxxxxxx xxx',
    WarehouseCode: 'xxxxxx',
    RelQty: 15,
    ReceivedQty: 0,
    BackOrderQty: 15
  });
  //joola.io ready, version 0.4.0
});

Issue is with the options and callback not being provided and docs indicating the above to be the correct syntax.