Skip to content

Commit

Permalink
Merge branch 'main' into revert-changes-from-DE-597
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-blacutt-maxio authored Dec 14, 2023
2 parents 1e87888 + c5755cd commit fdf1dbf
Show file tree
Hide file tree
Showing 169 changed files with 1,670 additions and 644 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ 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 advanced-billing-sdk@0.0.3
npm install @maxio-com/advanced-billing-sdk@0.0.3
```

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

## Initialize the API Client

Expand Down
129 changes: 98 additions & 31 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ async archiveComponent(
productFamilyId: number,
componentId: string,
requestOptions?: RequestOptions
): Promise<ApiResponse<ComponentResponse>>
): Promise<ApiResponse<Component>>
```

## Parameters
Expand All @@ -430,7 +430,7 @@ async archiveComponent(

## Response Type

[`ComponentResponse`](../../doc/models/component-response.md)
[`Component`](../../doc/models/component.md)

## Example Usage

Expand Down Expand Up @@ -462,27 +462,25 @@ try {

```json
{
"component": {
"id": 25407138,
"name": "cillum aute",
"pricing_scheme": "in incididu",
"unit_name": "nulla in",
"unit_price": "Excepteur veniam",
"product_family_id": -56705047,
"kind": "prepaid_usage_component",
"archived": true,
"taxable": false,
"description": "reprehenderit laborum qui fugiat",
"default_price_point_id": -64328176,
"price_point_count": 15252407,
"price_points_url": "dolor mollit consequat",
"tax_code": "ea nisi",
"recurring": false,
"created_at": "dolor qui deserunt tempor",
"default_price_point_name": "cupidatat Lorem non aliqua",
"product_family_name": "do elit",
"hide_date_range_on_invoice": false
}
"id": 25407138,
"name": "cillum aute",
"pricing_scheme": "stairstep",
"unit_name": "nulla in",
"unit_price": "Excepteur veniam",
"product_family_id": -56705047,
"kind": "prepaid_usage_component",
"archived": true,
"taxable": false,
"description": "reprehenderit laborum qui fugiat",
"default_price_point_id": -64328176,
"price_point_count": 15252407,
"price_points_url": "dolor mollit consequat",
"tax_code": "ea nisi",
"recurring": false,
"created_at": "dolor qui deserunt tempor",
"default_price_point_name": "cupidatat Lorem non aliqua",
"product_family_name": "do elit",
"hide_date_range_on_invoice": false
}
```

Expand Down Expand Up @@ -665,7 +663,7 @@ async updateComponent(
componentId: string,
body?: UpdateComponentRequest,
requestOptions?: RequestOptions
): Promise<ApiResponse<void>>
): Promise<ApiResponse<ComponentResponse>>
```

## Parameters
Expand All @@ -678,7 +676,7 @@ async updateComponent(

## Response Type

`void`
[`ComponentResponse`](../../doc/models/component-response.md)

## Example Usage

Expand Down Expand Up @@ -710,6 +708,42 @@ try {
}
```

## Example Response *(as JSON)*

```json
{
"component": {
"id": 399853,
"name": "Annual Support Services",
"pricing_scheme": null,
"unit_name": "on/off",
"unit_price": "100.0",
"product_family_id": 997233,
"price_per_unit_in_cents": null,
"kind": "on_off_component",
"archived": false,
"taxable": true,
"description": "Prepay for support services",
"default_price_point_id": 121003,
"price_point_count": 4,
"price_points_url": "https://general-goods.chargify.com/components/399853/price_points",
"tax_code": "D0000000",
"recurring": true,
"upgrade_charge": null,
"downgrade_credit": null,
"created_at": "2019-08-02T05:54:53-04:00",
"default_price_point_name": "Original",
"product_family_name": "Chargify"
}
}
```

## Errors

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


# Update Default Price Point for Component

Expand All @@ -724,7 +758,7 @@ async updateDefaultPricePointForComponent(
componentId: number,
pricePointId: number,
requestOptions?: RequestOptions
): Promise<ApiResponse<void>>
): Promise<ApiResponse<ComponentResponse>>
```

## Parameters
Expand All @@ -737,7 +771,7 @@ async updateDefaultPricePointForComponent(

## Response Type

`void`
[`ComponentResponse`](../../doc/models/component-response.md)

## Example Usage

Expand Down Expand Up @@ -765,6 +799,39 @@ try {
}
```

