iugu2-node
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

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

Travis Coverage Status npm Dev Dependencies

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

Readme

Keywords

Package Sidebar

Install

npm i iugu2-node

Weekly Downloads

2

Version

0.5.1

License

MIT

Last publish

Collaborators

  • shira_kitsune