Skip to content

Wrapper for ModuleBank API for node.js

License

Notifications You must be signed in to change notification settings

Deadly0/module-bank-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Wrapper for ModuleBank API for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published