## Example Response *(as JSON)*

```json
{
"component": {
"id": 292609,
"name": "Text messages",
"pricing_scheme": "stairstep",
"unit_name": "text message",
"unit_price": null,
"product_family_id": 528484,
"price_per_unit_in_cents": null,
"kind": "metered_component",
"archived": false,
"taxable": false,
"description": null,
"created_at": "2019-08-02T05:54:53-04:00",
"prices": [
{
"id": 47,
"component_id": 292609,
"starting_quantity": 1,
"ending_quantity": null,
"unit_price": "1.0",
"price_point_id": 173,
"formatted_unit_price": "$1.00"
}
],
"default_price_point_name": "Original"
}
}
```


# List Components for Product Family

Expand Down Expand Up @@ -962,7 +1029,7 @@ const componentId = 222;
const body: CreateComponentPricePointRequest = {
pricePoint: {
name: 'Wholesale',
pricingScheme: 'stairstep',
pricingScheme: PricingScheme.Stairstep,
prices: [
{
startingQuantity: '1',
Expand Down Expand Up @@ -1141,7 +1208,7 @@ const body: CreateComponentPricePointsRequest = {
pricePoints: [
{
name: 'Wholesale',
pricingScheme: 'per_unit',
pricingScheme: PricingScheme.PerUnit,
prices: [
{
startingQuantity: 1,
Expand All @@ -1152,7 +1219,7 @@ const body: CreateComponentPricePointsRequest = {
},
{
name: 'MSRP',
pricingScheme: 'per_unit',
pricingScheme: PricingScheme.PerUnit,
prices: [
{
startingQuantity: 1,
Expand All @@ -1163,7 +1230,7 @@ const body: CreateComponentPricePointsRequest = {
},
{
name: 'Special Pricing',
pricingScheme: 'per_unit',
pricingScheme: PricingScheme.PerUnit,
prices: [
{
startingQuantity: 1,
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/events-based-billing-segments.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const pricePointId = 'price_point_id8';

const body: CreateSegmentRequest = {
segment: {
pricingScheme: 'volume',
pricingScheme: PricingScheme.Volume,
segmentProperty1Value: 'France',
segmentProperty2Value: 'Spain',
prices: [
Expand Down
14 changes: 9 additions & 5 deletions doc/controllers/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ By default, invoices returned on the index will only include totals, not detaile
async listInvoices(
startDate?: string,
endDate?: string,
status?: Status,
status?: InvoiceStatus,
subscriptionId?: number,
subscriptionGroupUid?: string,
page?: number,
Expand Down Expand Up @@ -133,7 +133,7 @@ async listInvoices(
| --- | --- | --- | --- |
| `startDate` | `string \| undefined` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. |
| `endDate` | `string \| undefined` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. |
| `status` | [`Status \| undefined`](../../doc/models/status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided |
| `status` | [`InvoiceStatus \| undefined`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided |
| `subscriptionId` | `number \| undefined` | Query, Optional | The subscription's ID. |
| `subscriptionGroupUid` | `string \| undefined` | Query, Optional | The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. |
| `page` | `number \| undefined` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.<br>Use in query `page=1`.<br>**Default**: `1`<br>**Constraints**: `>= 1` |
Expand Down Expand Up @@ -652,6 +652,10 @@ Exposed event types are:
+ change_invoice_status
+ change_invoice_collection_method
+ remove_payment
+ failed_payment
+ apply_debit_note
+ create_debit_note
+ change_chargeback_status

Invoice events are returned in ascending order.

Expand Down Expand Up @@ -3088,9 +3092,9 @@ try {
"subscription_id": 12801726,
"number": "dolore et ut",
"sequence_number": -84210096,
"issue_date": "in e",
"due_date": "magna elit tempor occaecat amet",
"paid_date": "consectetur elit culpa magna sint",
"issue_date": "2017-01-01",
"due_date": "2017-01-30",
"paid_date": "2017-01-28",
"status": "open",
"collection_method": "Excepteur",
"payment_instructions": "enim officia",
Expand Down
Loading

0 comments on commit fdf1dbf

Please sign in to comment.