module-bank-api

1.2.2 • Public • Published

ModuleBank API

Wrapper for ModuleBank API for Node.js

NPM version

Install

npm i module-bank-api -S

Usage

Import

{ModuleBankApi, ModuleBankPaymentCategory} = require('module-bank-api');
// or
import {ModuleBankApi, ModuleBankPaymentCategory} from 'module-bank-api';

API object

let api = new ModuleBankApi(
    'sandboxtoken', // Auth token 
    true // true - sandbox mode, false - production mode
);

API methods

Argument params is an Object with the followings fields:

let query = {
    category: ModuleBankPaymentCategory.CREDIT, // ModuleBankPaymentCategory.CREDIT or ModuleBankPaymentCategory.DEBET
    skip: 2, // Skim records count
    records: 3, // Records limit
    from: from, // Select operation from this date (JS Date object)
    till: till, // Select operation till this date (JS Date object)
};

All fields are optional.

Callback signature

function callback(error, response) {
    if (!error) {
        console.log(response);
    }
}
  • error - error information or null if no error happens
  • response - response data

ModuleBankPaymentCategory

  • ModuleBankPaymentCategory.DEBET - debet category
  • ModuleBankPaymentCategory.CREDIT - credit category

Example

See demo

Readme

Keywords

Package Sidebar

Install

npm i module-bank-api

Weekly Downloads

3

Version

1.2.2

License

MIT

Last publish

Collaborators

  • deadly0