killbill

Kill Bill client library

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
killbill
2230.1.02 years ago5 years agoMinified + gzip package size for killbill in KB

Readme

killbill-client-js
JavaScript client library for Kill Bill.
It is designed to run both on the client side as well as on the server side (e.g. using node.js).
Codegen
To regenerate, overwrite kbswagger.yaml and npm run codegen && npm run build
Usage
  • ``` javascript
const killbill = require('killbill'); const globalAxios = require('axios');
const axios = globalAxios.create();
//optional - follow location header when new object is created axios.interceptors.response.use(killbill.followLocationHeaderInterceptor);
//optional - configure tough cookie support const tough = require('tough-cookie'); const axiosCookieJarSupport = require('axios-cookiejar-support').default; axiosCookieJarSupport(axios); axios.defaults.withCredentials = true; axios.defaults.jar = new tough.CookieJar();
const config = new killbill.Configuration({
username: "admin"
password: "password",
apiKey: killbill.apiKey("bob", "lazar"),
basePath: "http://127.0.0.1:8080"
});
new killbill.AccountApi(config, null, axios).getAccountByKey("externalkey")
.then(result => console.log(result))
.catch(error => console.log(error));
```