iugu2-node
Another API wrapper for IUGU.com
iugu2-node is a promisified, self-contained library, that interfaces with the IUGU payment API. It has no other runtime dependencies, relying only on NodeJS Promise and HTTPS libraries.
Also, since this is developed using TypeScript, everything has its type definitions. Even if you do not use TypeScript, you can simply import the library and it will work normally!
Build status
How to use
Using iugu2-node is as simple as importing the module, instantiate it, and start doing calls!
In Typescript, you can do it like this:
import { Iugu } from 'iugu2-node'
import { Customer } from 'iugu2-node/interfaces/customer'
const iugu = new Iugu('MY API TOKEN')
let customer: Customer = {
name: 'Bruno Ferreira',
email: 'email@server.com'
}
iugu.customer.create(customer).then(newCustomer => {
customer = newCustomer
}).catch(error => {
console.error(error)
})
For complete reference, see our TypeDoc