checkbook-api
Advanced tools
Comparing version 0.0.1-beta1 to 0.0.1-beta2
{ | ||
"name": "checkbook-api", | ||
"version": "0.0.1-beta1", | ||
"version": "0.0.1-beta2", | ||
"description": "Node.js library for the Checkbook API", | ||
@@ -10,3 +10,3 @@ "keywords": [ | ||
], | ||
"main": "index.js", | ||
"main": "lib/checkbook.js", | ||
"scripts": { | ||
@@ -30,3 +30,7 @@ "test": "echo \"Error: no tests specified\" && exit 1" | ||
}, | ||
"homepage": "https://github.com/CheckbookWeb/checkbook_node#readme" | ||
"homepage": "https://github.com/CheckbookWeb/checkbook_node#readme", | ||
"dependencies": { | ||
"lodash": "^4.17.10", | ||
"request": "^2.87.0" | ||
} | ||
} |
# Checkbook.io Node.js Library | ||
The Checkbook.io Node library provides convenient access to the Checkbook.io API from | ||
The [Checkbook.io](https://checkbook.io/) Node library provides convenient access to the [Checkbook.io API](https://checkbook.io/docs/api) from | ||
applications written in server-side JavaScript. | ||
THIS PACKAGE IS UNDER DEVELOPMENT AND IT'S NOT READY TO BE USED IN PRODUCTION YET. | ||
## Installation | ||
@@ -12,2 +10,85 @@ | ||
npm install checkbook --save | ||
npm install checkbook-api --save | ||
## Configuration | ||
The package needs to be configured with your account's API Key and API Secret: | ||
``` js | ||
var CheckbookAPI = require('checkbook-api'); | ||
var Checkbook = new CheckbookAPI({ | ||
api_key: 'd6aa2703655f4ba2af2a56202961ca86', | ||
api_secret: 'dXbCgzYBMibj8ZwuQMd2NXr6rtvjZ8', | ||
env: 'test' | ||
}); | ||
``` | ||
The ```env``` parameter is optional and can be omitted if the requests are made to the live environment. | ||
The possible values for this parameter are ```test``` or ```sandbox``` and the API credentials need to be from the specified environment. | ||
You can get the API Key and API Secret values from the [Settings](https://checkbook.io/account/settings) page: | ||
![API Key and API Secret](docs/images/API_Keys.png) | ||
## Usage | ||
You can use the following code snippet to send a digital check: | ||
``` js | ||
Checkbook.checks.sendDigitalCheck({ | ||
name: 'Widgets Inc.', | ||
recipient: 'widgets@example.com', | ||
description: 'Test Send Check', | ||
amount: 10.00 | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('Error:', error); | ||
} else { | ||
console.log(response); | ||
} | ||
}); | ||
``` | ||
You can use the following code snippet to query the list of checks: | ||
``` js | ||
Checkbook.checks.list({ | ||
page: 2, | ||
per_page: 10, | ||
status: 'IN_PROCESS' | ||
}, function (error, response) { | ||
if (error) { | ||
console.log('Error:', error); | ||
} else { | ||
console.log(response); | ||
} | ||
}); | ||
``` | ||
## Methods reference | ||
The ```Checkbook``` class has several endpoints and you can find the detailed reference for the methods each one provide here: | ||
* [Checkbook.checks](docs/CHECK.md) | ||
* [list()](docs/CHECK.md) | ||
* [sendDigitalCheck()](docs/CHECK.md) | ||
* [Checkbook.invoices](docs/INVOICE.md) | ||
* [list()](docs/INVOICE.md) | ||
* [Checkbook.subscriptions](docs/SUBSCRIPTION.md) | ||
* [Checkbook.banks](docs/BANK.md) | ||
* [Checkbook.users](docs/USER.md) | ||
## Getting help | ||
If you need help installing or using the library, please contact Checkbook.io Support at support@checkbook.io. | ||
If you've instead found a bug in the library or would like new features added, please open issues or pull requests against this repo. | ||
## More Information | ||
* [API Endpoints](https://checkbook.io/docs/api#document-api_endpoints) | ||
* [Error Codes](https://checkbook.io/docs/api#document-error_codes) | ||
* [Idempotency](https://checkbook.io/docs/api#document-idempotent_requests) | ||
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
130081
17
173
93
0
2
+ Addedlodash@^4.17.10
+ Addedrequest@^2.87.0
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.15.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)