@equisoft/billing-sdk@3.4.0
A TypeScript SDK client for the .. API.
Usage
First, install the SDK from npm.
npm install @equisoft/billing-sdk --save
Next, try it out.
import {
Configuration,
ChargebeeV1Api,
} from '@equisoft/billing-sdk';
import type { HandleWebhookRequest } from '@equisoft/billing-sdk';
async function example() {
console.log("🚀 Testing @equisoft/billing-sdk SDK...");
const api = new ChargebeeV1Api();
const body = {
key: key_example,
v1ChargebeeWebhookEvent: ...,
} satisfies HandleWebhookRequest;
try {
const data = await api.handleWebhook(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
example().catch(console.error);
Documentation
API Endpoints
All URIs are relative to http://../..
| ChargebeeV1Api | handleWebhook | POST /v1/chargebee/webhook/{key} | Entry point for Chargebee webhooks |
| DistributorV1Api | getDistributor | GET /v1/distributors/{code} | Get billing information about a distributor |
| DistributorV1Api | listDistributors | GET /v1/distributors | List all available distributors |
| OrganizationV1Api | collectChargebeeV1Payment | POST /v1/organizations/{uuid}/chargebeeV1Billing/collectPayment | Collect all CHARGEBEE_V1 unpaid invoices for the organization |
| OrganizationV1Api | createChargebeeV1PortalSession | POST /v1/organizations/{uuid}/chargebeeV1PortalSession | Create a Chargebee V1 portal session for the organization |
| OrganizationV1Api | createOrUpdateSubscription | POST /v1/organizations/{uuid}/chargebeeV1Billing/subscription | Create or Update Chargebee v1 subscription |
| OrganizationV1Api | getOrganization | GET /v1/organizations/{uuid} | Get billing information about an organization |
| OrganizationV1Api | getOrganizationStatus | GET /v1/organizations/{uuid}/status | Get detailed billing status about an organization |
| OrganizationV1Api | getOrganizationUsers | GET /v1/organizations/{uuid}/users | Get billing users info for an organization |
| OrganizationV1Api | setChargebeeV1Billing | PUT /v1/organizations/{uuid}/chargebeeV1Billing | Set Chargebee V1 Billing for the organization |
| OrganizationV1Api | setDistributor | PUT /v1/organizations/{uuid}/distributor | Set the distributor for an organization |
| OrganizationV1Api | setManualBilling | PUT /v1/organizations/{uuid}/manualBilling | Set Manual Billing for the organization |
| OrganizationV1Api | setNonBillableBilling | PUT /v1/organizations/{uuid}/nonBillableBilling | Set Non-Billable Billing for the organization |
| OrganizationV1Api | setPayorUserId | PUT /v1/organizations/{uuid}/chargebeeV1Billing/payor | Set the payor user for Chargebee V1 billing |
| OrganizationV1Api | unsetBilling | DELETE /v1/organizations/{uuid}/billing | Unset billing for the organization |
| OrganizationV1Api | unsetDistributor | DELETE /v1/organizations/{uuid}/distributor | Unset the distributor for an organization |
| UserV1Api | getUser | GET /v1/users/{uuid} | Get billing information about a User |
| UserV1Api | getUserStatus | GET /v1/users/{uuid}/status | Get billing status of a user |
| UserV1Api | setBillingProfile | PUT /v1/users/{uuid}/billingProfile | Set the user billing profile |
| UserV1Api | setNonBillable | PUT /v1/users/{uuid}/nonBillable | Set the user non-billable |
| UserV1Api | unsetBillingProfile | DELETE /v1/users/{uuid}/billingProfile | Remove the billing profile of the user |
| UserV1Api | unsetNonBillable | DELETE /v1/users/{uuid}/nonBillable | Remove the non-billable flag on the user |
Models
Authorization
Authentication schemes defined for the API:
OAuth2 accessCode
About
This TypeScript SDK client supports the Fetch API
and is automatically generated by the
OpenAPI Generator project:
- API version:
3.4.0
- Package version:
3.4.0
- Generator version:
7.20.0-equisoft1
- Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
For more information, please visit https://www.equisoft.com/
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed.
After cloning the repository, navigate to the project directory and run:
npm install
npm run build
Publishing
Once you've built the package, you can publish it to npm:
npm publish
License
Proprietary