Skip to content

Commit

Permalink
Merge branch 'main' into DE-573-e2e-invoice-proforma
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-blacutt-maxio authored and Alberto Blacutt committed Feb 16, 2024
2 parents ce4aa28 + bb56bd8 commit e1a27a2
Show file tree
Hide file tree
Showing 44 changed files with 610 additions and 434 deletions.
72 changes: 36 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ It is up to API consumers to parse the string into a decimal number representati
Run the following command from your project directory to install the package from npm:

```ts
npm install @maxio-com/advanced-billing-sdk@1.0.0
npm install @maxio-com/advanced-billing-sdk@1.0.1
```

For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@1.0.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/1.0.0).
For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@1.0.1 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/1.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/1.0.0/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/1.0.1/doc/client.md)

The following parameters are configurable for the API Client:

Expand Down Expand Up @@ -342,40 +342,40 @@ This API uses `Basic Authentication`.

## List of APIs

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

## Classes Documentation

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

30 changes: 24 additions & 6 deletions doc/controllers/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,12 @@ try {
}
```

## Errors

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 422 | Unprocessable Entity | [`ErrorListResponseError`](../../doc/models/error-list-response-error.md) |


# Record Payment for Multiple Invoices

Expand Down Expand Up @@ -1779,7 +1785,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": 81,
"price_point_id": 165
"price_point_id": 165,
"billing_schedule_item_id": null,
"custom_item": false
},
{
"uid": "cnli_8kjttvjcjx8b4",
Expand All @@ -1797,7 +1805,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": null,
"price_point_id": null
"price_point_id": null,
"billing_schedule_item_id": null,
"custom_item": false
},
{
"uid": "cnli_8kjttvjknzhx7",
Expand All @@ -1815,7 +1825,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": 78,
"price_point_id": null
"price_point_id": null,
"billing_schedule_item_id": null,
"custom_item": false
},
{
"uid": "cnli_8kjttvjnmh25w",
Expand All @@ -1833,7 +1845,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": 79,
"price_point_id": null
"price_point_id": null,
"billing_schedule_item_id": null,
"custom_item": false
},
{
"uid": "cnli_8kjttvjqn86kc",
Expand All @@ -1851,7 +1865,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": 80,
"price_point_id": null
"price_point_id": null,
"billing_schedule_item_id": null,
"custom_item": false
},
{
"uid": "cnli_8kjttvjtxxbdd",
Expand All @@ -1869,7 +1885,9 @@ try {
"product_id": 85,
"product_version": 1,
"component_id": 81,
"price_point_id": 165
"price_point_id": 165,
"billing_schedule_item_id": null,
"custom_item": false
}
],
"discounts": [
Expand Down
10 changes: 5 additions & 5 deletions doc/controllers/proforma-invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Proforma invoices are only available on Relationship Invoicing sites.

```ts
async readProformaInvoice(
proformaInvoiceUid: number,
proformaInvoiceUid: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<ProformaInvoice>>
```
Expand All @@ -148,7 +148,7 @@ async readProformaInvoice(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `proformaInvoiceUid` | `number` | Template, Required | The uid of the proforma invoice |
| `proformaInvoiceUid` | `string` | Template, Required | The uid of the proforma invoice |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type
Expand All @@ -158,7 +158,7 @@ async readProformaInvoice(
## Example Usage

```ts
const proformaInvoiceUid = 242;
const proformaInvoiceUid = 'proforma_invoice_uid4';

try {
// @ts-expect-error: unused variables
Expand Down Expand Up @@ -259,7 +259,7 @@ async listProformaInvoices(
payments?: boolean,
customFields?: boolean,
requestOptions?: RequestOptions
): Promise<ApiResponse<ProformaInvoice[]>>
): Promise<ApiResponse<ListProformaInvoicesResponse>>
```

## Parameters
Expand All @@ -283,7 +283,7 @@ async listProformaInvoices(

## Response Type

[`ProformaInvoice[]`](../../doc/models/proforma-invoice.md)
[`ListProformaInvoicesResponse`](../../doc/models/list-proforma-invoices-response.md)

## Example Usage

Expand Down
3 changes: 2 additions & 1 deletion doc/models/create-invoice-payment-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"amount": "String9",
"memo": "memo0",
"method": "ach",
"details": "details6"
"details": "details6",
"payment_profile_id": 42
},
"type": "external"
}
Expand Down
4 changes: 3 additions & 1 deletion doc/models/create-invoice-payment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
| `memo` | `string \| undefined` | Optional | A description to be attached to the payment. |
| `method` | [`InvoicePaymentMethodType \| undefined`](../../doc/models/invoice-payment-method-type.md) | Optional | The type of payment method used. Defaults to other. |
| `details` | `string \| undefined` | Optional | Additional information related to the payment method (eg. Check #) |
| `paymentProfileId` | `number \| undefined` | Optional | The ID of the payment profile to be used for the payment. |

## Example (as JSON)

Expand All @@ -21,7 +22,8 @@
"amount": "String9",
"memo": "memo0",
"method": "cash",
"details": "details6"
"details": "details6",
"payment_profile_id": 122
}
```

2 changes: 2 additions & 0 deletions doc/models/credit-note-line-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
| `productVersion` | `number \| undefined` | Optional | The version of the product being credited. |
| `componentId` | `number \| null \| undefined` | Optional | The ID of the component being credited. Will be `nil` for non-component credits. |
| `pricePointId` | `number \| null \| undefined` | Optional | The price point ID of the component being credited. Will be `nil` for non-component credits. |
| `billingScheduleItemId` | `number \| null \| undefined` | Optional | - |
| `customItem` | `boolean \| undefined` | Optional | - |

## Example (as JSON)

Expand Down
2 changes: 2 additions & 0 deletions doc/models/invoice-refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
| `originalAmount` | `string \| undefined` | Optional | - |
| `appliedAmount` | `string \| undefined` | Optional | - |
| `gatewayTransactionId` | `string \| null \| undefined` | Optional | The transaction ID for the refund as returned from the payment gateway |
| `gatewayUsed` | `string \| undefined` | Optional | - |
| `gatewayHandle` | `string \| null \| undefined` | Optional | - |

## Example (as JSON)

Expand Down
27 changes: 27 additions & 0 deletions doc/models/list-proforma-invoices-meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# List Proforma Invoices Meta

## Structure

`ListProformaInvoicesMeta`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `totalCount` | `number \| undefined` | Optional | - |
| `currentPage` | `number \| undefined` | Optional | - |
| `totalPages` | `number \| undefined` | Optional | - |
| `statusCode` | `number \| undefined` | Optional | - |

## Example (as JSON)

```json
{
"total_count": 226,
"current_page": 202,
"total_pages": 214,
"status_code": 244
}
```

50 changes: 50 additions & 0 deletions doc/models/list-proforma-invoices-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

# List Proforma Invoices Response

## Structure

`ListProformaInvoicesResponse`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `proformaInvoices` | [`ProformaInvoice[] \| undefined`](../../doc/models/proforma-invoice.md) | Optional | - |
| `meta` | [`ListProformaInvoicesMeta \| undefined`](../../doc/models/list-proforma-invoices-meta.md) | Optional | - |

## Example (as JSON)

```json
{
"proforma_invoices": [
{
"uid": "uid0",
"site_id": 140,
"customer_id": 252,
"subscription_id": 68,
"number": 56
},
{
"uid": "uid0",
"site_id": 140,
"customer_id": 252,
"subscription_id": 68,
"number": 56
},
{
"uid": "uid0",
"site_id": 140,
"customer_id": 252,
"subscription_id": 68,
"number": 56
}
],
"meta": {
"total_count": 150,
"current_page": 126,
"total_pages": 138,
"status_code": 168
}
}
```

6 changes: 3 additions & 3 deletions doc/models/proforma-invoice-preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
| `siteId` | `number \| undefined` | Optional | - |
| `customerId` | `number \| undefined` | Optional | - |
| `subscriptionId` | `number \| undefined` | Optional | - |
| `number` | `string \| undefined` | Optional | - |
| `sequenceNumber` | `number \| undefined` | Optional | - |
| `number` | `string \| null \| undefined` | Optional | - |
| `sequenceNumber` | `number \| null \| undefined` | Optional | - |
| `createdAt` | `string \| undefined` | Optional | **Constraints**: *Minimum Length*: `1` |
| `deliveryDate` | `string \| undefined` | Optional | **Constraints**: *Minimum Length*: `1` |
| `status` | `string \| undefined` | Optional | **Constraints**: *Minimum Length*: `1` |
Expand Down Expand Up @@ -44,7 +44,7 @@
| `credits` | [`ProformaInvoiceCredit[] \| undefined`](../../doc/models/proforma-invoice-credit.md) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* |
| `payments` | [`ProformaInvoicePayment[] \| undefined`](../../doc/models/proforma-invoice-payment.md) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* |
| `customFields` | [`InvoiceCustomField[] \| undefined`](../../doc/models/invoice-custom-field.md) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* |
| `publicUrl` | `string \| undefined` | Optional | - |
| `publicUrl` | `string \| null \| undefined` | Optional | - |

## Example (as JSON)

Expand Down
6 changes: 3 additions & 3 deletions doc/models/proforma-invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
| `siteId` | `number \| undefined` | Optional | - |
| `customerId` | `number \| undefined` | Optional | - |
| `subscriptionId` | `number \| undefined` | Optional | - |
| `number` | `number \| undefined` | Optional | - |
| `sequenceNumber` | `number \| undefined` | Optional | - |
| `number` | `number \| null \| undefined` | Optional | - |
| `sequenceNumber` | `number \| null \| undefined` | Optional | - |
| `createdAt` | `string \| undefined` | Optional | - |
| `deliveryDate` | `string \| undefined` | Optional | - |
| `status` | `string \| undefined` | Optional | - |
Expand Down Expand Up @@ -44,7 +44,7 @@
| `credits` | [`ProformaInvoiceCredit[] \| undefined`](../../doc/models/proforma-invoice-credit.md) | Optional | - |
| `payments` | [`ProformaInvoicePayment[] \| undefined`](../../doc/models/proforma-invoice-payment.md) | Optional | - |
| `customFields` | [`InvoiceCustomField[] \| undefined`](../../doc/models/invoice-custom-field.md) | Optional | - |
| `publicUrl` | `string \| undefined` | Optional | - |
| `publicUrl` | `string \| null \| undefined` | Optional | - |

## Example (as JSON)

Expand Down
3 changes: 2 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
],
"contributors": [],
"dependencies": {
"advanced-billing-sdk": "../"
"advanced-billing-sdk": "../",
"uid": "^2.0.2"
}
}
Loading

0 comments on commit e1a27a2

Please sign in to comment.