Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
87 changes: 44 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ curl -u <api_key>:x -H Accept:application/json -H Content-Type:application/json
Run the following command from your project directory to install the package from npm:

```bash
npm install @maxio-com/[email protected].0
npm install @maxio-com/[email protected].1
```

For additional package details, see the [Npm page for the @maxio-com/[email protected].0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/7.0.0).
For additional package details, see the [Npm page for the @maxio-com/[email protected].1 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/7.0.1).

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/client.md)

The following parameters are configurable for the API Client:

Expand All @@ -45,9 +45,9 @@ The following parameters are configurable for the API Client:
| site | `string` | The subdomain for your Advanced Billing site.<br>*Default*: `'subdomain'` |
| environment | `Environment` | The API environment. <br> **Default: `Environment.US`** |
| timeout | `number` | Timeout for API calls.<br>*Default*: `120000` |
| httpClientOptions | [`Partial<HttpClientOptions>`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/http-client-options.md) | Stable configurable http client options. |
| httpClientOptions | [`Partial<HttpClientOptions>`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/http-client-options.md) | Stable configurable http client options. |
| unstableHttpClientOptions | `any` | Unstable configurable http client options. |
| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/auth/basic-authentication.md) | The credential object for basicAuth |
| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/auth/basic-authentication.md) | The credential object for basicAuth |

The API client can be initialized as follows:

Expand Down Expand Up @@ -80,56 +80,57 @@ The SDK can be configured to use a different environment for making API calls. A

This API uses the following authentication schemes.

* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/auth/basic-authentication.md)
* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/auth/basic-authentication.md)

## List of APIs

* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/api-exports.md)
* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/advance-invoice.md)
* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/billing-portal.md)
* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/component-price-points.md)
* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/payment-profiles.md)
* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/product-families.md)
* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/product-price-points.md)
* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md)
* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/reason-codes.md)
* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/referral-codes.md)
* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/sales-commissions.md)
* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-components.md)
* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-notes.md)
* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-products.md)
* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscription-status.md)
* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/coupons.md)
* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/components.md)
* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/customers.md)
* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/events.md)
* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/insights.md)
* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/invoices.md)
* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/offers.md)
* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/products.md)
* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/sites.md)
* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/subscriptions.md)
* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/controllers/webhooks.md)
* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/api-exports.md)
* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/advance-invoice.md)
* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/billing-portal.md)
* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/component-price-points.md)
* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/payment-profiles.md)
* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/product-families.md)
* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/product-price-points.md)
* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md)
* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/reason-codes.md)
* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/referral-codes.md)
* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/sales-commissions.md)
* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-components.md)
* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-notes.md)
* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-products.md)
* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscription-status.md)
* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/coupons.md)
* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/components.md)
* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/customers.md)
* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/events.md)
* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/insights.md)
* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/invoices.md)
* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/offers.md)
* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/products.md)
* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/sites.md)
* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/subscriptions.md)
* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/controllers/webhooks.md)

## SDK Infrastructure

### Configuration

* [HttpClientOptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/http-client-options.md)
* [RetryConfiguration](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/retry-configuration.md)
* [HttpClientOptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/http-client-options.md)
* [RetryConfiguration](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/retry-configuration.md)
* [ProxySettings](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/proxy-settings.md)

### HTTP

* [HttpRequest](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/http-request.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/http-request.md)

### Utilities

* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/api-response.md)
* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.0/doc/api-error.md)
* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/api-response.md)
* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/7.0.1/doc/api-error.md)

2 changes: 2 additions & 0 deletions doc/auth/basic-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Documentation for accessing and setting credentials for BasicAuth.
You must provide credentials in the client as shown in the following code snippet.

```ts
import { Client } from '@maxio-com/advanced-billing-sdk';

const client = new Client({
basicAuthCredentials: {
username: 'BasicAuthUserName',
Expand Down
41 changes: 0 additions & 41 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,44 +28,3 @@ const client = new Client({
});
```

## Maxio Advanced Billing Client

The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.

## Controllers

