1.0.5 • Published 10 months ago

@ryanforever/invoice-generator v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

invoice-generator

A wrapper for the API of https://invoice-generator.com

Requires an API key.

quickstart

const InvoiceGenerator = require("@ryanforever/invoice-generator")
const invoice = new InvoiceGenerator({
	key: process.env.KEY // key from invoice-generator.com

	// SET INVOICE DEFAULTS
	name: "Ryan Forever",
	address: "1234 Paradise Rd\nHollywood, CA, 94510",
	phone: "555-555-5555",
	logo: "https://example.com/my-logo.jpg",
})

invoice.generate({
	title: "My Invoice",
	clientName: "Apple, Inc",
	clientAddress: "One Apple Park Way, Cupertino, California, 95014",
	fields: {
		poNumber: "0004501244",
	},
	items: [
		{
			name: "Hard Work",
			rate: 10000,
			description: "did alot of hard work"
		}
	]
})

/*

{
	invoice: {
	// invoice details
	},
	data: <Array Buffer to save as PDF>
}


*/
1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago