npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cashflowy

v1.5.1

Published

## Installation ```shell npm install cashflowy --save ```

Downloads

10

Readme

Cashflowy Node SDK

Installation

npm install cashflowy --save

Documentation

This library makes it simpler to use Cashflowy passthrough APIs. Advantages of using passthough

  • no overheads
  • no sharing of 3rd party api credentials
  • no messing with various 3rd party authentication protocols
  • automation code looks clean and precise with only business logic

Before

var env = require('./env/por_pipeline.env.js');
async  function regeneratetoken(){
	const regenerateurl = `https://accounts.zoho.in/oauth/v2/token?refresh_token=${env.zb.refresh_token}&client_id=${env.zb.client_id}&client_secret=${env.zb.client_secret}&redirect_uri=${env.zb.redirect_uri}&grant_type=refresh_token`;
	var config ={
		method:'post',
		url:regenerateurl
	}
	return await axios(config);
	 //JSON.parse(res.body).access_token;
}

var getAccessToken = async function(){
	const access_tokenreq =  await regeneratetoken();
	const access_token = access_tokenreq.data.access_token;
	return access_token;
}
var zoho_access_token = results.getAccessToken;
var config = {
	method:'post',
	url:'https://books.zoho.in/api/v3/purchaseorders?organization_id=21341241234',
	headers: {
		'Authorization':'Zoho-oauthtoken '+zoho_access_token,
	},
	data:{
		vendor_id:results.getZohoVendorLookup.tp_id,
		purchaseorder_number:por.remote_id.trim(),
		date:por.date.substr(0,10),
		line_items:line_items,
		custom_fields: [
		  {
		    "customfield_id": "579006000000022035",
		    "value": por.remote_id,
		  }
		],
	}
}
var res = await axios(config);
return res.data.purchaseorder;

After

var cf = new Cashflowy(require(`../../env/cf_app.env.js`));
var options = {
	method:'POST',
	url:'/purchaseorders', // organization_id=21341241234 also does not need to be mentioned. Cashflowy knows.
	integration:9,
	org:22,
	data:{
		vendor_id:results.getZohoVendorLookup.tp_id,
		purchaseorder_number:por.remote_id.trim(),
		date:por.date.substr(0,10),
		line_items:line_items,
		custom_fields: [
		  {
		    "customfield_id": "579006000000022035",
		    "value": por.remote_id,
		  }
		],
	}
}
var result = await cf.passthrough(options)
return result.purchaseorder;

Documentation of passthrough APIs

https://docs.cashflowy.io/passthrough-api.html

3rd party Tools supported by Cashflowy passthrough

  • Google sheets - https://docs.cashflowy.io/passthrough-api/google-sheets/
  • Zoho books - https://docs.cashflowy.io/passthrough-api/zoho-books.html
  • Postgres - https://docs.cashflowy.io/passthrough-api/postgresql/
  • Stripe - https://docs.cashflowy.io/passthrough-api/stripe.html
  • Cashflowy POR app - https://docs.cashflowy.io/passthrough-api/por/
  • Quickbooks -

Initialisation

var Cashflowy = require('cashflowy');
var cf  = new Cashflowy({
	api_key:'some_api_key',
	api_secret:'some_api_secret',
})