repzo-chargebee

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

Readme

Keywords

none

Package Sidebar

Install

npm i repzo-chargebee

Weekly Downloads

1

Version

0.1.0

License

UNLICENSED

Unpacked Size

12.9 kB

Total Files

13

Last publish

Collaborators

  • mkhamis