docparse-default-customer

Create default customer mongoose model in memory for use in docparse tests

Docparse Default Customers

Create default customer mongoose model in memory for use in docparse tests

Dependency tracking by David

Usage

Default object

var inspect = require('eyespect').inspector()
var createDefaultCustomer = require('docparse-default-customer')
createDefaultCustomer(function(errcustomer) {
  if (err) {
    inspect(err, 'error creating customer')
    return;
  }
  inspect(customer.toObject(), 'created customer');
});

With custom data

var data = {
  supplierCode: 'POS',
  customerName: 'Point Oxygen Services'
};
var createDefaultCustomer = require('docparse-default-customer')
createDefaultCustomer(data, function(errcustomer) {
  if (err) {
    inspect(err, 'error creating customer')
    return;
  }
  inspect(customer.toObject(), 'default customer');
});

npm install docparse-default-customer