Skip to content

Commit

Permalink
[DE-1091] Release 6.0.0 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-nedza authored Dec 13, 2024
1 parent 22a6443 commit 2da7694
Show file tree
Hide file tree
Showing 150 changed files with 2,841 additions and 1,828 deletions.
94 changes: 46 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,26 @@ 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:

```ts
npm install @maxio-com/advanced-billing-sdk@5.2.0
```bash
npm install @maxio-com/advanced-billing-sdk@6.0.0
```

For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@5.2.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/5.2.0).
For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@6.0.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/6.0.0).

## Initialize the API Client

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

The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `subdomain` | `string` | The subdomain for your Advanced Billing site.<br>*Default*: `'subdomain'` |
| `domain` | `string` | The Advanced Billing server domain.<br>*Default*: `'chargify.com'` |
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.Production`** |
| `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>` | Stable configurable http client options. |
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/5.2.0/doc/auth/basic-authentication.md) | The credential object for basicAuth |
| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/auth/basic-authentication.md) | The credential object for basicAuth |

### HttpClientOptions

Expand Down Expand Up @@ -81,9 +80,8 @@ const client = new Client({
password: 'BasicAuthPassword'
},
timeout: 120000,
environment: Environment.Production,
subdomain: 'subdomain',
domain: 'chargify.com',
environment: Environment.US,
site: 'subdomain',
});
```

Expand All @@ -95,52 +93,52 @@ The SDK can be configured to use a different environment for making API calls. A

| Name | Description |
| --- | --- |
| production | **Default** Production server |
| environment2 | Production server |
| US | **Default** Default Advanced Billing environment hosted in US. Valid for the majority of our customers. |
| EU | Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account. |

## Authorization

This API uses the following authentication schemes.

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

## List of APIs

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

## Classes Documentation

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

10 changes: 4 additions & 6 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `subdomain` | `string` | The subdomain for your Advanced Billing site.<br>*Default*: `'subdomain'` |
| `domain` | `string` | The Advanced Billing server domain.<br>*Default*: `'chargify.com'` |
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.Production`** |
| `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>` | Stable configurable http client options. |
| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |
Expand Down Expand Up @@ -43,9 +42,8 @@ const client = new Client({
password: 'BasicAuthPassword'
},
timeout: 120000,
environment: Environment.Production,
subdomain: 'subdomain',
domain: 'chargify.com',
environment: Environment.US,
site: 'subdomain',
});
```

Expand Down
18 changes: 12 additions & 6 deletions doc/controllers/advance-invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ That said, regeneration of the invoice may be forced with the params `force: tru
We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it.

```ts
async issueAdvanceInvoice( subscriptionId: number,
async issueAdvanceInvoice(
subscriptionId: number,
body?: IssueAdvanceInvoiceRequest,
requestOptions?: RequestOptions): Promise<ApiResponse<Invoice>>
requestOptions?: RequestOptions
): Promise<ApiResponse<Invoice>>
```

## Parameters
Expand Down Expand Up @@ -77,8 +79,10 @@ try {
Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle.

```ts
async readAdvanceInvoice( subscriptionId: number,
requestOptions?: RequestOptions): Promise<ApiResponse<Invoice>>
async readAdvanceInvoice(
subscriptionId: number,
requestOptions?: RequestOptions
): Promise<ApiResponse<Invoice>>
```

## Parameters
Expand Down Expand Up @@ -122,9 +126,11 @@ Void a subscription's existing advance invoice. Once voided, it can later be reg
A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](../../doc/models/invoice.md).

```ts
async voidAdvanceInvoice( subscriptionId: number,
async voidAdvanceInvoice(
subscriptionId: number,
body?: VoidInvoiceRequest,
requestOptions?: RequestOptions): Promise<ApiResponse<Invoice>>
requestOptions?: RequestOptions
): Promise<ApiResponse<Invoice>>
```

## Parameters
Expand Down
48 changes: 33 additions & 15 deletions doc/controllers/api-exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ This API returns an array of exported proforma invoices for a provided `batch_id
Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`.

```ts
async listExportedProformaInvoices( batchId: string,
async listExportedProformaInvoices(
batchId: string,
perPage?: number,
page?: number,
requestOptions?: RequestOptions): Promise<ApiResponse<ProformaInvoice[]>>
requestOptions?: RequestOptions
): Promise<ApiResponse<ProformaInvoice[]>>
```

