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-617] Get rid of "Nullify404" code gen setting in APIMatic configuration and adjust tests #29

Merged
merged 1 commit into from
Nov 23, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,16 @@ Install the SDK by adding the following dependency in your project's pom.xml fil
<dependency>
<groupId>com.maxio</groupId>
<artifactId>advanced-billing-sdk</artifactId>
<version>0.0.5</version>
<version>0.0.6</version>
</dependency>
```

You can also view the package at:
https://mvnrepository.com/artifact/com.maxio/advanced-billing-sdk/0.0.5
https://mvnrepository.com/artifact/com.maxio/advanced-billing-sdk/0.0.6

## 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.5/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.6/doc/client.md)

The following parameters are configurable for the API Client:

Expand All @@ -292,7 +292,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.5/doc/http-client-configuration.md) | Http Client Configuration instance. |
| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/0.0.6/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 @@ -326,49 +326,49 @@ This API uses `Basic Authentication`.

## List of APIs

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

## Classes Documentation

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

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.maxio</groupId>
<artifactId>advanced-billing-sdk</artifactId>
<version>0.0.5</version>
<version>0.0.6</version>
<packaging>jar</packaging>
<name>Advanced Billing</name>
<description>Ultimate billing and pricing flexibility for B2B SaaS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public final class AdvancedBillingClient implements Configuration {

private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl();

private static String userAgent = "AB SDK Java:0.0.5 on OS {os-info}";
private static String userAgent = "AB SDK Java:0.0.6 on OS {os-info}";

/**
* Current API environment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ private ApiCall<List<ProformaInvoice>, ApiException> prepareListExportedProforma
.deserializer(
response -> ApiHelper.deserializeArray(response,
ProformaInvoice[].class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down Expand Up @@ -118,6 +122,10 @@ private ApiCall<List<Invoice>, ApiException> prepareListExportedInvoicesRequest(
.deserializer(
response -> ApiHelper.deserializeArray(response,
Invoice[].class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down Expand Up @@ -161,6 +169,10 @@ private ApiCall<List<Subscription>, ApiException> prepareListExportedSubscriptio
.deserializer(
response -> ApiHelper.deserializeArray(response,
Subscription[].class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down Expand Up @@ -193,6 +205,10 @@ private ApiCall<BatchJobResponse, ApiException> prepareExportProformaInvoicesReq
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.localErrorCase("409",
ErrorCase.setReason("Conflict",
(reason, context) -> new SingleErrorResponseException(reason, context)))
Expand Down Expand Up @@ -227,6 +243,10 @@ private ApiCall<BatchJobResponse, ApiException> prepareExportInvoicesRequest() t
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.localErrorCase("409",
ErrorCase.setReason("Conflict",
(reason, context) -> new SingleErrorResponseException(reason, context)))
Expand Down Expand Up @@ -261,6 +281,7 @@ private ApiCall<BatchJobResponse, ApiException> prepareExportSubscriptionsReques
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("409",
ErrorCase.setReason("Conflict",
(reason, context) -> new SingleErrorResponseException(reason, context)))
Expand Down Expand Up @@ -300,6 +321,10 @@ private ApiCall<BatchJobResponse, ApiException> prepareReadProformaInvoicesExpor
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down Expand Up @@ -336,6 +361,10 @@ private ApiCall<BatchJobResponse, ApiException> prepareReadInvoicesExportRequest
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down Expand Up @@ -372,6 +401,10 @@ private ApiCall<BatchJobResponse, ApiException> prepareReadSubscriptionsExportRe
.responseHandler(responseHandler -> responseHandler
.deserializer(
response -> ApiHelper.deserialize(response, BatchJobResponse.class))
.nullify404(false)
.localErrorCase("404",
ErrorCase.setReason("Not Found",
(reason, context) -> new ApiException(reason, context)))
.globalErrorCase(GLOBAL_ERROR_CASES))
.endpointConfiguration(param -> param
.arraySerializationFormat(ArraySerializationFormat.CSV))
Expand Down
Loading