Skip to content

Commit

Permalink
Merge branch 'main' of github.com:maxio-com/ab-java-sdk into proforma…
Browse files Browse the repository at this point in the history
…-invoices-tests-2
  • Loading branch information
maciej-nedza committed Mar 1, 2024
2 parents 48f4cfc + 63017ae commit d1090bd
Show file tree
Hide file tree
Showing 489 changed files with 3,212 additions and 1,201 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ The following parameters are configurable for the API Client:
| --- | --- | --- |
| `subdomain` | `String` | The subdomain for your Chargify site.<br>*Default*: `"subdomain"` |
| `domain` | `String` | The Chargify server domain.<br>*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.PRODUCTION`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/doc/http-client-configuration.md) | Http Client Configuration instance. |
| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/1.0.1/basic-authentication.md) | The Credentials Setter for Basic Authentication |

Expand Down
2 changes: 1 addition & 1 deletion doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The following parameters are configurable for the API Client:
| --- | --- | --- |
| `subdomain` | `String` | The subdomain for your Chargify site.<br>*Default*: `"subdomain"` |
| `domain` | `String` | The Chargify server domain.<br>*Default*: `"chargify.com"` |
| `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |
| `environment` | `Environment` | The API environment. <br> **Default: `Environment.PRODUCTION`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | Http Client Configuration instance. |
| `basicAuthCredentials` | [`BasicAuthCredentials`]($a/basic-authentication.md) | The Credentials Setter for Basic Authentication |

Expand Down
27 changes: 21 additions & 6 deletions doc/controllers/proforma-invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,20 @@ By default, proforma invoices returned on the index will only include totals, no

```java
ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices(
final String uid)
final ListSubscriptionGroupProformaInvoicesInput input)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `uid` | `String` | Template, Required | The uid of the subscription group |
| `lineItems` | `Boolean` | Query, Optional | Include line items data |
| `discounts` | `Boolean` | Query, Optional | Include discounts data |
| `taxes` | `Boolean` | Query, Optional | Include taxes data |
| `credits` | `Boolean` | Query, Optional | Include credits data |
| `payments` | `Boolean` | Query, Optional | Include payments data |
| `customFields` | `Boolean` | Query, Optional | Include custom fields data |

## Response Type

Expand All @@ -91,10 +97,19 @@ ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices(
## Example Usage

```java
String uid = "uid0";
ListSubscriptionGroupProformaInvoicesInput listSubscriptionGroupProformaInvoicesInput = new ListSubscriptionGroupProformaInvoicesInput.Builder(
"uid0"
)
.lineItems(false)
.discounts(false)
.taxes(false)
.credits(false)
.payments(false)
.customFields(false)
.build();