## Parameters
Expand Down Expand Up @@ -82,10 +84,12 @@ This API returns an array of exported invoices for a provided `batch_id`. Pay cl
Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`.

```ts
async listExportedInvoices( batchId: string,
async listExportedInvoices(
batchId: string,
perPage?: number,
page?: number,
requestOptions?: RequestOptions): Promise<ApiResponse<Invoice[]>>
requestOptions?: RequestOptions
): Promise<ApiResponse<Invoice[]>>
```

## Parameters
Expand Down Expand Up @@ -136,10 +140,12 @@ This API returns an array of exported subscriptions for a provided `batch_id`. P
Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`.

```ts
async listExportedSubscriptions( batchId: string,
async listExportedSubscriptions(
batchId: string,
perPage?: number,
page?: number,
requestOptions?: RequestOptions): Promise<ApiResponse<Subscription[]>>
requestOptions?: RequestOptions
): Promise<ApiResponse<Subscription[]>>
```

## Parameters
Expand Down Expand Up @@ -190,7 +196,9 @@ This API creates a proforma invoices export and returns a batchjob object.
It is only available for Relationship Invoicing architecture.

```ts
async exportProformaInvoices(requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async exportProformaInvoices(
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down Expand Up @@ -231,7 +239,9 @@ try {
This API creates an invoices export and returns a batchjob object.

```ts
async exportInvoices(requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async exportInvoices(
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down Expand Up @@ -272,7 +282,9 @@ try {
This API creates a subscriptions export and returns a batchjob object.

```ts
async exportSubscriptions(requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async exportSubscriptions(
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down Expand Up @@ -312,8 +324,10 @@ try {
This API returns a batchjob object for proforma invoices export.

```ts
async readProformaInvoicesExport( batchId: string,
requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async readProformaInvoicesExport(
batchId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down Expand Up @@ -356,8 +370,10 @@ try {
This API returns a batchjob object for invoices export.

```ts
async readInvoicesExport( batchId: string,
requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async readInvoicesExport(
batchId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down Expand Up @@ -400,8 +416,10 @@ try {
This API returns a batchjob object for subscriptions export.

```ts
async readSubscriptionsExport( batchId: string,
requestOptions?: RequestOptions): Promise<ApiResponse<BatchJobResponse>>
async readSubscriptionsExport(
batchId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<BatchJobResponse>>
```

## Parameters
Expand Down
24 changes: 16 additions & 8 deletions doc/controllers/billing-portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ If you need to provide your customer their Management URL through other means, y
In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Advanced Billing every time.

```ts
async enableBillingPortalForCustomer( customerId: number,
async enableBillingPortalForCustomer(
customerId: number,
autoInvite?: AutoInvite,
requestOptions?: RequestOptions): Promise<ApiResponse<CustomerResponse>>
requestOptions?: RequestOptions
): Promise<ApiResponse<CustomerResponse>>
```

## Parameters
Expand Down Expand Up @@ -89,8 +91,10 @@ This method will provide to the API user the exact URL required for a subscriber
+ You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you will be blocked from further Management URL requests (with a response code `429`)

```ts
async readBillingPortalLink( customerId: number,
requestOptions?: RequestOptions): Promise<ApiResponse<PortalManagementLink>>
async readBillingPortalLink(
customerId: number,
requestOptions?: RequestOptions
): Promise<ApiResponse<PortalManagementLink>>
```

## Parameters
Expand Down Expand Up @@ -159,8 +163,10 @@ If you attempt to resend an invitation when the Customer does not exist a Custom
This endpoint will only return a JSON response.

```ts
async resendBillingPortalInvitation( customerId: number,
requestOptions?: RequestOptions): Promise<ApiResponse<ResentInvitation>>
async resendBillingPortalInvitation(
customerId: number,
requestOptions?: RequestOptions
): Promise<ApiResponse<ResentInvitation>>
```

## Parameters
Expand Down Expand Up @@ -221,8 +227,10 @@ If you attempt to revoke an invitation when the Billing Portal is already disabl
This endpoint will only return a JSON response.

```ts
async revokeBillingPortalAccess( customerId: number,
requestOptions?: RequestOptions): Promise<ApiResponse<RevokedInvitation>>
async revokeBillingPortalAccess(
customerId: number,
requestOptions?: RequestOptions
): Promise<ApiResponse<RevokedInvitation>>
```

## Parameters
Expand Down
Loading

0 comments on commit 2da7694

Please sign in to comment.