Neo's Playing Morpheus

    killbill
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    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

    Code is generated using openapi-codegen typescript-axios template.

    To regenerate, overwrite kbswagger.yaml and npm run codegen && npm run build

    Usage

    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("external_key")
        .then(result => console.log(result))
        .catch(error => console.log(error));

    Keywords

    none

    Install

    npm i killbill

    DownloadsWeekly Downloads

    1,926

    Version

    0.1.0

    License

    Apache-2.0

    Unpacked Size

    4.76 MB

    Total Files

    28

    Last publish

    Collaborators

    • pierreatkillbill