try {
ListProformaInvoicesResponse result = proformaInvoicesController.listSubscriptionGroupProformaInvoices(uid);
ListProformaInvoicesResponse result = proformaInvoicesController.listSubscriptionGroupProformaInvoices(listSubscriptionGroupProformaInvoicesInput);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -218,7 +233,7 @@ ListProformaInvoicesResponse listProformaInvoices(
| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription |
| `startDate` | `String` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. |
| `endDate` | `String` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. |
| `status` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided |
| `status` | [`ProformaInvoiceStatus`](../../doc/models/proforma-invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided |
| `page` | `Integer` | 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`. |
| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.<br>Use in query `per_page=200`. |
| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices. |
Expand Down Expand Up @@ -430,15 +445,15 @@ A product and customer first name, last name, and email are the minimum requirem

```java
SignupProformaPreviewResponse previewSignupProformaInvoice(
final String includeNextProformaInvoice,
final CreateSignupProformaPreviewInclude include,
final CreateSubscriptionRequest body)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `includeNextProformaInvoice` | `String` | Query, Optional | Choose to include a proforma invoice preview for the first renewal |
| `include` | [`CreateSignupProformaPreviewInclude`](../../doc/models/create-signup-proforma-preview-include.md) | Query, Optional | Choose to include a proforma invoice preview for the first renewal. Use in query `include=next_proforma_invoice`. |
| `body` | [`CreateSubscriptionRequest`](../../doc/models/create-subscription-request.md) | Body, Optional | - |

## Response Type
Expand Down
58 changes: 37 additions & 21 deletions doc/controllers/subscription-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,51 +195,51 @@ The `price_point` key can take either a:
3. `"_default"` string, which will reset the price point to the component's current default price point.

```java
BulkComponentSPricePointAssignment bulkUpdateSubscriptionComponentsPricePoints(
BulkComponentsPricePointAssignment bulkUpdateSubscriptionComponentsPricePoints(
final int subscriptionId,
final BulkComponentSPricePointAssignment body)
final BulkComponentsPricePointAssignment body)
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription |
| `body` | [`BulkComponentSPricePointAssignment`](../../doc/models/bulk-component-s-price-point-assignment.md) | Body, Optional | - |
| `body` | [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) | Body, Optional | - |

## Response Type

[`BulkComponentSPricePointAssignment`](../../doc/models/bulk-component-s-price-point-assignment.md)
[`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md)

## Example Usage

```java
int subscriptionId = 222;
BulkComponentSPricePointAssignment body = new BulkComponentSPricePointAssignment.Builder()
BulkComponentsPricePointAssignment body = new BulkComponentsPricePointAssignment.Builder()
.components(Arrays.asList(
new ComponentSPricePointAssignment.Builder()
new ComponentPricePointAssignment.Builder()
.componentId(997)
.pricePoint(ComponentSPricePointAssignmentPricePoint.fromNumber(
.pricePoint(ComponentPricePointAssignmentPricePoint.fromNumber(
1022
))
.build(),
new ComponentSPricePointAssignment.Builder()
new ComponentPricePointAssignment.Builder()
.componentId(998)
.pricePoint(ComponentSPricePointAssignmentPricePoint.fromString(
.pricePoint(ComponentPricePointAssignmentPricePoint.fromString(
"wholesale-handle"
))
.build(),
new ComponentSPricePointAssignment.Builder()
new ComponentPricePointAssignment.Builder()
.componentId(999)
.pricePoint(ComponentSPricePointAssignmentPricePoint.fromString(
.pricePoint(ComponentPricePointAssignmentPricePoint.fromString(
"_default"
))
.build()
))
.build();

try {
BulkComponentSPricePointAssignment result = subscriptionComponentsController.bulkUpdateSubscriptionComponentsPricePoints(subscriptionId, body);
BulkComponentsPricePointAssignment result = subscriptionComponentsController.bulkUpdateSubscriptionComponentsPricePoints(subscriptionId, body);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down Expand Up @@ -313,7 +313,7 @@ try {
```json
{
"subscription": {
"id": -80293620,
"id": 80293620,
"state": "active",
"trial_started_at": null,
"trial_ended_at": null,
Expand Down Expand Up @@ -605,14 +605,28 @@ try {
[
{
"allocation": {
"memo": "moving to 7",
"timestamp": "2012-11-20T22:00:37Z",
"quantity": 7,
"previous_quantity": 3,
"component_id": 11960,
"subscription_id": 2585595,
"proration_upgrade_scheme": "no-prorate",
"proration_downgrade_scheme": "no-prorate"
"allocation_id": 2370199,
"component_id": 41028,
"subscription_id": 352827,
"quantity": 10,
"previous_quantity": 0,
"memo": "Recoding component allocation",
"timestamp": "2024-02-28T09:31:05Z",
"proration_upgrade_scheme": "full-price-attempt-capture",
"proration_downgrade_scheme": "no-prorate",
"price_point_id": 2957424,
"price_point_handle": "uuid:03190e20-b84a-013c-ca77-0286551bb34f",
"price_point_name": "Original",
"previous_price_point_id": 2957424,
"component_handle": "test-prepaid-component-4982065948",
"accrue_charge": false,
"upgrade_charge": "full",
"downgrade_credit": "none",
"created_at": "2024-02-28T04:31:05-05:00",
"initiate_dunning": false,
"expires_at": "2024-08-03T20:00:00-04:00",
"used_quantity": 5,
"charge_id": 11586076
}
},
{
Expand Down Expand Up @@ -976,6 +990,7 @@ try {

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 404 | Not Found | `ApiException` |
| 422 | Unprocessable Entity (WebDAV) | [`SubscriptionComponentAllocationErrorException`](../../doc/models/subscription-component-allocation-error-exception.md) |


Expand Down Expand Up @@ -1036,6 +1051,7 @@ try {

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 404 | Not Found | `ApiException` |
| 422 | Unprocessable Entity (WebDAV) | [`SubscriptionComponentAllocationErrorException`](../../doc/models/subscription-component-allocation-error-exception.md) |


Expand Down
3 changes: 3 additions & 0 deletions doc/models/allocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) |
| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.<br>Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) |
| `Payment` | [`AllocationPayment`](../../doc/models/containers/allocation-payment.md) | Optional | This is a container for one-of cases. | AllocationPayment getPayment() | setPayment(AllocationPayment payment) |
| `ExpiresAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) |
| `UsedQuantity` | `Long` | Optional | - | Long getUsedQuantity() | setUsedQuantity(Long usedQuantity) |
| `ChargeId` | `Long` | Optional | - | Long getChargeId() | setChargeId(Long chargeId) |

## Example (as JSON)

Expand Down
26 changes: 0 additions & 26 deletions doc/models/bulk-component-s-price-point-assignment.md

This file was deleted.

26 changes: 26 additions & 0 deletions doc/models/bulk-components-price-point-assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Bulk Components Price Point Assignment

## Structure

`BulkComponentsPricePointAssignment`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Components` | [`List<ComponentPricePointAssignment>`](../../doc/models/component-price-point-assignment.md) | Optional | - | List<ComponentPricePointAssignment> getComponents() | setComponents(List<ComponentPricePointAssignment> components) |

## Example (as JSON)

```json
{
"components": [
{
"component_id": 108,
"price_point": "String5"
}
]
}
```

23 changes: 23 additions & 0 deletions doc/models/component-price-point-assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Component Price Point Assignment

## Structure

`ComponentPricePointAssignment`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `ComponentId` | `Integer` | Optional | - | Integer getComponentId() | setComponentId(Integer componentId) |
| `PricePoint` | [`ComponentPricePointAssignmentPricePoint`](../../doc/models/containers/component-price-point-assignment-price-point.md) | Optional | This is a container for one-of cases. | ComponentPricePointAssignmentPricePoint getPricePoint() | setPricePoint(ComponentPricePointAssignmentPricePoint pricePoint) |

## Example (as JSON)

```json
{
"component_id": 114,
"price_point": "String9"
}
```

23 changes: 0 additions & 23 deletions doc/models/component-s-price-point-assignment.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Component Price Point Assignment Price Point

## Class Name

`ComponentPricePointAssignmentPricePoint`

## Cases

| Type | Factory Method |
| --- | --- |
| `String` | ComponentPricePointAssignmentPricePoint.fromString(String string) |
| `int` | ComponentPricePointAssignmentPricePoint.fromNumber(int number) |

This file was deleted.

19 changes: 19 additions & 0 deletions doc/models/create-signup-proforma-preview-include.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Create Signup Proforma Preview Include

## Enumeration

`CreateSignupProformaPreviewInclude`

## Fields

| Name |
| --- |
| `NextProformaInvoice` |

## Example

```
next_proforma_invoice
```

Loading

0 comments on commit d1090bd

Please sign in to comment.