svb-wires
v1.0.2
Published
Helper API to issue wire transfers
Downloads
2
Readme
svb-wires
A NodeJS helper library to create, cancel, and retrieve records of wire transfers transferring money in and out of Silicon Valley Bank accounts.
Uses SVB-Client module and your API credentials.
Usage
let client = new SVBClient({
API_KEY: '',
HMAC_SECRET: ''
});
let Wires = new SVBWires(client);
// initiate a wire transfer
Wires.create({ ... }, (err, record) => {
console.log(record.id);
});
// retrieve details of a wire transfer (including status)
Wires.get(wire_id, (err, record) => { });
// get all of my wire transfers
Wires.all((err, list) => { });
// get all of my pending wire transfers
// valid statuses are: pending, processing, canceled, hold, succeeded, failed
Wires.find({ status: 'pending' }, (err, list) => { });
// YYYY-MM-DD
// (also available: effective_date_end)
Wires.find({ effective_date_start: '2017-05-31' }, callback);
// cancel a wire transfer
// you cannot change a wire transfer to any other status
Wires.updateStatus(wire_id, 'canceled', (err) => { });
Installation
npm install svb-wires --save