easybill-node-api

2.0.2 • Public • Published

easybill node api

Usage

const Promise = require('bluebird');
 
const easybill = require('easybill-node-api')('your-easybill-token');
 
easybill.get('documents')
  .then((res) => console.log(res.items));
 
// Since this module uses Bluebird, this is also possible:
 
easybill.get('customers')
  .then(({items}) => items)
  .mapSeries(async (customer) => {
    const res = await easybill.get(`documents?customer_id=${customer.id}`);
    return {
      customer,
      documents: res.items
    };
  }
  .each(({customer, documents}) =>
    console.log(`Customer ${customer.id} has ${documets.length} documents`);
  );

/easybill-node-api/

    Package Sidebar

    Install

    npm i easybill-node-api

    Weekly Downloads

    14

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    2.96 kB

    Total Files

    3

    Last publish

    Collaborators

    • denis
    • evgdema
    • dubkrapht