Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/orb-ts
A typescript SDK for accessing the orb-ts API.
https://github.com/speakeasy-sdks/orb-ts
Last synced: 2 days ago
JSON representation
A typescript SDK for accessing the orb-ts API.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/orb-ts
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-04-04T10:44:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:19:44.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:48.609Z (6 months ago)
- Language: TypeScript
- Size: 443 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Typescript SDK
The modern pricing platform to bill for seats, consumption, and everything in between.
## SDK Installation
### NPM
```bash
npm add https://github.com/speakeasy-sdks/orb-ts
```### Yarn
```bash
yarn add https://github.com/speakeasy-sdks/orb-ts
```## SDK Example Usage
```typescript
import {
PostCustomersRequestBody,
PostCustomersResponse,
PostCustomersRequestBodyPaymentProviderEnum,
} from "Orb/dist/sdk/models/operations";import { AxiosError } from "axios";
import { SDK } from "Orb";
const sdk = new SDK({
security: {
bearerAuth: "Bearer YOUR_BEARER_TOKEN_HERE",
},
});const req: PostCustomersRequestBody = {
billingAddress: {
city: "Laruecester",
country: "US",
line1: "quibusdam",
line2: "unde",
postalCode: "58466-3428",
state: "ipsa",
},
currency: "delectus",
email: "[email protected]",
externalCustomerId: "iusto",
name: "excepturi",
paymentProvider: PostCustomersRequestBodyPaymentProviderEnum.BillCom,
paymentProviderId: "recusandae",
shippingAddress: {
city: "Belleville",
country: "US",
line1: "quis",
line2: "veritatis",
postalCode: "03897-1889",
state: "molestiae",
},
timezone: "Etc/UTC",
};sdk.customer.create(req).then((res: PostCustomersResponse | AxiosError) => {
// handle response
});
```## Available Resources and Operations
### availability
* `ping` - Check availability
### credits
* `create` - Add credit ledger entry
* `getCredits` - Retrieve credit balance
* `getCreditsLedger` - View credits ledger### customer
* `create` - Create customer
* `get` - Retrieve a customer
* `getBalance` - Get customer balance transactions
* `getByExternalId` - Retrieve a customer by external ID
* `getCosts` - View customer costs
* `getCostsByExternalId` - View customer costs by external customer ID
* `list` - List customers
* `update` - Update customer
* `updateByExternalId` - Update a customer by external ID
* `updateUsage` - Amend customer usage
* `updateUsageByExternalId` - Amend customer usage by external ID### event
* `deprecate` - Deprecate single event
* `ingest` - Ingest events
* `search` - Search events
* `update` - Amend single event### invoice
* `get` - Retrieve an Invoice
* `getUpcoming` - Retrieve upcoming invoice
* `list` - List invoices### plan
* `get` - Retrieve a plan
### subscription
* `cancel` - Cancel subscription
* `changeSchedule` - Schedule plan change
* `create` - Create subscription
* `get` - Retrieve a subscription
* `getCost` - View subscription costs
* `getSchedule` - View subscription schedule
* `getUsage` - View subscription usage
* `list` - List subscriptions
* `unschedule` - Unschedule pending plan changes### Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.### Contributions
While we value open-source contributions to this SDK, this library is generated programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)