@pliancy/chargebee-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

SDK wrapper for the Chargebee TypeScript SDK

Why

The chargebee-typescript library is a bit unwieldy and exports its types from various places within the codebase. This wrapper exports its types from the root of the project and converts Chargebee methods that return a request to simple promises.

Currently Supported

  • Customers
    • getCustomerById
  • Subscriptions
    • getSubscriptions
    • getSubscriptionsByCustomerId
    • updateSubscription
  • Invoices:
    • getInvoiceById

Install

# Yarn
yarn add @pliancy/chargebee-sdk

# npm
npm install @pliancy/chargebee-sdk

Usage

// environment defaults to dev. Pass 'prod' as the second argument for producton
import { Invoice } from '@pliancy/chargebee-sdk'

const chargebee = new ChargeBee({ site: 'mySite', api_key: 'myApiKey' })
const invoice: Invoice = await chargebee.getInvoiceById(1)

Test

yarn test
# or
yarn test.watch

Test Coverage

yarn test.cov
# then
yarn cov.view

Dependencies (2)

Dev Dependencies (11)

Package Sidebar

Install

npm i @pliancy/chargebee-sdk

Weekly Downloads

0

Version

0.1.0

License

UNLICENSED

Unpacked Size

10.7 kB

Total Files

13

Last publish

Collaborators

  • santese
  • pliancy-bot
  • justin.pliancy