Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE-248] DE-251 Fixes to spec file & new code generation #3

Merged
merged 4 commits into from
Oct 27, 2023
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
  •  
  •  
  •  
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Here, you can add code to initialize the client library and instantiate a *Contr

## Initialize the API Client

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

The following parameters are configurable for the API Client:

Expand All @@ -345,7 +345,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`** |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-client-configuration.md) | Http Client Configuration instance. |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-client-configuration.md) | Http Client Configuration instance. |
| `basicAuthUserName` | `String` | The username to use with basic authentication |
| `basicAuthPassword` | `String` | The password to use with basic authentication |

Expand Down Expand Up @@ -379,49 +379,49 @@ This API uses `Basic Authentication`.

## List of APIs

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

## Classes Documentation

* [Utility Classes](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/utility-classes.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-request.md)
* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-response.md)
* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-string-response.md)
* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-context.md)
* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-body-request.md)
* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/headers.md)
* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/api-exception.md)
* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/configuration-interface.md)
* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-client-configuration.md)
* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.1/doc/http-client-configuration-builder.md)
* [Utility Classes](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/utility-classes.md)
* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-request.md)
* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-response.md)
* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-string-response.md)
* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-context.md)
* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-body-request.md)
* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/headers.md)
* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/api-exception.md)
* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/configuration-interface.md)
* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-client-configuration.md)
* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.4/doc/http-client-configuration-builder.md)

27 changes: 20 additions & 7 deletions doc/controllers/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ CreateComponentBody body = CreateComponentBody.fromCreateMeteredComponent(
)
.build()
);

try {
ComponentResponse result = componentsController.createComponent(productFamilyId, componentKind, body);
System.out.println(result);
Expand Down Expand Up @@ -857,21 +858,33 @@ int componentId = 222;
CreateComponentPricePointRequest body = new CreateComponentPricePointRequest.Builder(
CreateComponentPricePointRequestPricePoint.fromCreateComponentPricePoint(
new CreateComponentPricePoint.Builder(
"Special Pricing",
"per_unit",
"Wholesale",
"stairstep",
Arrays.asList(
new Price.Builder(
PriceStartingQuantity.fromNumber(
1
PriceStartingQuantity.fromMString(
"1"
),
PriceUnitPrice.fromPrecision(
5D
PriceUnitPrice.fromMString(
"5.00"
)
)
.endingQuantity(PriceEndingQuantity.fromMString(
"100"
))
.build(),
new Price.Builder(
PriceStartingQuantity.fromMString(
"101"
),
PriceUnitPrice.fromMString(
"4.00"
)
)
.build()
)
)
.handle("special")
.handle("wholesale-handle")
.build()
)
)
Expand Down
61 changes: 61 additions & 0 deletions doc/controllers/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,39 @@ try {
}
```

## Example Response *(as JSON)*

```json
[
{
"name": "Color",
"scope": {
"hosted": [],
"csv": "0",
"statements": "0",
"invoices": "0",
"portal": "0"
},
"data_count": 0,
"input_type": "text",
"enum": null
},
{
"name": "Brand",
"scope": {
"hosted": [],
"csv": "0",
"statements": "0",
"invoices": "0",
"portal": "0"
},
"data_count": 0,
"input_type": "text",
"enum": null
}
]
```


# List Metafields

Expand Down Expand Up @@ -142,6 +175,34 @@ try {
}
```

## Example Response *(as JSON)*

```json
{
"total_count": 0,
"current_page": 0,
"total_pages": 0,
"per_page": 0,
"metafields": [
{
"id": 0,
"name": "string",
"scope": {
"csv": "0",
"statements": "0",
"invoices": "0",
"portal": "0",
"public_show": "0",
"public_edit": "0"
},
"data_count": 0,
"input_type": "string",
"enum": null
}
]
}
```


# Update Metafield

Expand Down
111 changes: 108 additions & 3 deletions doc/controllers/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,68 @@ try {
}
```

## Example Response *(as JSON)*

```json
[
{
"event": {
"id": 343087780,
"key": "subscription_state_change",
"message": "State changed on Test subscription to Monthly Product from active to past_due",
"subscription_id": 14950962,
"customer_id": 12345678,
"created_at": "2016-10-27T16:42:22-04:00",
"event_specific_data": {
"previous_subscription_state": "active",
"new_subscription_state": "past_due"
}
}
},
{
"event": {
"id": 343087742,
"key": "billing_date_change",
"message": "Billing date changed on Test's subscription to Monthly Product from 11/27/2016 to 10/27/2016",
"subscription_id": 14950962,
"customer_id": 12345678,
"created_at": "2016-10-27T16:42:19-04:00",
"event_specific_data": null
}
},
{
"event": {
"id": 343085267,
"key": "statement_closed",
"message": "Statement 79401838 closed (but not settled) for Test's subscription to ANNUAL product",
"subscription_id": 14950975,
"customer_id": 87654321,
"created_at": "2016-10-27T16:40:40-04:00",
"event_specific_data": null
}
},
{
"event": {
"id": 4481,
"key": "custom_field_value_change",
"message": "Custom field (Extra support included) changed for Subscription 117 from 'Yes' to 'No'.",
"subscription_id": 117,
"customer_id": 22334455,
"created_at": "2022-03-24T07:55:06-04:00",
"event_specific_data": {
"event_type": "updated",
"metafield_name": "Extra support included",
"metafield_id": 2,
"old_value": "Yes",
"new_value": "No",
"resource_type": "Subscription",
"resource_id": 117
}
}
}
]
```


# List Subscription Events

Expand Down Expand Up @@ -194,13 +256,56 @@ try {
}
```

## Example Response *(as JSON)*

```json
[
{
"event": {
"id": 344799837,
"key": "statement_settled",
"message": "Statement 79702531 settled successfully for Amelia Example's subscription to Basic Plan",
"subscription_id": 14900541,
"customer_id": 77223344,
"created_at": "2016-11-01T12:41:29-04:00",
"event_specific_data": null
}
},
{
"event": {
"id": 344799815,
"key": "renewal_success",
"message": "Successful renewal for Amelia Example's subscription to Basic Plan",
"subscription_id": 14900541,
"customer_id": 77223344,
"created_at": "2016-11-01T12:41:28-04:00",
"event_specific_data": {
"product_id": 3792003,
"account_transaction_id": 7590246
}
}
},
{
"event": {
"id": 344799705,
"key": "billing_date_change",
"message": "Billing date changed on Amelia Example's subscription to Basic Plan from 11/26/2016 to 11/01/2016",
"subscription_id": 14900541,
"customer_id": 77223344,
"created_at": "2016-11-01T12:41:25-04:00",
"event_specific_data": null
}
}
]
```


# Read Events Count

Get a count of all the events for a given site by using this method.

```java
Count readEventsCount(
CountResponse readEventsCount(
final Integer page,
final Integer perPage,
final Integer sinceId,
Expand All @@ -222,7 +327,7 @@ Count readEventsCount(

## Response Type

[`Count`](../../doc/models/count.md)
[`CountResponse`](../../doc/models/count-response.md)

## Example Usage

Expand All @@ -236,7 +341,7 @@ List<EventType> filter = Arrays.asList(
);

try {
Count result = eventsController.readEventsCount(page, perPage, null, null, direction, filter);
CountResponse result = eventsController.readEventsCount(page, perPage, null, null, direction, filter);
System.out.println(result);
} catch (ApiException e) {
e.printStackTrace();
Expand Down
Loading