| Name | Description |
| --- | --- |
| aPIExports | Gets APIExportsController |
| advanceInvoice | Gets AdvanceInvoiceController |
| billingPortal | Gets BillingPortalController |
| coupons | Gets CouponsController |
| components | Gets ComponentsController |
| componentPricePoints | Gets ComponentPricePointsController |
| customers | Gets CustomersController |
| customFields | Gets CustomFieldsController |
| events | Gets EventsController |
| eventsBasedBillingSegments | Gets EventsBasedBillingSegmentsController |
| insights | Gets InsightsController |
| invoices | Gets InvoicesController |
| offers | Gets OffersController |
| paymentProfiles | Gets PaymentProfilesController |
| productFamilies | Gets ProductFamiliesController |
| products | Gets ProductsController |
| productPricePoints | Gets ProductPricePointsController |
| proformaInvoices | Gets ProformaInvoicesController |
| reasonCodes | Gets ReasonCodesController |
| referralCodes | Gets ReferralCodesController |
| salesCommissions | Gets SalesCommissionsController |
| sites | Gets SitesController |
| subscriptions | Gets SubscriptionsController |
| subscriptionComponents | Gets SubscriptionComponentsController |
| subscriptionGroups | Gets SubscriptionGroupsController |
| subscriptionGroupInvoiceAccount | Gets SubscriptionGroupInvoiceAccountController |
| subscriptionGroupStatus | Gets SubscriptionGroupStatusController |
| subscriptionInvoiceAccount | Gets SubscriptionInvoiceAccountController |
| subscriptionNotes | Gets SubscriptionNotesController |
| subscriptionProducts | Gets SubscriptionProductsController |
| subscriptionStatus | Gets SubscriptionStatusController |
| webhooks | Gets WebhooksController |

8 changes: 5 additions & 3 deletions doc/controllers/component-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ try {

# Create Component Price Point

This endpoint can be used to create a new price point for an existing component.
Creates a price point for an existing component.

```ts
async createComponentPricePoint(
Expand Down Expand Up @@ -149,6 +149,7 @@ const body: CreateComponentPricePointRequest = {
{
startingQuantity: '101',
unitPrice: '4.00',
endingQuantity: '200',
}
],
handle: 'wholesale-handle',
Expand Down Expand Up @@ -225,10 +226,11 @@ This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The
## Example Usage

```ts
const collect = {Liquid error: Value cannot be null. (Parameter 'key')
const collect = {
componentId: 222,
page: 2,
perPage: 50
perPage: 50,
filterType: Liquid error: Value cannot be null. (Parameter 'key')
}

try {
Expand Down
4 changes: 2 additions & 2 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,9 @@ try {

# Read Component

This request will return information regarding a component from a specific product family.
Returns information regarding a component from a specific product family.

You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`.
You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`.

```ts
async readComponent(
Expand Down
39 changes: 38 additions & 1 deletion doc/controllers/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ try {

# Read Customer

This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID.
Retrieves the Customer properties by Advanced Billing-generated Customer ID.

```ts
async readCustomer(
Expand Down Expand Up @@ -349,6 +349,43 @@ try {
}
```

## Example Response *(as JSON)*

```json
{
"customer": {
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
"cc_emails": "[email protected]",
"organization": "ABC, Inc.",
"reference": "1234567890",
"id": 88833369,
"created_at": "2025-05-08T11:39:18-04:00",
"updated_at": "2025-05-08T11:39:18-04:00",
"address": "123 Main Street",
"address_2": "Unit 10",
"city": "Anytown",
"state": "MA",
"state_name": "Massachusetts",
"zip": "02120",
"country": "US",
"country_name": "United States",
"phone": "555-555-1212",
"verified": false,
"portal_customer_created_at": null,
"portal_invite_last_sent_at": null,
"portal_invite_last_accepted_at": null,
"tax_exempt": false,
"vat_number": null,
"parent_id": null,
"locale": "es-MX",
"salesforce_id": null,
"default_auto_renewal_profile_id": null
}
}
```


# Update Customer

Expand Down
10 changes: 5 additions & 5 deletions doc/controllers/payment-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ For more information on GoCardless, please view the following resources:

+ [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless)

+ [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway)
+ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ)

+ [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway)
+ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV)

### GoCardless with Local Bank Details

Expand Down Expand Up @@ -170,9 +170,9 @@ For more information on Stripe SEPA Direct Debit, please view the following reso

+ [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit)

+ [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)
+ [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5)

+ [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway)
+ [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7)

### Stripe SEPA Direct Debit Payment Profiles

Expand Down Expand Up @@ -1155,7 +1155,7 @@ One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Author

You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint.

To obtain a One Time Token you have to use [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview).
To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0).

```ts
async readOneTimeToken(
Expand Down
5 changes: 3 additions & 2 deletions doc/controllers/product-price-points.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The
## Example Usage

```ts
const collect = {Liquid error: Value cannot be null. (Parameter 'key')
const collect = {
productId: 124,
page: 2,
perPage: 10
perPage: 10,
filterType: Liquid error: Value cannot be null. (Parameter 'key')
}

try {
Expand Down
Loading