From cc877707bcbc82812e78ed218782bfd47554350f Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Mon, 6 May 2024 12:29:23 +0000 Subject: [PATCH 1/2] Automated commit message --- doc/controllers/advance-invoice.md | 2 +- doc/controllers/invoices.md | 13 + doc/controllers/subscription-components.md | 9 +- .../containers/coupon-compounding-strategy.md | 13 - ...subscription-component-price-point-type.md | 13 - doc/models/coupon.md | 2 +- doc/models/historic-usage.md | 27 ++ .../list-subscription-components-include.md | 1 + doc/models/subscription-component.md | 3 +- pom.xml | 6 +- .../AdvancedBillingClient.java | 39 +- .../controllers/APIExportsController.java | 27 +- .../controllers/AdvanceInvoiceController.java | 28 +- .../controllers/BillingPortalController.java | 12 +- .../controllers/ComponentsController.java | 66 +-- .../controllers/CouponsController.java | 42 +- .../controllers/CustomFieldsController.java | 27 +- .../controllers/CustomersController.java | 21 +- .../EventsBasedBillingSegmentsController.java | 18 +- .../controllers/EventsController.java | 9 +- .../controllers/InsightsController.java | 12 +- .../controllers/InvoicesController.java | 58 +-- .../controllers/OffersController.java | 15 +- .../PaymentProfilesController.java | 36 +- .../ProductFamiliesController.java | 12 +- .../ProductPricePointsController.java | 33 +- .../controllers/ProductsController.java | 18 +- .../ProformaInvoicesController.java | 27 +- .../controllers/ReasonCodesController.java | 15 +- .../controllers/ReferralCodesController.java | 3 +- .../SalesCommissionsController.java | 9 +- .../controllers/SitesController.java | 9 +- .../SubscriptionComponentsController.java | 54 +-- ...criptionGroupInvoiceAccountController.java | 12 +- .../SubscriptionGroupStatusController.java | 12 +- .../SubscriptionGroupsController.java | 27 +- .../SubscriptionInvoiceAccountController.java | 18 +- .../SubscriptionNotesController.java | 15 +- .../SubscriptionProductsController.java | 6 +- .../SubscriptionStatusController.java | 30 +- .../controllers/SubscriptionsController.java | 36 +- .../controllers/WebhooksController.java | 18 +- .../http/request/HttpRequest.java | 25 +- .../models/BillingManifest.java | 154 +++++-- .../advancedbilling/models/Component.java | 50 +- .../models/ComponentPricePoint.java | 45 +- .../maxio/advancedbilling/models/Coupon.java | 62 ++- .../advancedbilling/models/HistoricUsage.java | 188 ++++++++ ...istSubscriptionComponentsForSiteInput.java | 6 +- .../ListSubscriptionComponentsInclude.java | 6 +- .../ListSubscriptionComponentsInput.java | 26 +- .../maxio/advancedbilling/models/Product.java | 60 ++- .../models/ProductPricePoint.java | 427 ++++++++++++++---- .../advancedbilling/models/Subscription.java | 257 ++++++++--- .../models/SubscriptionComponent.java | 113 ++++- .../SubscriptionGroupPrepaymentResponse.java | 66 ++- .../maxio/advancedbilling/models/Usage.java | 69 ++- .../containers/CouponCompoundingStrategy.java | 105 ----- .../SubscriptionComponentPricePointType.java | 105 ----- 59 files changed, 1588 insertions(+), 1029 deletions(-) delete mode 100644 doc/models/containers/coupon-compounding-strategy.md delete mode 100644 doc/models/containers/subscription-component-price-point-type.md create mode 100644 doc/models/historic-usage.md create mode 100644 src/main/java/com/maxio/advancedbilling/models/HistoricUsage.java delete mode 100644 src/main/java/com/maxio/advancedbilling/models/containers/CouponCompoundingStrategy.java delete mode 100644 src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricePointType.java diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index eaa85ac8..ad4613d2 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -17,7 +17,7 @@ AdvanceInvoiceController advanceInvoiceController = client.getAdvanceInvoiceCont # Issue Advance Invoice -Generate an invoice in advance for a subscription's next renewal date. [Please see our docs](../../doc/models/invoice.md) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided. +Generate an invoice in advance for a subscription's next renewal date. [Please see our docs](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404811062541-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided. A subscription may only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists will return an error. That said, regeneration of the invoice may be forced with the params `force: true`, which will void an advance invoice if one exists and generate a new one. If no advance invoice exists, a new one will be generated. We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index ae5f5c12..86acf494 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -451,6 +451,19 @@ try { Use this endpoint to retrieve the details for an invoice. +## PDF Invoice retrieval + +Individual PDF Invoices can be retrieved by using the "Accept" header application/pdf or appending .pdf as the format portion of the URL: + +```curl -u :x -H +Accept:application/pdf -H +https://acme.chargify.com/invoices/inv_8gd8tdhtd3hgr.pdf > output_file.pdf +URL: `https://.chargify.com/invoices/.` +Method: GET +Required parameters: `uid` +Response: A single Invoice. +``` + ```java Invoice readInvoice( final String uid) diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index c4fc619e..a0912d57 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -120,7 +120,7 @@ List listSubscriptionComponents( | `sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query `sort=updated_at`. | | `startDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `startDatetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription`. | +| `include` | [`List`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | ## Response Type @@ -146,7 +146,10 @@ ListSubscriptionComponentsInput listSubscriptionComponentsInput = new ListSubscr 3 )) .sort(ListSubscriptionComponentsSort.UPDATED_AT) -.include(ListSubscriptionComponentsInclude.SUBSCRIPTION) +.include(Arrays.asList( + ListSubscriptionComponentsInclude.SUBSCRIPTION, + ListSubscriptionComponentsInclude.HISTORIC_USAGES + )) .build(); try { @@ -1506,7 +1509,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | `subscriptionIds` | `List` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`. | | `pricePointIds` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | | `productFamilyIds` | `List` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | -| `include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription`. | +| `include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | ## Response Type diff --git a/doc/models/containers/coupon-compounding-strategy.md b/doc/models/containers/coupon-compounding-strategy.md deleted file mode 100644 index e9fbc0fd..00000000 --- a/doc/models/containers/coupon-compounding-strategy.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Coupon Compounding Strategy - -## Class Name - -`CouponCompoundingStrategy` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`CompoundingStrategy`](../../../doc/models/compounding-strategy.md) | CouponCompoundingStrategy.fromCompoundingStrategy(CompoundingStrategy compoundingStrategy) | - diff --git a/doc/models/containers/subscription-component-price-point-type.md b/doc/models/containers/subscription-component-price-point-type.md deleted file mode 100644 index 4cba756a..00000000 --- a/doc/models/containers/subscription-component-price-point-type.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Subscription Component Price Point Type - -## Class Name - -`SubscriptionComponentPricePointType` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`PricePointType`](../../../doc/models/price-point-type.md) | SubscriptionComponentPricePointType.fromPricePointType(PricePointType pricePointType) | - diff --git a/doc/models/coupon.md b/doc/models/coupon.md index a1a392fc..e73d8a1c 100644 --- a/doc/models/coupon.md +++ b/doc/models/coupon.md @@ -30,7 +30,7 @@ | `ArchivedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | | `ConversionLimit` | `String` | Optional | - | String getConversionLimit() | setConversionLimit(String conversionLimit) | | `Stackable` | `Boolean` | Optional | - | Boolean getStackable() | setStackable(Boolean stackable) | -| `CompoundingStrategy` | [`CouponCompoundingStrategy`](../../doc/models/containers/coupon-compounding-strategy.md) | Optional | This is a container for any-of cases. | CouponCompoundingStrategy getCompoundingStrategy() | setCompoundingStrategy(CouponCompoundingStrategy compoundingStrategy) | +| `CompoundingStrategy` | [`CompoundingStrategy`](../../doc/models/compounding-strategy.md) | Optional | - | CompoundingStrategy getCompoundingStrategy() | setCompoundingStrategy(CompoundingStrategy compoundingStrategy) | | `UseSiteExchangeRate` | `Boolean` | Optional | - | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | | `CreatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | | `UpdatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | diff --git a/doc/models/historic-usage.md b/doc/models/historic-usage.md new file mode 100644 index 00000000..1b4f7ce7 --- /dev/null +++ b/doc/models/historic-usage.md @@ -0,0 +1,27 @@ + +# Historic Usage + +An optional object for Event Based Components, will be returned if provided `include=historic_usages` query param. + +## Structure + +`HistoricUsage` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `TotalUsageQuantity` | `Double` | Optional | Total usage of a component for billing period | Double getTotalUsageQuantity() | setTotalUsageQuantity(Double totalUsageQuantity) | +| `BillingPeriodStartsAt` | `ZonedDateTime` | Optional | Start date of billing period | ZonedDateTime getBillingPeriodStartsAt() | setBillingPeriodStartsAt(ZonedDateTime billingPeriodStartsAt) | +| `BillingPeriodEndsAt` | `ZonedDateTime` | Optional | End date of billing period | ZonedDateTime getBillingPeriodEndsAt() | setBillingPeriodEndsAt(ZonedDateTime billingPeriodEndsAt) | + +## Example (as JSON) + +```json +{ + "total_usage_quantity": 26.6, + "billing_period_starts_at": "2016-03-13T12:52:32.123Z", + "billing_period_ends_at": "2016-03-13T12:52:32.123Z" +} +``` + diff --git a/doc/models/list-subscription-components-include.md b/doc/models/list-subscription-components-include.md index 487d6305..2f68f49e 100644 --- a/doc/models/list-subscription-components-include.md +++ b/doc/models/list-subscription-components-include.md @@ -10,6 +10,7 @@ | Name | | --- | | `Subscription` | +| `HistoricUsages` | ## Example diff --git a/doc/models/subscription-component.md b/doc/models/subscription-component.md index 75c90c51..988ed214 100644 --- a/doc/models/subscription-component.md +++ b/doc/models/subscription-component.md @@ -27,7 +27,7 @@ | `ArchivedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | | `PricePointId` | `Integer` | Optional | - | Integer getPricePointId() | setPricePointId(Integer pricePointId) | | `PricePointHandle` | `String` | Optional | - | String getPricePointHandle() | setPricePointHandle(String pricePointHandle) | -| `PricePointType` | [`SubscriptionComponentPricePointType`](../../doc/models/containers/subscription-component-price-point-type.md) | Optional | This is a container for one-of cases. | SubscriptionComponentPricePointType getPricePointType() | setPricePointType(SubscriptionComponentPricePointType pricePointType) | +| `PricePointType` | [`PricePointType`](../../doc/models/price-point-type.md) | Optional | - | PricePointType getPricePointType() | setPricePointType(PricePointType pricePointType) | | `PricePointName` | `String` | Optional | - | String getPricePointName() | setPricePointName(String pricePointName) | | `ProductFamilyId` | `Integer` | Optional | - | Integer getProductFamilyId() | setProductFamilyId(Integer productFamilyId) | | `ProductFamilyHandle` | `String` | Optional | - | String getProductFamilyHandle() | setProductFamilyHandle(String productFamilyHandle) | @@ -37,6 +37,7 @@ | `Description` | `String` | Optional | - | String getDescription() | setDescription(String description) | | `AllowFractionalQuantities` | `Boolean` | Optional | - | Boolean getAllowFractionalQuantities() | setAllowFractionalQuantities(Boolean allowFractionalQuantities) | | `Subscription` | [`SubscriptionComponentSubscription`](../../doc/models/subscription-component-subscription.md) | Optional | An optional object, will be returned if provided `include=subscription` query param. | SubscriptionComponentSubscription getSubscription() | setSubscription(SubscriptionComponentSubscription subscription) | +| `HistoricUsages` | [`List`](../../doc/models/historic-usage.md) | Optional | - | List getHistoricUsages() | setHistoricUsages(List historicUsages) | | `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) | | `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | diff --git a/pom.xml b/pom.xml index 4afcdd33..4333718b 100644 --- a/pom.xml +++ b/pom.xml @@ -46,17 +46,17 @@ Maxio integrates directly into your product, so you can seamlessly manage your p io.apimatic core-interfaces - [0.2, 0.3) + [0.3, 0.4) io.apimatic core - [0.5, 0.6) + [0.6, 0.7) io.apimatic okhttp-client-adapter - [0.2, 0.3) + [0.3, 0.4) diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java index aed06425..3b20c75b 100644 --- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java +++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java @@ -50,6 +50,7 @@ import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; +import java.util.function.Supplier; /** * Gateway class for the library. @@ -135,30 +136,21 @@ public final class AdvancedBillingClient implements Configuration { /** * Map of authentication Managers. */ - private Map authentications; + private Map authentications = new HashMap(); private AdvancedBillingClient(Environment environment, String subdomain, String domain, HttpClient httpClient, ReadonlyHttpClientConfiguration httpClientConfig, - BasicAuthModel basicAuthModel, Map authentications) { + BasicAuthModel basicAuthModel) { this.environment = environment; this.subdomain = subdomain; this.domain = domain; this.httpClient = httpClient; this.httpClientConfig = httpClientConfig; - this.authentications = - (authentications == null) ? new HashMap<>() : new HashMap<>(authentications); - this.basicAuthModel = basicAuthModel; - if (this.authentications.containsKey("BasicAuth")) { - this.basicAuthManager = (BasicAuthManager) this.authentications.get("BasicAuth"); - } + this.basicAuthModel = basicAuthModel; - if (!this.authentications.containsKey("BasicAuth") - || !getBasicAuthCredentials().equals(basicAuthModel.getUsername(), - basicAuthModel.getPassword())) { - this.basicAuthManager = new BasicAuthManager(basicAuthModel); - this.authentications.put("BasicAuth", basicAuthManager); - } + this.basicAuthManager = new BasicAuthManager(basicAuthModel); + this.authentications.put("BasicAuth", basicAuthManager); GlobalConfiguration globalConfig = new GlobalConfiguration.Builder() .httpClient(httpClient).baseUri(server -> getBaseUri(server)) @@ -602,9 +594,7 @@ public Builder newBuilder() { builder.httpClient = getHttpClient(); builder.basicAuthCredentials(getBasicAuthModel() .toBuilder().build()); - builder.authentications = authentications; - builder.httpClientConfig(configBldr -> configBldr = - ((HttpClientConfiguration) httpClientConfig).newBuilder()); + builder.httpClientConfig(() -> ((HttpClientConfiguration) httpClientConfig).newBuilder()); return builder; } @@ -618,7 +608,6 @@ public static class Builder { private String domain = "chargify.com"; private HttpClient httpClient; private BasicAuthModel basicAuthModel = new BasicAuthModel.Builder("", "").build(); - private Map authentications = null; private HttpClientConfiguration.Builder httpClientConfigBuilder = new HttpClientConfiguration.Builder(); @@ -688,6 +677,18 @@ public Builder httpClientConfig(Consumer action return this; } + /** + * Private Setter for the Builder of httpClientConfiguration, takes in an operation to be performed + * on the builder instance of HTTP client configuration. + * + * @param supplier Supplier for the builder of httpClientConfiguration. + * @return Builder + */ + private Builder httpClientConfig(Supplier supplier) { + httpClientConfigBuilder = supplier.get(); + return this; + } + /** * Builds a new AdvancedBillingClient object using the set fields. * @return AdvancedBillingClient @@ -697,7 +698,7 @@ public AdvancedBillingClient build() { httpClient = new OkClient(httpClientConfig.getConfiguration(), compatibilityFactory); return new AdvancedBillingClient(environment, subdomain, domain, httpClient, - httpClientConfig, basicAuthModel, authentications); + httpClientConfig, basicAuthModel); } } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java index 9fd5e83c..bd1def7f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java @@ -71,6 +71,7 @@ private ApiCall, ApiException> prepareListExportedProforma .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -81,8 +82,6 @@ private ApiCall, ApiException> prepareListExportedProforma ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -119,6 +118,7 @@ private ApiCall, ApiException> prepareListExportedInvoicesRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -129,8 +129,6 @@ private ApiCall, ApiException> prepareListExportedInvoicesRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -167,6 +165,7 @@ private ApiCall, ApiException> prepareListExportedSubscriptio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -177,8 +176,6 @@ private ApiCall, ApiException> prepareListExportedSubscriptio ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -205,6 +202,7 @@ private ApiCall prepareExportProformaInvoicesReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -217,8 +215,6 @@ private ApiCall prepareExportProformaInvoicesReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -244,6 +240,7 @@ private ApiCall prepareExportInvoicesRequest() t .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -256,8 +253,6 @@ private ApiCall prepareExportInvoicesRequest() t ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -283,6 +278,7 @@ private ApiCall prepareExportSubscriptionsReques .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -292,8 +288,6 @@ private ApiCall prepareExportSubscriptionsReques ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -324,6 +318,7 @@ private ApiCall prepareReadProformaInvoicesExpor .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -333,8 +328,6 @@ private ApiCall prepareReadProformaInvoicesExpor ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -365,6 +358,7 @@ private ApiCall prepareReadInvoicesExportRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -374,8 +368,6 @@ private ApiCall prepareReadInvoicesExportRequest ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -406,6 +398,7 @@ private ApiCall prepareReadSubscriptionsExportRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -415,8 +408,6 @@ private ApiCall prepareReadSubscriptionsExportRe ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java index 14315723..38f3d5cd 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java @@ -36,15 +36,16 @@ public AdvanceInvoiceController(GlobalConfiguration globalConfig) { /** * Generate an invoice in advance for a subscription's next renewal date. [Please see our - * docs]($m/Invoice) for more information on advance invoices, including eligibility on - * generating one; for the most part, they function like any other invoice, except they are - * issued early and have special behavior upon being voided. A subscription may only have one - * advance invoice per billing period. Attempting to issue an advance invoice when one already - * exists will return an error. That said, regeneration of the invoice may be forced with the - * params `force: true`, which will void an advance invoice if one exists and generate a new - * one. If no advance invoice exists, a new one will be generated. We recommend using either the - * create or preview endpoints for proforma invoices to preview this advance invoice before - * using this endpoint to generate it. + * docs](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404811062541-Issue-Invoice-In-Advance + * ) for more information on advance invoices, including eligibility on generating one; for the + * most part, they function like any other invoice, except they are issued early and have + * special behavior upon being voided. A subscription may only have one advance invoice per + * billing period. Attempting to issue an advance invoice when one already exists will return an + * error. That said, regeneration of the invoice may be forced with the params `force: true`, + * which will void an advance invoice if one exists and generate a new one. If no advance + * invoice exists, a new one will be generated. We recommend using either the create or preview + * endpoints for proforma invoices to preview this advance invoice before using this endpoint to + * generate it. * @param subscriptionId Required parameter: The Chargify id of the subscription * @param body Optional parameter: Example: * @return Returns the Invoice response from the API call @@ -77,6 +78,7 @@ private ApiCall prepareIssueAdvanceInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -89,8 +91,6 @@ private ApiCall prepareIssueAdvanceInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -123,6 +123,7 @@ private ApiCall prepareReadAdvanceInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -132,8 +133,6 @@ private ApiCall prepareReadAdvanceInvoiceRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -175,6 +174,7 @@ private ApiCall prepareVoidAdvanceInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -184,8 +184,6 @@ private ApiCall prepareVoidAdvanceInvoiceRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java index 6513385c..08dff06b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java @@ -86,6 +86,7 @@ private ApiCall prepareEnableBillingPortalForCus .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -95,8 +96,6 @@ private ApiCall prepareEnableBillingPortalForCus ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -134,6 +133,7 @@ private ApiCall prepareReadBillingPortalLink .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -146,8 +146,6 @@ private ApiCall prepareReadBillingPortalLink ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new TooManyManagementLinkRequestsErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -185,6 +183,7 @@ private ApiCall prepareResendBillingPortalInvita .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -197,8 +196,6 @@ private ApiCall prepareResendBillingPortalInvita ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -231,14 +228,13 @@ private ApiCall prepareRevokeBillingPortalAcces .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, RevokedInvitation.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java index faba28f9..fa09cd12 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java @@ -99,6 +99,7 @@ private ApiCall prepareCreateMeteredComponentRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -111,8 +112,6 @@ private ApiCall prepareCreateMeteredComponentRe ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -162,6 +161,7 @@ private ApiCall prepareCreateQuantityBasedCompo .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -174,8 +174,6 @@ private ApiCall prepareCreateQuantityBasedCompo ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -219,6 +217,7 @@ private ApiCall prepareCreateOnOffComponentRequ .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -231,8 +230,6 @@ private ApiCall prepareCreateOnOffComponentRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -278,6 +275,7 @@ private ApiCall prepareCreatePrepaidUsageCompon .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -290,8 +288,6 @@ private ApiCall prepareCreatePrepaidUsageCompon ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -339,6 +335,7 @@ private ApiCall prepareCreateEventBasedComponen .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -351,8 +348,6 @@ private ApiCall prepareCreateEventBasedComponen ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -385,14 +380,13 @@ private ApiCall prepareFindComponentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -432,14 +426,13 @@ private ApiCall prepareReadComponentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -487,6 +480,7 @@ private ApiCall prepareUpdateProductFamilyCompo .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -496,8 +490,6 @@ private ApiCall prepareUpdateProductFamilyCompo ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -536,6 +528,7 @@ private ApiCall prepareArchiveComponentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -545,8 +538,6 @@ private ApiCall prepareArchiveComponentRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -593,6 +584,7 @@ private ApiCall, ApiException> prepareListComponentsRequ .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -600,8 +592,6 @@ private ApiCall, ApiException> prepareListComponentsRequ ComponentResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -640,6 +630,7 @@ private ApiCall prepareUpdateComponentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -649,8 +640,6 @@ private ApiCall prepareUpdateComponentRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -693,14 +682,13 @@ private ApiCall preparePromoteComponentPricePoi .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -749,6 +737,7 @@ private ApiCall, ApiException> prepareListComponentsForP .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -756,8 +745,6 @@ private ApiCall, ApiException> prepareListComponentsForP ComponentResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -795,14 +782,13 @@ private ApiCall prepareCreateComponen .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentPricePointResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -847,14 +833,13 @@ private ApiCall prepareListComponent .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentPricePointsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -893,14 +878,13 @@ private ApiCall prepareBulkCreateCom .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentPricePointsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -948,6 +932,7 @@ private ApiCall prepareUpdateComponen .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -957,8 +942,6 @@ private ApiCall prepareUpdateComponen ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -996,6 +979,7 @@ private ApiCall prepareArchiveCompone .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1005,8 +989,6 @@ private ApiCall prepareArchiveCompone ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1043,14 +1025,13 @@ private ApiCall prepareUnarchiveCompo .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ComponentPricePointResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1092,6 +1073,7 @@ private ApiCall prepareCreateCurr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1101,8 +1083,6 @@ private ApiCall prepareCreateCurr ErrorCase.setReason("Unprocessable Entity (WebDAV)", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1142,6 +1122,7 @@ private ApiCall prepareUpdateCurr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1151,8 +1132,6 @@ private ApiCall prepareUpdateCurr ErrorCase.setReason("Unprocessable Entity (WebDAV)", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1191,6 +1170,7 @@ private ApiCall prepareListAllC .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1200,8 +1180,6 @@ private ApiCall prepareListAllC ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java index c832430c..60d2114a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java @@ -89,6 +89,7 @@ private ApiCall prepareCreateCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -98,8 +99,6 @@ private ApiCall prepareCreateCouponRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -140,6 +139,7 @@ private ApiCall, ApiException> prepareListCouponsForProduct .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -147,8 +147,6 @@ private ApiCall, ApiException> prepareListCouponsForProduct CouponResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -189,14 +187,13 @@ private ApiCall prepareFindCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -240,14 +237,13 @@ private ApiCall prepareReadCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -294,14 +290,13 @@ private ApiCall prepareUpdateCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -340,14 +335,13 @@ private ApiCall prepareArchiveCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -386,6 +380,7 @@ private ApiCall, ApiException> prepareListCouponsRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -393,8 +388,6 @@ private ApiCall, ApiException> prepareListCouponsRequest( CouponResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -432,6 +425,7 @@ private ApiCall, ApiException> prepareReadCouponUsageRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -439,8 +433,6 @@ private ApiCall, ApiException> prepareReadCouponUsageRequest( CouponUsage[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -490,6 +482,7 @@ private ApiCall prepareValidateCouponRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -499,8 +492,6 @@ private ApiCall prepareValidateCouponRequest( ErrorCase.setReason("Not Found", (reason, context) -> new SingleStringErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -543,14 +534,13 @@ private ApiCall prepareCreateOrUpdateCoupo .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponCurrencyResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -604,14 +594,13 @@ private ApiCall prepareCreateCouponSubcode .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponSubcodesResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -646,14 +635,13 @@ private ApiCall prepareListCouponSubcodesRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponSubcodes.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -695,14 +683,13 @@ private ApiCall prepareUpdateCouponSubcode .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CouponSubcodesResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -744,6 +731,7 @@ private ApiCall prepareDeleteCouponSubcodeRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -751,8 +739,6 @@ private ApiCall prepareDeleteCouponSubcodeRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java index 04f08463..c14bba56 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java @@ -101,6 +101,7 @@ private ApiCall, ApiException> prepareCreateMetafieldsRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -111,8 +112,6 @@ private ApiCall, ApiException> prepareCreateMetafieldsRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -152,14 +151,13 @@ private ApiCall prepareListMetafieldsReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListMetafieldsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -198,6 +196,7 @@ private ApiCall, ApiException> prepareUpdateMetafieldRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -208,8 +207,6 @@ private ApiCall, ApiException> prepareUpdateMetafieldRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -245,6 +242,7 @@ private ApiCall prepareDeleteMetafieldRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -252,8 +250,6 @@ private ApiCall prepareDeleteMetafieldRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -314,6 +310,7 @@ private ApiCall, ApiException> prepareCreateMetadataRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -324,8 +321,6 @@ private ApiCall, ApiException> prepareCreateMetadataRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -364,14 +359,13 @@ private ApiCall prepareListMetadataRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, PaginatedMetadata.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -416,6 +410,7 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -426,8 +421,6 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -480,6 +473,7 @@ private ApiCall prepareDeleteMetadataRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -487,8 +481,6 @@ private ApiCall prepareDeleteMetadataRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -544,14 +536,13 @@ private ApiCall prepareListMetadataForResourceT .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, PaginatedMetadata.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java index e20a3b09..fc4babbf 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java @@ -87,6 +87,7 @@ private ApiCall prepareCreateCustomerRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -96,8 +97,6 @@ private ApiCall prepareCreateCustomerRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new CustomerErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -150,6 +149,7 @@ private ApiCall, ApiException> prepareListCustomersReques .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -157,8 +157,6 @@ private ApiCall, ApiException> prepareListCustomersReques CustomerResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -189,14 +187,13 @@ private ApiCall prepareReadCustomerRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CustomerResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -234,6 +231,7 @@ private ApiCall prepareUpdateCustomerRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -246,8 +244,6 @@ private ApiCall prepareUpdateCustomerRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new CustomerErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -276,12 +272,11 @@ private ApiCall prepareDeleteCustomerRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -313,14 +308,13 @@ private ApiCall prepareReadCustomerByReferenceRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CustomerResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -351,6 +345,7 @@ private ApiCall, ApiException> prepareListCustomerSub .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -358,8 +353,6 @@ private ApiCall, ApiException> prepareListCustomerSub SubscriptionResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java index b8370588..1f1c6b41 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java @@ -83,6 +83,7 @@ private ApiCall prepareCreateSegmentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -95,8 +96,6 @@ private ApiCall prepareCreateSegmentRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new EventBasedBillingSegmentErrorsException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -139,6 +138,7 @@ private ApiCall prepareListSegmentsForPriceP .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -151,8 +151,6 @@ private ApiCall prepareListSegmentsForPriceP ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new EventBasedBillingListSegmentsErrorsException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -203,6 +201,7 @@ private ApiCall prepareUpdateSegmentRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -215,8 +214,6 @@ private ApiCall prepareUpdateSegmentRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new EventBasedBillingSegmentErrorsException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -257,6 +254,7 @@ private ApiCall prepareDeleteSegmentRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -267,8 +265,6 @@ private ApiCall prepareDeleteSegmentRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -317,6 +313,7 @@ private ApiCall prepareBulkCreateSegmentsReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -329,8 +326,6 @@ private ApiCall prepareBulkCreateSegmentsReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new EventBasedBillingSegmentException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -379,6 +374,7 @@ private ApiCall prepareBulkUpdateSegmentsReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -391,8 +387,6 @@ private ApiCall prepareBulkUpdateSegmentsReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new EventBasedBillingSegmentException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java index f29952de..cc5f597e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java @@ -103,6 +103,7 @@ private ApiCall, ApiException> prepareListEventsRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -110,8 +111,6 @@ private ApiCall, ApiException> prepareListEventsRequest( EventResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -155,6 +154,7 @@ private ApiCall, ApiException> prepareListSubscriptionEvents .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -162,8 +162,6 @@ private ApiCall, ApiException> prepareListSubscriptionEvents EventResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -204,14 +202,13 @@ private ApiCall prepareReadEventsCountRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CountResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java index f0a5f39b..507ed723 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java @@ -64,14 +64,13 @@ private ApiCall prepareReadSiteStatsRequest() throws .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SiteSummary.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -112,14 +111,13 @@ private ApiCall prepareReadMrrRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, MRRResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -171,14 +169,13 @@ private ApiCall prepareListMrrMovementsRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListMRRResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -221,6 +218,7 @@ private ApiCall prepareListMrrPerSubscrip .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -230,8 +228,6 @@ private ApiCall prepareListMrrPerSubscrip ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionsMrrErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java index 4eb8b592..812b430a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java @@ -93,6 +93,7 @@ private ApiCall prepareRefundInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -102,8 +103,6 @@ private ApiCall prepareRefundInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -179,19 +178,23 @@ private ApiCall prepareListInvoicesRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListInvoicesResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } /** - * Use this endpoint to retrieve the details for an invoice. + * Use this endpoint to retrieve the details for an invoice. ## PDF Invoice retrieval Individual + * PDF Invoices can be retrieved by using the "Accept" header application/pdf or appending .pdf + * as the format portion of the URL: ```curl -u <api_key>:x -H Accept:application/pdf -H + * https://acme.chargify.com/invoices/inv_8gd8tdhtd3hgr.pdf > output_file.pdf URL: + * `https://<subdomain>.chargify.com/invoices/<uid>.<format>` Method: GET Required parameters: + * `uid` Response: A single Invoice. ```. * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. * @return Returns the Invoice response from the API call @@ -218,14 +221,13 @@ private ApiCall prepareReadInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, Invoice.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -276,14 +278,13 @@ private ApiCall prepareListInvoiceEvent .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListInvoiceEventsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -339,6 +340,7 @@ private ApiCall prepareRecordPaymentForInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -348,8 +350,6 @@ private ApiCall prepareRecordPaymentForInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -389,6 +389,7 @@ private ApiCall prepareRecordPaymentF .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -398,8 +399,6 @@ private ApiCall prepareRecordPaymentF ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -447,14 +446,13 @@ private ApiCall prepareListCreditNotesReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListCreditNotesResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -485,14 +483,13 @@ private ApiCall prepareReadCreditNoteRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, CreditNote.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -534,6 +531,7 @@ private ApiCall prepareRecordPaymentForSubs .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -543,8 +541,6 @@ private ApiCall prepareRecordPaymentForSubs ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -587,6 +583,7 @@ private ApiCall prepareReopenInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -599,8 +596,6 @@ private ApiCall prepareReopenInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -641,6 +636,7 @@ private ApiCall prepareVoidInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -653,8 +649,6 @@ private ApiCall prepareVoidInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -692,14 +686,13 @@ private ApiCall prepareListConsolidatedInvoic .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ConsolidatedInvoice.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -804,6 +797,7 @@ private ApiCall prepareCreateInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -813,8 +807,6 @@ private ApiCall prepareCreateInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -861,6 +853,7 @@ private ApiCall prepareSendInvoiceRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -868,8 +861,6 @@ private ApiCall prepareSendInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -905,6 +896,7 @@ private ApiCall preparePreviewCust .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -917,8 +909,6 @@ private ApiCall preparePreviewCust ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -954,6 +944,7 @@ private ApiCall prepareUpdateCustomerInformationRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -966,8 +957,6 @@ private ApiCall prepareUpdateCustomerInformationRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1024,6 +1013,7 @@ private ApiCall prepareIssueInvoiceRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1036,8 +1026,6 @@ private ApiCall prepareIssueInvoiceRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java index e6cd3985..9f91396a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java @@ -72,6 +72,7 @@ private ApiCall prepareCreateOfferRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -81,8 +82,6 @@ private ApiCall prepareCreateOfferRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -117,14 +116,13 @@ private ApiCall prepareListOffersRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListOffersResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -156,14 +154,13 @@ private ApiCall prepareReadOfferRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, OfferResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -192,12 +189,11 @@ private ApiCall prepareArchiveOfferRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -227,12 +223,11 @@ private ApiCall prepareUnarchiveOfferRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java index 07dd8dcc..2da896a8 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java @@ -201,6 +201,7 @@ private ApiCall prepareCreatePaymentProfil .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -213,8 +214,6 @@ private ApiCall prepareCreatePaymentProfil ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -251,6 +250,7 @@ private ApiCall, ApiException> prepareListPaymentPr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -258,8 +258,6 @@ private ApiCall, ApiException> prepareListPaymentPr PaymentProfileResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -300,6 +298,7 @@ private ApiCall prepareReadPaymentProfileR .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -309,8 +308,6 @@ private ApiCall prepareReadPaymentProfileR ErrorCase.setReason("Not Found", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -369,6 +366,7 @@ private ApiCall prepareUpdatePaymentProfil .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -381,8 +379,6 @@ private ApiCall prepareUpdatePaymentProfil ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorStringMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -412,6 +408,7 @@ private ApiCall prepareDeleteUnusedPaymentProfileRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -422,8 +419,6 @@ private ApiCall prepareDeleteUnusedPaymentProfileRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -463,12 +458,11 @@ private ApiCall prepareDeleteSubscriptionsPaymentProfileRequ .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -507,6 +501,7 @@ private ApiCall prepareVerifyBankAccountReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -519,8 +514,6 @@ private ApiCall prepareVerifyBankAccountReque ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -556,12 +549,11 @@ private ApiCall prepareDeleteSubscriptionGroupPaymentProfile .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -600,6 +592,7 @@ private ApiCall prepareChangeSubscriptionD .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -612,8 +605,6 @@ private ApiCall prepareChangeSubscriptionD ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -654,6 +645,7 @@ private ApiCall prepareChangeSubscriptionG .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -663,8 +655,6 @@ private ApiCall prepareChangeSubscriptionG ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -699,6 +689,7 @@ private ApiCall prepareReadOneTimeTokenReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -708,8 +699,6 @@ private ApiCall prepareReadOneTimeTokenReq ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -748,6 +737,7 @@ private ApiCall prepareSendRequestUpdatePaymentEmailRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -758,8 +748,6 @@ private ApiCall prepareSendRequestUpdatePaymentEmailRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java index 1e873a06..a754bc54 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java @@ -84,6 +84,7 @@ private ApiCall, ApiException> prepareListProductsForProdu .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -94,8 +95,6 @@ private ApiCall, ApiException> prepareListProductsForProdu ErrorCase.setReason("Not Found", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -131,6 +130,7 @@ private ApiCall prepareCreateProductFamilyR .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -140,8 +140,6 @@ private ApiCall prepareCreateProductFamilyR ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -180,6 +178,7 @@ private ApiCall, ApiException> prepareListProductFam .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -187,8 +186,6 @@ private ApiCall, ApiException> prepareListProductFam ProductFamilyResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -221,14 +218,13 @@ private ApiCall prepareReadProductFamilyReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductFamilyResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java index a60c1751..1aaf549e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java @@ -89,6 +89,7 @@ private ApiCall prepareCreateProductPri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -98,8 +99,6 @@ private ApiCall prepareCreateProductPri ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ProductPricePointErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -138,14 +137,13 @@ private ApiCall prepareListProduct .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListProductPricePointsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -191,14 +189,13 @@ private ApiCall prepareUpdateProductPri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductPricePointResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -247,14 +244,13 @@ private ApiCall prepareReadProductPrice .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductPricePointResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -292,6 +288,7 @@ private ApiCall prepareArchiveProductPr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -301,8 +298,6 @@ private ApiCall prepareArchiveProductPr ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -339,14 +334,13 @@ private ApiCall prepareUnarchiveProduct .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PATCH)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductPricePointResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -384,14 +378,13 @@ private ApiCall preparePromoteProductPricePointTo .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PATCH)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -430,6 +423,7 @@ private ApiCall prepareBulkC .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -439,8 +433,6 @@ private ApiCall prepareBulkC ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -482,6 +474,7 @@ private ApiCall prepareCreateProductCurren .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -491,8 +484,6 @@ private ApiCall prepareCreateProductCurren ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -534,6 +525,7 @@ private ApiCall prepareUpdateProductCurren .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -543,8 +535,6 @@ private ApiCall prepareUpdateProductCurren ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -583,6 +573,7 @@ private ApiCall prepareListAllProd .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -592,8 +583,6 @@ private ApiCall prepareListAllProd ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java index d2b25b8a..87b168a1 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java @@ -74,6 +74,7 @@ private ApiCall prepareCreateProductRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -83,8 +84,6 @@ private ApiCall prepareCreateProductRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -116,14 +115,13 @@ private ApiCall prepareReadProductRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -165,6 +163,7 @@ private ApiCall prepareUpdateProductRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -174,8 +173,6 @@ private ApiCall prepareUpdateProductRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -209,6 +206,7 @@ private ApiCall prepareArchiveProductRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -218,8 +216,6 @@ private ApiCall prepareArchiveProductRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -250,14 +246,13 @@ private ApiCall prepareReadProductByHandleRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ProductResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -306,6 +301,7 @@ private ApiCall, ApiException> prepareListProductsRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -313,8 +309,6 @@ private ApiCall, ApiException> prepareListProductsRequest( ProductResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java index a17f3cf7..0b69b1a9 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java @@ -73,6 +73,7 @@ private ApiCall prepareCreateConsolidatedProformaInvoiceRequ .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -80,8 +81,6 @@ private ApiCall prepareCreateConsolidatedProformaInvoiceRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -127,6 +126,7 @@ private ApiCall prepareListSubscript .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -136,8 +136,6 @@ private ApiCall prepareListSubscript ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -169,6 +167,7 @@ private ApiCall prepareReadProformaInvoiceRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -178,8 +177,6 @@ private ApiCall prepareReadProformaInvoiceRequest ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -215,6 +212,7 @@ private ApiCall prepareCreateProformaInvoiceReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -224,8 +222,6 @@ private ApiCall prepareCreateProformaInvoiceReque ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -283,14 +279,13 @@ private ApiCall prepareListProformaI .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListProformaInvoicesResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -333,6 +328,7 @@ private ApiCall prepareVoidProformaInvoiceRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -345,8 +341,6 @@ private ApiCall prepareVoidProformaInvoiceRequest ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -388,6 +382,7 @@ private ApiCall preparePreviewProformaInvoiceRequ .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -400,8 +395,6 @@ private ApiCall preparePreviewProformaInvoiceRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -443,6 +436,7 @@ private ApiCall prepareCreateSignupProformaInvoic .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -455,8 +449,6 @@ private ApiCall prepareCreateSignupProformaInvoic ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -503,6 +495,7 @@ private ApiCall preparePreviewSignu .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -515,8 +508,6 @@ private ApiCall preparePreviewSignu ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java index 47cc1a4b..e557ff0a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java @@ -74,6 +74,7 @@ private ApiCall prepareCreateReasonCodeRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -83,8 +84,6 @@ private ApiCall prepareCreateReasonCodeRequest ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -118,6 +117,7 @@ private ApiCall, ApiException> prepareListReasonCodesRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -125,8 +125,6 @@ private ApiCall, ApiException> prepareListReasonCodesRe ReasonCodeResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -158,6 +156,7 @@ private ApiCall prepareReadReasonCodeRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -167,8 +166,6 @@ private ApiCall prepareReadReasonCodeRequest( ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -206,6 +203,7 @@ private ApiCall prepareUpdateReasonCodeRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -215,8 +213,6 @@ private ApiCall prepareUpdateReasonCodeRequest ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -248,6 +244,7 @@ private ApiCall prepareDeleteReasonCodeRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -257,8 +254,6 @@ private ApiCall prepareDeleteReasonCodeRe ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java index 0613ba87..fcce0ba3 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java @@ -64,6 +64,7 @@ private ApiCall prepareValidateReferra .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -73,8 +74,6 @@ private ApiCall prepareValidateReferra ErrorCase.setTemplate("Invalid referral code.", (reason, context) -> new SingleStringErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java index 1240b514..bea6a817 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java @@ -80,6 +80,7 @@ private ApiCall, ApiException> prepareListSalesCommissionS .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -87,8 +88,6 @@ private ApiCall, ApiException> prepareListSalesCommissionS SaleRepSettings[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -137,6 +136,7 @@ private ApiCall, ApiException> prepareListSalesRepsRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -144,8 +144,6 @@ private ApiCall, ApiException> prepareListSalesRepsRequest ListSaleRepItem[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -221,14 +219,13 @@ private ApiCall prepareReadSalesRepRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SaleRep.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java index 0e1ba76e..04fadcec 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java @@ -62,14 +62,13 @@ private ApiCall prepareReadSiteRequest() throws IOEx .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SiteResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -105,12 +104,11 @@ private ApiCall prepareClearSiteRequest( .value((cleanupScope != null) ? cleanupScope.value() : "all").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -143,14 +141,13 @@ private ApiCall prepareListChargifyJsPubli .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListPublicKeysResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 10c0d546..fba0bdc0 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -25,6 +25,7 @@ import com.maxio.advancedbilling.models.CreditSchemeRequest; import com.maxio.advancedbilling.models.EBBEvent; import com.maxio.advancedbilling.models.ListSubscriptionComponentsForSiteInput; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsInclude; import com.maxio.advancedbilling.models.ListSubscriptionComponentsInput; import com.maxio.advancedbilling.models.ListSubscriptionComponentsResponse; import com.maxio.advancedbilling.models.ListUsagesInput; @@ -87,6 +88,7 @@ private ApiCall prepareReadSubscrip .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -96,8 +98,6 @@ private ApiCall prepareReadSubscrip ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -146,12 +146,13 @@ private ApiCall, ApiException> prepareListSu .queryParam(param -> param.key("start_datetime") .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("include") - .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) + .value(ListSubscriptionComponentsInclude.toValue(input.getInclude())).isRequired(false)) .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -159,8 +160,6 @@ private ApiCall, ApiException> prepareListSu SubscriptionComponentResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -201,6 +200,7 @@ private ApiCall prepareBulkUpd .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -210,8 +210,6 @@ private ApiCall prepareBulkUpd ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ComponentPricePointErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -244,14 +242,13 @@ private ApiCall prepareBulkResetSubscription .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -335,6 +332,7 @@ private ApiCall prepareAllocateComponentReques .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -344,8 +342,6 @@ private ApiCall prepareAllocateComponentReques ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -398,6 +394,7 @@ private ApiCall, ApiException> prepareListAllocationsRe .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -411,8 +408,6 @@ private ApiCall, ApiException> prepareListAllocationsRe ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -455,6 +450,7 @@ private ApiCall, ApiException> prepareAllocateComponent .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -468,8 +464,6 @@ private ApiCall, ApiException> prepareAllocateComponent ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -515,6 +509,7 @@ private ApiCall preparePreviewAllocatio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -524,8 +519,6 @@ private ApiCall preparePreviewAllocatio ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ComponentAllocationErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -581,6 +574,7 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -591,8 +585,6 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionComponentAllocationErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -649,6 +641,7 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -659,8 +652,6 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionComponentAllocationErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -736,6 +727,7 @@ private ApiCall prepareCreateUsageRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -745,8 +737,6 @@ private ApiCall prepareCreateUsageRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -799,6 +789,7 @@ private ApiCall, ApiException> prepareListUsagesRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -806,8 +797,6 @@ private ApiCall, ApiException> prepareListUsagesRequest( UsageResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -849,12 +838,11 @@ private ApiCall prepareActivateEventBasedComponentRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -890,12 +878,11 @@ private ApiCall prepareDeactivateEventBasedComponentRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -952,12 +939,11 @@ private ApiCall prepareRecordEventRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1008,12 +994,11 @@ private ApiCall prepareBulkRecordEventsRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1070,14 +1055,13 @@ private ApiCall prepareListSub .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListSubscriptionComponentsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java index 2ec379f8..6db66094 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java @@ -75,6 +75,7 @@ private ApiCall prepareCreate .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -84,8 +85,6 @@ private ApiCall prepareCreate ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -122,6 +121,7 @@ private ApiCall prepareLi .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -131,8 +131,6 @@ private ApiCall prepareLi ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -172,6 +170,7 @@ private ApiCall prepareIssueSubscriptionGro .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -181,8 +180,6 @@ private ApiCall prepareIssueSubscriptionGro ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -221,6 +218,7 @@ private ApiCall prepareDeductSubscriptionGroupServi .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -230,8 +228,6 @@ private ApiCall prepareDeductSubscriptionGroupServi ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java index 4d47593b..d226298a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java @@ -71,6 +71,7 @@ private ApiCall prepareCancelSubscriptionsInGroupRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -78,8 +79,6 @@ private ApiCall prepareCancelSubscriptionsInGroupRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -111,6 +110,7 @@ private ApiCall prepareInitiateDelayedCancellationForGroupRe .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -118,8 +118,6 @@ private ApiCall prepareInitiateDelayedCancellationForGroupRe ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -150,6 +148,7 @@ private ApiCall prepareCancelDelayedCancellationForGroupRequ .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -157,8 +156,6 @@ private ApiCall prepareCancelDelayedCancellationForGroupRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -219,6 +216,7 @@ private ApiCall prepareReacti .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -228,8 +226,6 @@ private ApiCall prepareReacti ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index bef74d75..483eefb0 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -83,6 +83,7 @@ private ApiCall prepareSignupWith .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -92,8 +93,6 @@ private ApiCall prepareSignupWith ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionGroupSignupErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -126,6 +125,7 @@ private ApiCall prepareCreateSubscripti .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -135,8 +135,6 @@ private ApiCall prepareCreateSubscripti ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionGroupCreateErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -175,14 +173,13 @@ private ApiCall prepareListSubscri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ListSubscriptionGroupsResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -222,14 +219,13 @@ private ApiCall prepareReadSubscrip .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, FullSubscriptionGroupResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -270,6 +266,7 @@ private ApiCall prepareUpdateSubscripti .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -279,8 +276,6 @@ private ApiCall prepareUpdateSubscripti ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionGroupUpdateErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -311,6 +306,7 @@ private ApiCall prepareDeleteSubs .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -320,8 +316,6 @@ private ApiCall prepareDeleteSubs ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -354,6 +348,7 @@ private ApiCall prepareFindSubscrip .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -363,8 +358,6 @@ private ApiCall prepareFindSubscrip ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -421,14 +414,13 @@ private ApiCall prepareAddSubscriptionT .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionGroupResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -460,6 +452,7 @@ private ApiCall prepareRemoveSubscriptionFromGroupRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -470,8 +463,6 @@ private ApiCall prepareRemoveSubscriptionFromGroupRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index d5cf7da0..de86982b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -69,14 +69,13 @@ private ApiCall prepareReadAccountBalancesRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, AccountBalances.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -118,6 +117,7 @@ private ApiCall prepareCreatePrepaymentR .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -127,8 +127,6 @@ private ApiCall prepareCreatePrepaymentR ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -165,6 +163,7 @@ private ApiCall prepareListPrepaymentsRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -174,8 +173,6 @@ private ApiCall prepareListPrepaymentsRequest ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -214,6 +211,7 @@ private ApiCall prepareIssueServiceCreditRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -223,8 +221,6 @@ private ApiCall prepareIssueServiceCreditRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -261,6 +257,7 @@ private ApiCall prepareDeductServiceCreditRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -268,8 +265,6 @@ private ApiCall prepareDeductServiceCreditRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -315,6 +310,7 @@ private ApiCall prepareRefundPrepaymentRequest .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -330,8 +326,6 @@ private ApiCall prepareRefundPrepaymentRequest ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java index b11d0db6..b6e9b92f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java @@ -71,14 +71,13 @@ private ApiCall prepareCreateSubscriptio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionNoteResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -114,6 +113,7 @@ private ApiCall, ApiException> prepareListSubscri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -121,8 +121,6 @@ private ApiCall, ApiException> prepareListSubscri SubscriptionNoteResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -159,14 +157,13 @@ private ApiCall prepareReadSubscriptionN .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionNoteResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -209,14 +206,13 @@ private ApiCall prepareUpdateSubscriptio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionNoteResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -250,12 +246,11 @@ private ApiCall prepareDeleteSubscriptionNoteRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java index bc65f5cf..902870fa 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java @@ -121,6 +121,7 @@ private ApiCall prepareMigrateSubscriptionPr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -130,8 +131,6 @@ private ApiCall prepareMigrateSubscriptionPr ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -173,6 +172,7 @@ private ApiCall preparePrevi .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -182,8 +182,6 @@ private ApiCall preparePrevi ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java index 3ceda14e..f81a4405 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java @@ -69,6 +69,7 @@ private ApiCall prepareRetrySubscriptionRequ .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -78,8 +79,6 @@ private ApiCall prepareRetrySubscriptionRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -118,6 +117,7 @@ private ApiCall prepareCancelSubscriptionReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -130,8 +130,6 @@ private ApiCall prepareCancelSubscriptionReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -171,6 +169,7 @@ private ApiCall prepareResumeSubscriptionReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -180,8 +179,6 @@ private ApiCall prepareResumeSubscriptionReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -220,6 +217,7 @@ private ApiCall preparePauseSubscriptionRequ .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -229,8 +227,6 @@ private ApiCall preparePauseSubscriptionRequ ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -272,6 +268,7 @@ private ApiCall prepareUpdateAutomaticSubscr .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -281,8 +278,6 @@ private ApiCall prepareUpdateAutomaticSubscr ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -388,6 +383,7 @@ private ApiCall prepareReactivateSubscriptio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -397,8 +393,6 @@ private ApiCall prepareReactivateSubscriptio ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -439,6 +433,7 @@ private ApiCall prepareInitiateDelaye .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -448,8 +443,6 @@ private ApiCall prepareInitiateDelaye ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -483,6 +476,7 @@ private ApiCall prepareCancelDelayedC .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -492,8 +486,6 @@ private ApiCall prepareCancelDelayedC ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -525,14 +517,13 @@ private ApiCall prepareCancelDunningRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -590,6 +581,7 @@ private ApiCall preparePreviewRenewalReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -599,8 +591,6 @@ private ApiCall preparePreviewRenewalReque ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java index f76e348c..674fdece 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -440,6 +440,7 @@ private ApiCall prepareCreateSubscriptionReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -449,8 +450,6 @@ private ApiCall prepareCreateSubscriptionReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -514,6 +513,7 @@ private ApiCall, ApiException> prepareListSubscriptio .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -521,8 +521,6 @@ private ApiCall, ApiException> prepareListSubscriptio SubscriptionResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -599,6 +597,7 @@ private ApiCall prepareUpdateSubscriptionReq .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -608,8 +607,6 @@ private ApiCall prepareUpdateSubscriptionReq ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -648,14 +645,13 @@ private ApiCall prepareReadSubscriptionReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -711,6 +707,7 @@ private ApiCall prepareOverrideSubscriptionRequest( .value("application/json").isRequired(false)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .nullify404(false) @@ -718,8 +715,6 @@ private ApiCall prepareOverrideSubscriptionRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SingleErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -750,14 +745,13 @@ private ApiCall prepareFindSubscriptionReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -803,12 +797,11 @@ private ApiCall preparePurgeSubscriptionRequest( .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -846,14 +839,13 @@ private ApiCall prepareUpdatePrepaid .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, PrepaidConfigurationResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -907,14 +899,13 @@ private ApiCall preparePreviewSubscri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, SubscriptionPreviewResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -967,6 +958,7 @@ private ApiCall prepareApplyCouponsToSubscri .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -976,8 +968,6 @@ private ApiCall prepareApplyCouponsToSubscri ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionAddCouponErrorException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1014,6 +1004,7 @@ private ApiCall prepareRemoveCouponFromSubscriptionRequest .shouldEncode(true)) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.DELETE)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1023,8 +1014,6 @@ private ApiCall prepareRemoveCouponFromSubscriptionRequest ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new SubscriptionRemoveCouponErrorsException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -1086,6 +1075,7 @@ private ApiCall prepareActivateSubscriptionR .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -1095,8 +1085,6 @@ private ApiCall prepareActivateSubscriptionR ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorArrayMapResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java index 523c21cf..2051fb7b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java @@ -94,6 +94,7 @@ private ApiCall, ApiException> prepareListWebhooksRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -101,8 +102,6 @@ private ApiCall, ApiException> prepareListWebhooksRequest( WebhookResponse[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -135,14 +134,13 @@ private ApiCall prepareEnableWebhooksReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, EnableWebhooksResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -177,14 +175,13 @@ private ApiCall prepareReplayWebhooksReque .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( response -> ApiHelper.deserialize(response, ReplayWebhooksResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -219,6 +216,7 @@ private ApiCall prepareCreateEndpointRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.POST)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -228,8 +226,6 @@ private ApiCall prepareCreateEndpointRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -255,6 +251,7 @@ private ApiCall, ApiException> prepareListEndpointsRequest() thro .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -262,8 +259,6 @@ private ApiCall, ApiException> prepareListEndpointsRequest() thro Endpoint[].class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -309,6 +304,7 @@ private ApiCall prepareUpdateEndpointRequest( .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) .httpMethod(HttpMethod.PUT)) .responseHandler(responseHandler -> responseHandler .deserializer( @@ -321,8 +317,6 @@ private ApiCall prepareUpdateEndpointRequest( ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (reason, context) -> new ErrorListResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) - .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/http/request/HttpRequest.java b/src/main/java/com/maxio/advancedbilling/http/request/HttpRequest.java index 88968d20..c9e3700a 100644 --- a/src/main/java/com/maxio/advancedbilling/http/request/HttpRequest.java +++ b/src/main/java/com/maxio/advancedbilling/http/request/HttpRequest.java @@ -137,16 +137,25 @@ public String toString() { + ", parameters=" + parameters + "]"; } + /** + * Get the request URL + * + * @param arraySerializationFormat Array serialization format + * @return The complete URL including serialized query parameters + */ @Override public String getUrl(ArraySerializationFormat arraySerializationFormat) { - StringBuilder urlBuilder = new StringBuilder(getQueryUrl()); - - // set query parameters - ApiHelper.appendUrlWithQueryParameters(urlBuilder, getQueryParameters(), - arraySerializationFormat); - - // validate and preprocess url - return ApiHelper.cleanUrl(urlBuilder); + return getQueryUrl(); + } + + /** + * Get the request URL without query parameters + * + * @return The complete URL excluding query parameters + */ + @Override + public String getUrl() { + return ApiHelper.removeQueryParametersFromUrl(getQueryUrl()); } } diff --git a/src/main/java/com/maxio/advancedbilling/models/BillingManifest.java b/src/main/java/com/maxio/advancedbilling/models/BillingManifest.java index 68690472..469b6cdb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BillingManifest.java +++ b/src/main/java/com/maxio/advancedbilling/models/BillingManifest.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.DateTimeHelper; import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; import java.util.List; @@ -26,9 +27,9 @@ public class BillingManifest private Long totalDiscountInCents; private Long totalTaxInCents; private Long subtotalInCents; - private ZonedDateTime startDate; - private ZonedDateTime endDate; - private String periodType; + private OptionalNullable startDate; + private OptionalNullable endDate; + private OptionalNullable periodType; private Long existingBalanceInCents; /** @@ -64,6 +65,34 @@ public BillingManifest( this.totalDiscountInCents = totalDiscountInCents; this.totalTaxInCents = totalTaxInCents; this.subtotalInCents = subtotalInCents; + this.startDate = OptionalNullable.of(startDate); + this.endDate = OptionalNullable.of(endDate); + this.periodType = OptionalNullable.of(periodType); + this.existingBalanceInCents = existingBalanceInCents; + } + + /** + * Initialization constructor. + * @param lineItems List of BillingManifestItem value for lineItems. + * @param totalInCents Long value for totalInCents. + * @param totalDiscountInCents Long value for totalDiscountInCents. + * @param totalTaxInCents Long value for totalTaxInCents. + * @param subtotalInCents Long value for subtotalInCents. + * @param startDate ZonedDateTime value for startDate. + * @param endDate ZonedDateTime value for endDate. + * @param periodType String value for periodType. + * @param existingBalanceInCents Long value for existingBalanceInCents. + */ + + protected BillingManifest(List lineItems, Long totalInCents, + Long totalDiscountInCents, Long totalTaxInCents, Long subtotalInCents, + OptionalNullable startDate, OptionalNullable endDate, + OptionalNullable periodType, Long existingBalanceInCents) { + this.lineItems = lineItems; + this.totalInCents = totalInCents; + this.totalDiscountInCents = totalDiscountInCents; + this.totalTaxInCents = totalTaxInCents; + this.subtotalInCents = subtotalInCents; this.startDate = startDate; this.endDate = endDate; this.periodType = periodType; @@ -166,14 +195,22 @@ public void setSubtotalInCents(Long subtotalInCents) { } /** - * Getter for StartDate. - * @return Returns the ZonedDateTime + * Internal Getter for StartDate. + * @return Returns the Internal ZonedDateTime */ @JsonGetter("start_date") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetStartDate() { + return this.startDate; + } + + /** + * Getter for StartDate. + * @return Returns the ZonedDateTime + */ public ZonedDateTime getStartDate() { - return startDate; + return OptionalNullable.getFrom(startDate); } /** @@ -183,18 +220,33 @@ public ZonedDateTime getStartDate() { @JsonSetter("start_date") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setStartDate(ZonedDateTime startDate) { - this.startDate = startDate; + this.startDate = OptionalNullable.of(startDate); } /** - * Getter for EndDate. - * @return Returns the ZonedDateTime + * UnSetter for StartDate. + */ + public void unsetStartDate() { + startDate = null; + } + + /** + * Internal Getter for EndDate. + * @return Returns the Internal ZonedDateTime */ @JsonGetter("end_date") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetEndDate() { + return this.endDate; + } + + /** + * Getter for EndDate. + * @return Returns the ZonedDateTime + */ public ZonedDateTime getEndDate() { - return endDate; + return OptionalNullable.getFrom(endDate); } /** @@ -204,17 +256,33 @@ public ZonedDateTime getEndDate() { @JsonSetter("end_date") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setEndDate(ZonedDateTime endDate) { - this.endDate = endDate; + this.endDate = OptionalNullable.of(endDate); } /** - * Getter for PeriodType. - * @return Returns the String + * UnSetter for EndDate. + */ + public void unsetEndDate() { + endDate = null; + } + + /** + * Internal Getter for PeriodType. + * @return Returns the Internal String */ @JsonGetter("period_type") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetPeriodType() { + return this.periodType; + } + + /** + * Getter for PeriodType. + * @return Returns the String + */ public String getPeriodType() { - return periodType; + return OptionalNullable.getFrom(periodType); } /** @@ -223,7 +291,14 @@ public String getPeriodType() { */ @JsonSetter("period_type") public void setPeriodType(String periodType) { - this.periodType = periodType; + this.periodType = OptionalNullable.of(periodType); + } + + /** + * UnSetter for PeriodType. + */ + public void unsetPeriodType() { + periodType = null; } /** @@ -271,10 +346,10 @@ public Builder toBuilder() { .totalDiscountInCents(getTotalDiscountInCents()) .totalTaxInCents(getTotalTaxInCents()) .subtotalInCents(getSubtotalInCents()) - .startDate(getStartDate()) - .endDate(getEndDate()) - .periodType(getPeriodType()) .existingBalanceInCents(getExistingBalanceInCents()); + builder.startDate = internalGetStartDate(); + builder.endDate = internalGetEndDate(); + builder.periodType = internalGetPeriodType(); return builder; } @@ -287,9 +362,9 @@ public static class Builder { private Long totalDiscountInCents; private Long totalTaxInCents; private Long subtotalInCents; - private ZonedDateTime startDate; - private ZonedDateTime endDate; - private String periodType; + private OptionalNullable startDate; + private OptionalNullable endDate; + private OptionalNullable periodType; private Long existingBalanceInCents; @@ -350,7 +425,16 @@ public Builder subtotalInCents(Long subtotalInCents) { * @return Builder */ public Builder startDate(ZonedDateTime startDate) { - this.startDate = startDate; + this.startDate = OptionalNullable.of(startDate); + return this; + } + + /** + * UnSetter for startDate. + * @return Builder + */ + public Builder unsetStartDate() { + startDate = null; return this; } @@ -360,7 +444,16 @@ public Builder startDate(ZonedDateTime startDate) { * @return Builder */ public Builder endDate(ZonedDateTime endDate) { - this.endDate = endDate; + this.endDate = OptionalNullable.of(endDate); + return this; + } + + /** + * UnSetter for endDate. + * @return Builder + */ + public Builder unsetEndDate() { + endDate = null; return this; } @@ -370,7 +463,16 @@ public Builder endDate(ZonedDateTime endDate) { * @return Builder */ public Builder periodType(String periodType) { - this.periodType = periodType; + this.periodType = OptionalNullable.of(periodType); + return this; + } + + /** + * UnSetter for periodType. + * @return Builder + */ + public Builder unsetPeriodType() { + periodType = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java index 42039769..cf0f2cfa 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Component.java +++ b/src/main/java/com/maxio/advancedbilling/models/Component.java @@ -39,7 +39,7 @@ public class Component private OptionalNullable> overagePrices; private OptionalNullable> prices; private Integer pricePointCount; - private String pricePointsUrl; + private OptionalNullable pricePointsUrl; private String defaultPricePointName; private OptionalNullable taxCode; private Boolean recurring; @@ -152,7 +152,7 @@ public Component( this.overagePrices = OptionalNullable.of(overagePrices); this.prices = OptionalNullable.of(prices); this.pricePointCount = pricePointCount; - this.pricePointsUrl = pricePointsUrl; + this.pricePointsUrl = OptionalNullable.of(pricePointsUrl); this.defaultPricePointName = defaultPricePointName; this.taxCode = OptionalNullable.of(taxCode); this.recurring = recurring; @@ -217,8 +217,9 @@ protected Component(Integer id, String name, OptionalNullable handle, OptionalNullable defaultPricePointId, OptionalNullable> overagePrices, OptionalNullable> prices, Integer pricePointCount, - String pricePointsUrl, String defaultPricePointName, OptionalNullable taxCode, - Boolean recurring, OptionalNullable upgradeCharge, + OptionalNullable pricePointsUrl, String defaultPricePointName, + OptionalNullable taxCode, Boolean recurring, + OptionalNullable upgradeCharge, OptionalNullable downgradeCredit, ZonedDateTime createdAt, ZonedDateTime updatedAt, OptionalNullable archivedAt, Boolean hideDateRangeOnInvoice, Boolean allowFractionalQuantities, @@ -769,14 +770,24 @@ public void setPricePointCount(Integer pricePointCount) { } /** - * Getter for PricePointsUrl. + * Internal Getter for PricePointsUrl. * URL that points to the location to read the existing price points via GET request - * @return Returns the String + * @return Returns the Internal String */ @JsonGetter("price_points_url") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetPricePointsUrl() { + return this.pricePointsUrl; + } + + /** + * Getter for PricePointsUrl. + * URL that points to the location to read the existing price points via GET request + * @return Returns the String + */ public String getPricePointsUrl() { - return pricePointsUrl; + return OptionalNullable.getFrom(pricePointsUrl); } /** @@ -786,7 +797,15 @@ public String getPricePointsUrl() { */ @JsonSetter("price_points_url") public void setPricePointsUrl(String pricePointsUrl) { - this.pricePointsUrl = pricePointsUrl; + this.pricePointsUrl = OptionalNullable.of(pricePointsUrl); + } + + /** + * UnSetter for PricePointsUrl. + * URL that points to the location to read the existing price points via GET request + */ + public void unsetPricePointsUrl() { + pricePointsUrl = null; } /** @@ -1317,7 +1336,6 @@ public Builder toBuilder() { .archived(getArchived()) .taxable(getTaxable()) .pricePointCount(getPricePointCount()) - .pricePointsUrl(getPricePointsUrl()) .defaultPricePointName(getDefaultPricePointName()) .recurring(getRecurring()) .createdAt(getCreatedAt()) @@ -1335,6 +1353,7 @@ public Builder toBuilder() { builder.defaultPricePointId = internalGetDefaultPricePointId(); builder.overagePrices = internalGetOveragePrices(); builder.prices = internalGetPrices(); + builder.pricePointsUrl = internalGetPricePointsUrl(); builder.taxCode = internalGetTaxCode(); builder.upgradeCharge = internalGetUpgradeCharge(); builder.downgradeCredit = internalGetDowngradeCredit(); @@ -1366,7 +1385,7 @@ public static class Builder { private OptionalNullable> overagePrices; private OptionalNullable> prices; private Integer pricePointCount; - private String pricePointsUrl; + private OptionalNullable pricePointsUrl; private String defaultPricePointName; private OptionalNullable taxCode; private Boolean recurring; @@ -1634,7 +1653,16 @@ public Builder pricePointCount(Integer pricePointCount) { * @return Builder */ public Builder pricePointsUrl(String pricePointsUrl) { - this.pricePointsUrl = pricePointsUrl; + this.pricePointsUrl = OptionalNullable.of(pricePointsUrl); + return this; + } + + /** + * UnSetter for pricePointsUrl. + * @return Builder + */ + public Builder unsetPricePointsUrl() { + pricePointsUrl = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java index 05eccae8..34e9a5fc 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java @@ -28,7 +28,7 @@ public class ComponentPricePoint private String name; private PricingScheme pricingScheme; private Integer componentId; - private String handle; + private OptionalNullable handle; private OptionalNullable archivedAt; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -90,7 +90,7 @@ public ComponentPricePoint( this.name = name; this.pricingScheme = pricingScheme; this.componentId = componentId; - this.handle = handle; + this.handle = OptionalNullable.of(handle); this.archivedAt = OptionalNullable.of(archivedAt); this.createdAt = createdAt; this.updatedAt = updatedAt; @@ -125,7 +125,7 @@ public ComponentPricePoint( */ protected ComponentPricePoint(Integer id, PricePointType type, Boolean mDefault, String name, - PricingScheme pricingScheme, Integer componentId, String handle, + PricingScheme pricingScheme, Integer componentId, OptionalNullable handle, OptionalNullable archivedAt, ZonedDateTime createdAt, ZonedDateTime updatedAt, List prices, Boolean useSiteExchangeRate, Integer subscriptionId, Boolean taxIncluded, OptionalNullable interval, @@ -281,13 +281,22 @@ public void setComponentId(Integer componentId) { } /** - * Getter for Handle. - * @return Returns the String + * Internal Getter for Handle. + * @return Returns the Internal String */ @JsonGetter("handle") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetHandle() { + return this.handle; + } + + /** + * Getter for Handle. + * @return Returns the String + */ public String getHandle() { - return handle; + return OptionalNullable.getFrom(handle); } /** @@ -296,7 +305,14 @@ public String getHandle() { */ @JsonSetter("handle") public void setHandle(String handle) { - this.handle = handle; + this.handle = OptionalNullable.of(handle); + } + + /** + * UnSetter for Handle. + */ + public void unsetHandle() { + handle = null; } /** @@ -607,7 +623,6 @@ public Builder toBuilder() { .name(getName()) .pricingScheme(getPricingScheme()) .componentId(getComponentId()) - .handle(getHandle()) .createdAt(getCreatedAt()) .updatedAt(getUpdatedAt()) .prices(getPrices()) @@ -615,6 +630,7 @@ public Builder toBuilder() { .subscriptionId(getSubscriptionId()) .taxIncluded(getTaxIncluded()) .currencyPrices(getCurrencyPrices()); + builder.handle = internalGetHandle(); builder.archivedAt = internalGetArchivedAt(); builder.interval = internalGetInterval(); builder.intervalUnit = internalGetIntervalUnit(); @@ -631,7 +647,7 @@ public static class Builder { private String name; private PricingScheme pricingScheme; private Integer componentId; - private String handle; + private OptionalNullable handle; private OptionalNullable archivedAt; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -711,7 +727,16 @@ public Builder componentId(Integer componentId) { * @return Builder */ public Builder handle(String handle) { - this.handle = handle; + this.handle = OptionalNullable.of(handle); + return this; + } + + /** + * UnSetter for handle. + * @return Builder + */ + public Builder unsetHandle() { + handle = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Coupon.java b/src/main/java/com/maxio/advancedbilling/models/Coupon.java index 5f024b67..5aa8c3c4 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Coupon.java +++ b/src/main/java/com/maxio/advancedbilling/models/Coupon.java @@ -12,7 +12,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.DateTimeHelper; -import com.maxio.advancedbilling.models.containers.CouponCompoundingStrategy; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -44,7 +43,7 @@ public class Coupon private OptionalNullable archivedAt; private OptionalNullable conversionLimit; private Boolean stackable; - private CouponCompoundingStrategy compoundingStrategy; + private OptionalNullable compoundingStrategy; private Boolean useSiteExchangeRate; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -83,7 +82,7 @@ public Coupon() { * @param archivedAt ZonedDateTime value for archivedAt. * @param conversionLimit String value for conversionLimit. * @param stackable Boolean value for stackable. - * @param compoundingStrategy CouponCompoundingStrategy value for compoundingStrategy. + * @param compoundingStrategy CompoundingStrategy value for compoundingStrategy. * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. @@ -115,7 +114,7 @@ public Coupon( ZonedDateTime archivedAt, String conversionLimit, Boolean stackable, - CouponCompoundingStrategy compoundingStrategy, + CompoundingStrategy compoundingStrategy, Boolean useSiteExchangeRate, ZonedDateTime createdAt, ZonedDateTime updatedAt, @@ -145,7 +144,7 @@ public Coupon( this.archivedAt = OptionalNullable.of(archivedAt); this.conversionLimit = OptionalNullable.of(conversionLimit); this.stackable = stackable; - this.compoundingStrategy = compoundingStrategy; + this.compoundingStrategy = OptionalNullable.of(compoundingStrategy); this.useSiteExchangeRate = useSiteExchangeRate; this.createdAt = createdAt; this.updatedAt = updatedAt; @@ -179,7 +178,7 @@ public Coupon( * @param archivedAt ZonedDateTime value for archivedAt. * @param conversionLimit String value for conversionLimit. * @param stackable Boolean value for stackable. - * @param compoundingStrategy CouponCompoundingStrategy value for compoundingStrategy. + * @param compoundingStrategy CompoundingStrategy value for compoundingStrategy. * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. @@ -200,7 +199,7 @@ protected Coupon(Integer id, String name, String code, String description, OptionalNullable durationIntervalUnit, OptionalNullable durationIntervalSpan, Boolean allowNegativeBalance, OptionalNullable archivedAt, OptionalNullable conversionLimit, - Boolean stackable, CouponCompoundingStrategy compoundingStrategy, + Boolean stackable, OptionalNullable compoundingStrategy, Boolean useSiteExchangeRate, ZonedDateTime createdAt, ZonedDateTime updatedAt, DiscountType discountType, Boolean excludeMidPeriodAllocations, Boolean applyOnCancelAtEndOfPeriod, Boolean applyOnSubscriptionExpiration, @@ -817,22 +816,38 @@ public void setStackable(Boolean stackable) { } /** - * Getter for CompoundingStrategy. - * @return Returns the CouponCompoundingStrategy + * Internal Getter for CompoundingStrategy. + * @return Returns the Internal CompoundingStrategy */ @JsonGetter("compounding_strategy") @JsonInclude(JsonInclude.Include.NON_NULL) - public CouponCompoundingStrategy getCompoundingStrategy() { - return compoundingStrategy; + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetCompoundingStrategy() { + return this.compoundingStrategy; + } + + /** + * Getter for CompoundingStrategy. + * @return Returns the CompoundingStrategy + */ + public CompoundingStrategy getCompoundingStrategy() { + return OptionalNullable.getFrom(compoundingStrategy); } /** * Setter for CompoundingStrategy. - * @param compoundingStrategy Value for CouponCompoundingStrategy + * @param compoundingStrategy Value for CompoundingStrategy */ @JsonSetter("compounding_strategy") - public void setCompoundingStrategy(CouponCompoundingStrategy compoundingStrategy) { - this.compoundingStrategy = compoundingStrategy; + public void setCompoundingStrategy(CompoundingStrategy compoundingStrategy) { + this.compoundingStrategy = OptionalNullable.of(compoundingStrategy); + } + + /** + * UnSetter for CompoundingStrategy. + */ + public void unsetCompoundingStrategy() { + compoundingStrategy = null; } /** @@ -1033,7 +1048,6 @@ public Builder toBuilder() { .recurringScheme(getRecurringScheme()) .allowNegativeBalance(getAllowNegativeBalance()) .stackable(getStackable()) - .compoundingStrategy(getCompoundingStrategy()) .useSiteExchangeRate(getUseSiteExchangeRate()) .createdAt(getCreatedAt()) .updatedAt(getUpdatedAt()) @@ -1053,6 +1067,7 @@ public Builder toBuilder() { builder.durationIntervalSpan = internalGetDurationIntervalSpan(); builder.archivedAt = internalGetArchivedAt(); builder.conversionLimit = internalGetConversionLimit(); + builder.compoundingStrategy = internalGetCompoundingStrategy(); return builder; } @@ -1081,7 +1096,7 @@ public static class Builder { private OptionalNullable archivedAt; private OptionalNullable conversionLimit; private Boolean stackable; - private CouponCompoundingStrategy compoundingStrategy; + private OptionalNullable compoundingStrategy; private Boolean useSiteExchangeRate; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -1404,11 +1419,20 @@ public Builder stackable(Boolean stackable) { /** * Setter for compoundingStrategy. - * @param compoundingStrategy CouponCompoundingStrategy value for compoundingStrategy. + * @param compoundingStrategy CompoundingStrategy value for compoundingStrategy. + * @return Builder + */ + public Builder compoundingStrategy(CompoundingStrategy compoundingStrategy) { + this.compoundingStrategy = OptionalNullable.of(compoundingStrategy); + return this; + } + + /** + * UnSetter for compoundingStrategy. * @return Builder */ - public Builder compoundingStrategy(CouponCompoundingStrategy compoundingStrategy) { - this.compoundingStrategy = compoundingStrategy; + public Builder unsetCompoundingStrategy() { + compoundingStrategy = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/HistoricUsage.java b/src/main/java/com/maxio/advancedbilling/models/HistoricUsage.java new file mode 100644 index 00000000..98ed0b40 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/HistoricUsage.java @@ -0,0 +1,188 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import java.time.ZonedDateTime; + +/** + * This is a model class for HistoricUsage type. + */ +public class HistoricUsage + extends BaseModel { + private Double totalUsageQuantity; + private ZonedDateTime billingPeriodStartsAt; + private ZonedDateTime billingPeriodEndsAt; + + /** + * Default constructor. + */ + public HistoricUsage() { + } + + /** + * Initialization constructor. + * @param totalUsageQuantity Double value for totalUsageQuantity. + * @param billingPeriodStartsAt ZonedDateTime value for billingPeriodStartsAt. + * @param billingPeriodEndsAt ZonedDateTime value for billingPeriodEndsAt. + */ + public HistoricUsage( + Double totalUsageQuantity, + ZonedDateTime billingPeriodStartsAt, + ZonedDateTime billingPeriodEndsAt) { + this.totalUsageQuantity = totalUsageQuantity; + this.billingPeriodStartsAt = billingPeriodStartsAt; + this.billingPeriodEndsAt = billingPeriodEndsAt; + } + + /** + * Getter for TotalUsageQuantity. + * Total usage of a component for billing period + * @return Returns the Double + */ + @JsonGetter("total_usage_quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Double getTotalUsageQuantity() { + return totalUsageQuantity; + } + + /** + * Setter for TotalUsageQuantity. + * Total usage of a component for billing period + * @param totalUsageQuantity Value for Double + */ + @JsonSetter("total_usage_quantity") + public void setTotalUsageQuantity(Double totalUsageQuantity) { + this.totalUsageQuantity = totalUsageQuantity; + } + + /** + * Getter for BillingPeriodStartsAt. + * Start date of billing period + * @return Returns the ZonedDateTime + */ + @JsonGetter("billing_period_starts_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getBillingPeriodStartsAt() { + return billingPeriodStartsAt; + } + + /** + * Setter for BillingPeriodStartsAt. + * Start date of billing period + * @param billingPeriodStartsAt Value for ZonedDateTime + */ + @JsonSetter("billing_period_starts_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setBillingPeriodStartsAt(ZonedDateTime billingPeriodStartsAt) { + this.billingPeriodStartsAt = billingPeriodStartsAt; + } + + /** + * Getter for BillingPeriodEndsAt. + * End date of billing period + * @return Returns the ZonedDateTime + */ + @JsonGetter("billing_period_ends_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getBillingPeriodEndsAt() { + return billingPeriodEndsAt; + } + + /** + * Setter for BillingPeriodEndsAt. + * End date of billing period + * @param billingPeriodEndsAt Value for ZonedDateTime + */ + @JsonSetter("billing_period_ends_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setBillingPeriodEndsAt(ZonedDateTime billingPeriodEndsAt) { + this.billingPeriodEndsAt = billingPeriodEndsAt; + } + + /** + * Converts this HistoricUsage into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "HistoricUsage [" + "totalUsageQuantity=" + totalUsageQuantity + + ", billingPeriodStartsAt=" + billingPeriodStartsAt + ", billingPeriodEndsAt=" + + billingPeriodEndsAt + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link HistoricUsage.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link HistoricUsage.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .totalUsageQuantity(getTotalUsageQuantity()) + .billingPeriodStartsAt(getBillingPeriodStartsAt()) + .billingPeriodEndsAt(getBillingPeriodEndsAt()); + return builder; + } + + /** + * Class to build instances of {@link HistoricUsage}. + */ + public static class Builder { + private Double totalUsageQuantity; + private ZonedDateTime billingPeriodStartsAt; + private ZonedDateTime billingPeriodEndsAt; + + + + /** + * Setter for totalUsageQuantity. + * @param totalUsageQuantity Double value for totalUsageQuantity. + * @return Builder + */ + public Builder totalUsageQuantity(Double totalUsageQuantity) { + this.totalUsageQuantity = totalUsageQuantity; + return this; + } + + /** + * Setter for billingPeriodStartsAt. + * @param billingPeriodStartsAt ZonedDateTime value for billingPeriodStartsAt. + * @return Builder + */ + public Builder billingPeriodStartsAt(ZonedDateTime billingPeriodStartsAt) { + this.billingPeriodStartsAt = billingPeriodStartsAt; + return this; + } + + /** + * Setter for billingPeriodEndsAt. + * @param billingPeriodEndsAt ZonedDateTime value for billingPeriodEndsAt. + * @return Builder + */ + public Builder billingPeriodEndsAt(ZonedDateTime billingPeriodEndsAt) { + this.billingPeriodEndsAt = billingPeriodEndsAt; + return this; + } + + /** + * Builds a new {@link HistoricUsage} object using the set fields. + * @return {@link HistoricUsage} + */ + public HistoricUsage build() { + return new HistoricUsage(totalUsageQuantity, billingPeriodStartsAt, + billingPeriodEndsAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java index 4f622f8e..89984146 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java @@ -401,7 +401,8 @@ public void setProductFamilyIds(List productFamilyIds) { /** * Getter for Include. - * Allows including additional data in the response. Use in query `include=subscription`. + * Allows including additional data in the response. Use in query + * `include=subscription,historic_usages`. * @return Returns the ListSubscriptionComponentsInclude */ @JsonGetter("include") @@ -412,7 +413,8 @@ public ListSubscriptionComponentsInclude getInclude() { /** * Setter for Include. - * Allows including additional data in the response. Use in query `include=subscription`. + * Allows including additional data in the response. Use in query + * `include=subscription,historic_usages`. * @param include Value for ListSubscriptionComponentsInclude */ @JsonSetter("include") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java index fefbf808..84961bd2 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java @@ -17,7 +17,9 @@ * ListSubscriptionComponentsInclude to be used. */ public enum ListSubscriptionComponentsInclude { - SUBSCRIPTION; + SUBSCRIPTION, + + HISTORIC_USAGES; private static TreeMap valueMap = new TreeMap<>(); @@ -25,8 +27,10 @@ public enum ListSubscriptionComponentsInclude { static { SUBSCRIPTION.value = "subscription"; + HISTORIC_USAGES.value = "historic_usages"; valueMap.put("subscription", SUBSCRIPTION); + valueMap.put("historic_usages", HISTORIC_USAGES); } /** diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java index 4150a8dc..1bb7a3b1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java @@ -26,7 +26,7 @@ public class ListSubscriptionComponentsInput { private ListSubscriptionComponentsSort sort; private String startDate; private String startDatetime; - private ListSubscriptionComponentsInclude include; + private List include; /** * Default constructor. @@ -47,7 +47,7 @@ public ListSubscriptionComponentsInput() { * @param sort ListSubscriptionComponentsSort value for sort. * @param startDate String value for startDate. * @param startDatetime String value for startDatetime. - * @param include ListSubscriptionComponentsInclude value for include. + * @param include List of ListSubscriptionComponentsInclude value for include. */ public ListSubscriptionComponentsInput( int subscriptionId, @@ -61,7 +61,7 @@ public ListSubscriptionComponentsInput( ListSubscriptionComponentsSort sort, String startDate, String startDatetime, - ListSubscriptionComponentsInclude include) { + List include) { this.subscriptionId = subscriptionId; this.dateField = dateField; this.direction = direction; @@ -330,22 +330,24 @@ public void setStartDatetime(String startDatetime) { /** * Getter for Include. - * Allows including additional data in the response. Use in query `include=subscription`. - * @return Returns the ListSubscriptionComponentsInclude + * Allows including additional data in the response. Use in query + * `include=subscription,historic_usages`. + * @return Returns the List of ListSubscriptionComponentsInclude */ @JsonGetter("include") @JsonInclude(JsonInclude.Include.NON_NULL) - public ListSubscriptionComponentsInclude getInclude() { + public List getInclude() { return include; } /** * Setter for Include. - * Allows including additional data in the response. Use in query `include=subscription`. - * @param include Value for ListSubscriptionComponentsInclude + * Allows including additional data in the response. Use in query + * `include=subscription,historic_usages`. + * @param include Value for List of ListSubscriptionComponentsInclude */ @JsonSetter("include") - public void setInclude(ListSubscriptionComponentsInclude include) { + public void setInclude(List include) { this.include = include; } @@ -399,7 +401,7 @@ public static class Builder { private ListSubscriptionComponentsSort sort; private String startDate; private String startDatetime; - private ListSubscriptionComponentsInclude include; + private List include; /** * Initialization constructor. @@ -527,10 +529,10 @@ public Builder startDatetime(String startDatetime) { /** * Setter for include. - * @param include ListSubscriptionComponentsInclude value for include. + * @param include List of ListSubscriptionComponentsInclude value for include. * @return Builder */ - public Builder include(ListSubscriptionComponentsInclude include) { + public Builder include(List include) { this.include = include; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Product.java b/src/main/java/com/maxio/advancedbilling/models/Product.java index a90998db..61e9ac7f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Product.java +++ b/src/main/java/com/maxio/advancedbilling/models/Product.java @@ -44,7 +44,7 @@ public class Product private OptionalNullable returnParams; private Boolean taxable; private OptionalNullable updateReturnUrl; - private Boolean initialChargeAfterTrial; + private OptionalNullable initialChargeAfterTrial; private Integer versionNumber; private OptionalNullable updateReturnParams; private ProductFamily productFamily; @@ -166,7 +166,7 @@ public Product( this.returnParams = OptionalNullable.of(returnParams); this.taxable = taxable; this.updateReturnUrl = OptionalNullable.of(updateReturnUrl); - this.initialChargeAfterTrial = initialChargeAfterTrial; + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); this.versionNumber = versionNumber; this.updateReturnParams = OptionalNullable.of(updateReturnParams); this.productFamily = productFamily; @@ -234,14 +234,15 @@ protected Product(Integer id, String name, OptionalNullable handle, OptionalNullable trialIntervalUnit, OptionalNullable archivedAt, Boolean requireCreditCard, OptionalNullable returnParams, Boolean taxable, - OptionalNullable updateReturnUrl, Boolean initialChargeAfterTrial, - Integer versionNumber, OptionalNullable updateReturnParams, - ProductFamily productFamily, List publicSignupPages, - String productPricePointName, Boolean requestBillingAddress, - Boolean requireBillingAddress, Boolean requireShippingAddress, - OptionalNullable taxCode, Integer defaultProductPricePointId, - OptionalNullable useSiteExchangeRate, OptionalNullable itemCategory, - Integer productPricePointId, OptionalNullable productPricePointHandle) { + OptionalNullable updateReturnUrl, + OptionalNullable initialChargeAfterTrial, Integer versionNumber, + OptionalNullable updateReturnParams, ProductFamily productFamily, + List publicSignupPages, String productPricePointName, + Boolean requestBillingAddress, Boolean requireBillingAddress, + Boolean requireShippingAddress, OptionalNullable taxCode, + Integer defaultProductPricePointId, OptionalNullable useSiteExchangeRate, + OptionalNullable itemCategory, Integer productPricePointId, + OptionalNullable productPricePointHandle) { this.id = id; this.name = name; this.handle = handle; @@ -979,13 +980,22 @@ public void unsetUpdateReturnUrl() { } /** - * Getter for InitialChargeAfterTrial. - * @return Returns the Boolean + * Internal Getter for InitialChargeAfterTrial. + * @return Returns the Internal Boolean */ @JsonGetter("initial_charge_after_trial") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetInitialChargeAfterTrial() { + return this.initialChargeAfterTrial; + } + + /** + * Getter for InitialChargeAfterTrial. + * @return Returns the Boolean + */ public Boolean getInitialChargeAfterTrial() { - return initialChargeAfterTrial; + return OptionalNullable.getFrom(initialChargeAfterTrial); } /** @@ -994,7 +1004,14 @@ public Boolean getInitialChargeAfterTrial() { */ @JsonSetter("initial_charge_after_trial") public void setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) { - this.initialChargeAfterTrial = initialChargeAfterTrial; + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); + } + + /** + * UnSetter for InitialChargeAfterTrial. + */ + public void unsetInitialChargeAfterTrial() { + initialChargeAfterTrial = null; } /** @@ -1431,7 +1448,6 @@ public Builder toBuilder() { .intervalUnit(getIntervalUnit()) .requireCreditCard(getRequireCreditCard()) .taxable(getTaxable()) - .initialChargeAfterTrial(getInitialChargeAfterTrial()) .versionNumber(getVersionNumber()) .productFamily(getProductFamily()) .publicSignupPages(getPublicSignupPages()) @@ -1453,6 +1469,7 @@ public Builder toBuilder() { builder.archivedAt = internalGetArchivedAt(); builder.returnParams = internalGetReturnParams(); builder.updateReturnUrl = internalGetUpdateReturnUrl(); + builder.initialChargeAfterTrial = internalGetInitialChargeAfterTrial(); builder.updateReturnParams = internalGetUpdateReturnParams(); builder.taxCode = internalGetTaxCode(); builder.useSiteExchangeRate = internalGetUseSiteExchangeRate(); @@ -1487,7 +1504,7 @@ public static class Builder { private OptionalNullable returnParams; private Boolean taxable; private OptionalNullable updateReturnUrl; - private Boolean initialChargeAfterTrial; + private OptionalNullable initialChargeAfterTrial; private Integer versionNumber; private OptionalNullable updateReturnParams; private ProductFamily productFamily; @@ -1839,7 +1856,16 @@ public Builder unsetUpdateReturnUrl() { * @return Builder */ public Builder initialChargeAfterTrial(Boolean initialChargeAfterTrial) { - this.initialChargeAfterTrial = initialChargeAfterTrial; + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); + return this; + } + + /** + * UnSetter for initialChargeAfterTrial. + * @return Builder + */ + public Builder unsetInitialChargeAfterTrial() { + initialChargeAfterTrial = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java index e6d45028..0e9a7dac 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java @@ -24,19 +24,19 @@ public class ProductPricePoint extends BaseModel { private Integer id; private String name; - private String handle; + private OptionalNullable handle; private Long priceInCents; private Integer interval; private IntervalUnit intervalUnit; - private Long trialPriceInCents; - private Integer trialInterval; - private IntervalUnit trialIntervalUnit; + private OptionalNullable trialPriceInCents; + private OptionalNullable trialInterval; + private OptionalNullable trialIntervalUnit; private String trialType; - private Boolean introductoryOffer; - private Long initialChargeInCents; - private Boolean initialChargeAfterTrial; - private Integer expirationInterval; - private IntervalUnit expirationIntervalUnit; + private OptionalNullable introductoryOffer; + private OptionalNullable initialChargeInCents; + private OptionalNullable initialChargeAfterTrial; + private OptionalNullable expirationInterval; + private OptionalNullable expirationIntervalUnit; private Integer productId; private OptionalNullable archivedAt; private ZonedDateTime createdAt; @@ -107,19 +107,19 @@ public ProductPricePoint( List currencyPrices) { this.id = id; this.name = name; - this.handle = handle; + this.handle = OptionalNullable.of(handle); this.priceInCents = priceInCents; this.interval = interval; this.intervalUnit = intervalUnit; - this.trialPriceInCents = trialPriceInCents; - this.trialInterval = trialInterval; - this.trialIntervalUnit = trialIntervalUnit; + this.trialPriceInCents = OptionalNullable.of(trialPriceInCents); + this.trialInterval = OptionalNullable.of(trialInterval); + this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit); this.trialType = trialType; - this.introductoryOffer = introductoryOffer; - this.initialChargeInCents = initialChargeInCents; - this.initialChargeAfterTrial = initialChargeAfterTrial; - this.expirationInterval = expirationInterval; - this.expirationIntervalUnit = expirationIntervalUnit; + this.introductoryOffer = OptionalNullable.of(introductoryOffer); + this.initialChargeInCents = OptionalNullable.of(initialChargeInCents); + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); + this.expirationInterval = OptionalNullable.of(expirationInterval); + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); this.productId = productId; this.archivedAt = OptionalNullable.of(archivedAt); this.createdAt = createdAt; @@ -159,11 +159,15 @@ public ProductPricePoint( * @param currencyPrices List of CurrencyPrice value for currencyPrices. */ - protected ProductPricePoint(Integer id, String name, String handle, Long priceInCents, - Integer interval, IntervalUnit intervalUnit, Long trialPriceInCents, - Integer trialInterval, IntervalUnit trialIntervalUnit, String trialType, - Boolean introductoryOffer, Long initialChargeInCents, Boolean initialChargeAfterTrial, - Integer expirationInterval, IntervalUnit expirationIntervalUnit, Integer productId, + protected ProductPricePoint(Integer id, String name, OptionalNullable handle, + Long priceInCents, Integer interval, IntervalUnit intervalUnit, + OptionalNullable trialPriceInCents, OptionalNullable trialInterval, + OptionalNullable trialIntervalUnit, String trialType, + OptionalNullable introductoryOffer, + OptionalNullable initialChargeInCents, + OptionalNullable initialChargeAfterTrial, + OptionalNullable expirationInterval, + OptionalNullable expirationIntervalUnit, Integer productId, OptionalNullable archivedAt, ZonedDateTime createdAt, ZonedDateTime updatedAt, Boolean useSiteExchangeRate, PricePointType type, Boolean taxIncluded, OptionalNullable subscriptionId, @@ -235,14 +239,24 @@ public void setName(String name) { } /** - * Getter for Handle. + * Internal Getter for Handle. * The product price point API handle - * @return Returns the String + * @return Returns the Internal String */ @JsonGetter("handle") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetHandle() { + return this.handle; + } + + /** + * Getter for Handle. + * The product price point API handle + * @return Returns the String + */ public String getHandle() { - return handle; + return OptionalNullable.getFrom(handle); } /** @@ -252,7 +266,15 @@ public String getHandle() { */ @JsonSetter("handle") public void setHandle(String handle) { - this.handle = handle; + this.handle = OptionalNullable.of(handle); + } + + /** + * UnSetter for Handle. + * The product price point API handle + */ + public void unsetHandle() { + handle = null; } /** @@ -321,14 +343,24 @@ public void setIntervalUnit(IntervalUnit intervalUnit) { } /** - * Getter for TrialPriceInCents. + * Internal Getter for TrialPriceInCents. * The product price point trial price, in integer cents - * @return Returns the Long + * @return Returns the Internal Long */ @JsonGetter("trial_price_in_cents") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetTrialPriceInCents() { + return this.trialPriceInCents; + } + + /** + * Getter for TrialPriceInCents. + * The product price point trial price, in integer cents + * @return Returns the Long + */ public Long getTrialPriceInCents() { - return trialPriceInCents; + return OptionalNullable.getFrom(trialPriceInCents); } /** @@ -338,19 +370,38 @@ public Long getTrialPriceInCents() { */ @JsonSetter("trial_price_in_cents") public void setTrialPriceInCents(Long trialPriceInCents) { - this.trialPriceInCents = trialPriceInCents; + this.trialPriceInCents = OptionalNullable.of(trialPriceInCents); } /** - * Getter for TrialInterval. + * UnSetter for TrialPriceInCents. + * The product price point trial price, in integer cents + */ + public void unsetTrialPriceInCents() { + trialPriceInCents = null; + } + + /** + * Internal Getter for TrialInterval. * The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of * day would mean this product price point trial would last 30 days - * @return Returns the Integer + * @return Returns the Internal Integer */ @JsonGetter("trial_interval") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetTrialInterval() { + return this.trialInterval; + } + + /** + * Getter for TrialInterval. + * The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of + * day would mean this product price point trial would last 30 days + * @return Returns the Integer + */ public Integer getTrialInterval() { - return trialInterval; + return OptionalNullable.getFrom(trialInterval); } /** @@ -361,19 +412,39 @@ public Integer getTrialInterval() { */ @JsonSetter("trial_interval") public void setTrialInterval(Integer trialInterval) { - this.trialInterval = trialInterval; + this.trialInterval = OptionalNullable.of(trialInterval); } /** - * Getter for TrialIntervalUnit. + * UnSetter for TrialInterval. + * The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of + * day would mean this product price point trial would last 30 days + */ + public void unsetTrialInterval() { + trialInterval = null; + } + + /** + * Internal Getter for TrialIntervalUnit. * A string representing the trial interval unit for this product price point, either month or * day - * @return Returns the IntervalUnit + * @return Returns the Internal IntervalUnit */ @JsonGetter("trial_interval_unit") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetTrialIntervalUnit() { + return this.trialIntervalUnit; + } + + /** + * Getter for TrialIntervalUnit. + * A string representing the trial interval unit for this product price point, either month or + * day + * @return Returns the IntervalUnit + */ public IntervalUnit getTrialIntervalUnit() { - return trialIntervalUnit; + return OptionalNullable.getFrom(trialIntervalUnit); } /** @@ -384,7 +455,16 @@ public IntervalUnit getTrialIntervalUnit() { */ @JsonSetter("trial_interval_unit") public void setTrialIntervalUnit(IntervalUnit trialIntervalUnit) { - this.trialIntervalUnit = trialIntervalUnit; + this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit); + } + + /** + * UnSetter for TrialIntervalUnit. + * A string representing the trial interval unit for this product price point, either month or + * day + */ + public void unsetTrialIntervalUnit() { + trialIntervalUnit = null; } /** @@ -407,14 +487,24 @@ public void setTrialType(String trialType) { } /** - * Getter for IntroductoryOffer. + * Internal Getter for IntroductoryOffer. * reserved for future use - * @return Returns the Boolean + * @return Returns the Internal Boolean */ @JsonGetter("introductory_offer") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetIntroductoryOffer() { + return this.introductoryOffer; + } + + /** + * Getter for IntroductoryOffer. + * reserved for future use + * @return Returns the Boolean + */ public Boolean getIntroductoryOffer() { - return introductoryOffer; + return OptionalNullable.getFrom(introductoryOffer); } /** @@ -424,18 +514,36 @@ public Boolean getIntroductoryOffer() { */ @JsonSetter("introductory_offer") public void setIntroductoryOffer(Boolean introductoryOffer) { - this.introductoryOffer = introductoryOffer; + this.introductoryOffer = OptionalNullable.of(introductoryOffer); } /** - * Getter for InitialChargeInCents. + * UnSetter for IntroductoryOffer. + * reserved for future use + */ + public void unsetIntroductoryOffer() { + introductoryOffer = null; + } + + /** + * Internal Getter for InitialChargeInCents. * The product price point initial charge, in integer cents - * @return Returns the Long + * @return Returns the Internal Long */ @JsonGetter("initial_charge_in_cents") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetInitialChargeInCents() { + return this.initialChargeInCents; + } + + /** + * Getter for InitialChargeInCents. + * The product price point initial charge, in integer cents + * @return Returns the Long + */ public Long getInitialChargeInCents() { - return initialChargeInCents; + return OptionalNullable.getFrom(initialChargeInCents); } /** @@ -445,17 +553,34 @@ public Long getInitialChargeInCents() { */ @JsonSetter("initial_charge_in_cents") public void setInitialChargeInCents(Long initialChargeInCents) { - this.initialChargeInCents = initialChargeInCents; + this.initialChargeInCents = OptionalNullable.of(initialChargeInCents); } /** - * Getter for InitialChargeAfterTrial. - * @return Returns the Boolean + * UnSetter for InitialChargeInCents. + * The product price point initial charge, in integer cents + */ + public void unsetInitialChargeInCents() { + initialChargeInCents = null; + } + + /** + * Internal Getter for InitialChargeAfterTrial. + * @return Returns the Internal Boolean */ @JsonGetter("initial_charge_after_trial") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetInitialChargeAfterTrial() { + return this.initialChargeAfterTrial; + } + + /** + * Getter for InitialChargeAfterTrial. + * @return Returns the Boolean + */ public Boolean getInitialChargeAfterTrial() { - return initialChargeAfterTrial; + return OptionalNullable.getFrom(initialChargeAfterTrial); } /** @@ -464,20 +589,39 @@ public Boolean getInitialChargeAfterTrial() { */ @JsonSetter("initial_charge_after_trial") public void setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) { - this.initialChargeAfterTrial = initialChargeAfterTrial; + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); } /** - * Getter for ExpirationInterval. + * UnSetter for InitialChargeAfterTrial. + */ + public void unsetInitialChargeAfterTrial() { + initialChargeAfterTrial = null; + } + + /** + * Internal Getter for ExpirationInterval. * The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an * expiration_interval_unit of day would mean this product price point would expire after 30 * days - * @return Returns the Integer + * @return Returns the Internal Integer */ @JsonGetter("expiration_interval") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetExpirationInterval() { + return this.expirationInterval; + } + + /** + * Getter for ExpirationInterval. + * The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an + * expiration_interval_unit of day would mean this product price point would expire after 30 + * days + * @return Returns the Integer + */ public Integer getExpirationInterval() { - return expirationInterval; + return OptionalNullable.getFrom(expirationInterval); } /** @@ -489,19 +633,40 @@ public Integer getExpirationInterval() { */ @JsonSetter("expiration_interval") public void setExpirationInterval(Integer expirationInterval) { - this.expirationInterval = expirationInterval; + this.expirationInterval = OptionalNullable.of(expirationInterval); } /** - * Getter for ExpirationIntervalUnit. + * UnSetter for ExpirationInterval. + * The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an + * expiration_interval_unit of day would mean this product price point would expire after 30 + * days + */ + public void unsetExpirationInterval() { + expirationInterval = null; + } + + /** + * Internal Getter for ExpirationIntervalUnit. * A string representing the expiration interval unit for this product price point, either month * or day - * @return Returns the IntervalUnit + * @return Returns the Internal IntervalUnit */ @JsonGetter("expiration_interval_unit") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetExpirationIntervalUnit() { + return this.expirationIntervalUnit; + } + + /** + * Getter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either month + * or day + * @return Returns the IntervalUnit + */ public IntervalUnit getExpirationIntervalUnit() { - return expirationIntervalUnit; + return OptionalNullable.getFrom(expirationIntervalUnit); } /** @@ -512,7 +677,16 @@ public IntervalUnit getExpirationIntervalUnit() { */ @JsonSetter("expiration_interval_unit") public void setExpirationIntervalUnit(IntervalUnit expirationIntervalUnit) { - this.expirationIntervalUnit = expirationIntervalUnit; + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + } + + /** + * UnSetter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either month + * or day + */ + public void unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; } /** @@ -782,19 +956,10 @@ public Builder toBuilder() { Builder builder = new Builder() .id(getId()) .name(getName()) - .handle(getHandle()) .priceInCents(getPriceInCents()) .interval(getInterval()) .intervalUnit(getIntervalUnit()) - .trialPriceInCents(getTrialPriceInCents()) - .trialInterval(getTrialInterval()) - .trialIntervalUnit(getTrialIntervalUnit()) .trialType(getTrialType()) - .introductoryOffer(getIntroductoryOffer()) - .initialChargeInCents(getInitialChargeInCents()) - .initialChargeAfterTrial(getInitialChargeAfterTrial()) - .expirationInterval(getExpirationInterval()) - .expirationIntervalUnit(getExpirationIntervalUnit()) .productId(getProductId()) .createdAt(getCreatedAt()) .updatedAt(getUpdatedAt()) @@ -802,6 +967,15 @@ public Builder toBuilder() { .type(getType()) .taxIncluded(getTaxIncluded()) .currencyPrices(getCurrencyPrices()); + builder.handle = internalGetHandle(); + builder.trialPriceInCents = internalGetTrialPriceInCents(); + builder.trialInterval = internalGetTrialInterval(); + builder.trialIntervalUnit = internalGetTrialIntervalUnit(); + builder.introductoryOffer = internalGetIntroductoryOffer(); + builder.initialChargeInCents = internalGetInitialChargeInCents(); + builder.initialChargeAfterTrial = internalGetInitialChargeAfterTrial(); + builder.expirationInterval = internalGetExpirationInterval(); + builder.expirationIntervalUnit = internalGetExpirationIntervalUnit(); builder.archivedAt = internalGetArchivedAt(); builder.subscriptionId = internalGetSubscriptionId(); return builder; @@ -813,19 +987,19 @@ public Builder toBuilder() { public static class Builder { private Integer id; private String name; - private String handle; + private OptionalNullable handle; private Long priceInCents; private Integer interval; private IntervalUnit intervalUnit; - private Long trialPriceInCents; - private Integer trialInterval; - private IntervalUnit trialIntervalUnit; + private OptionalNullable trialPriceInCents; + private OptionalNullable trialInterval; + private OptionalNullable trialIntervalUnit; private String trialType; - private Boolean introductoryOffer; - private Long initialChargeInCents; - private Boolean initialChargeAfterTrial; - private Integer expirationInterval; - private IntervalUnit expirationIntervalUnit; + private OptionalNullable introductoryOffer; + private OptionalNullable initialChargeInCents; + private OptionalNullable initialChargeAfterTrial; + private OptionalNullable expirationInterval; + private OptionalNullable expirationIntervalUnit; private Integer productId; private OptionalNullable archivedAt; private ZonedDateTime createdAt; @@ -864,7 +1038,16 @@ public Builder name(String name) { * @return Builder */ public Builder handle(String handle) { - this.handle = handle; + this.handle = OptionalNullable.of(handle); + return this; + } + + /** + * UnSetter for handle. + * @return Builder + */ + public Builder unsetHandle() { + handle = null; return this; } @@ -904,7 +1087,16 @@ public Builder intervalUnit(IntervalUnit intervalUnit) { * @return Builder */ public Builder trialPriceInCents(Long trialPriceInCents) { - this.trialPriceInCents = trialPriceInCents; + this.trialPriceInCents = OptionalNullable.of(trialPriceInCents); + return this; + } + + /** + * UnSetter for trialPriceInCents. + * @return Builder + */ + public Builder unsetTrialPriceInCents() { + trialPriceInCents = null; return this; } @@ -914,7 +1106,16 @@ public Builder trialPriceInCents(Long trialPriceInCents) { * @return Builder */ public Builder trialInterval(Integer trialInterval) { - this.trialInterval = trialInterval; + this.trialInterval = OptionalNullable.of(trialInterval); + return this; + } + + /** + * UnSetter for trialInterval. + * @return Builder + */ + public Builder unsetTrialInterval() { + trialInterval = null; return this; } @@ -924,7 +1125,16 @@ public Builder trialInterval(Integer trialInterval) { * @return Builder */ public Builder trialIntervalUnit(IntervalUnit trialIntervalUnit) { - this.trialIntervalUnit = trialIntervalUnit; + this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit); + return this; + } + + /** + * UnSetter for trialIntervalUnit. + * @return Builder + */ + public Builder unsetTrialIntervalUnit() { + trialIntervalUnit = null; return this; } @@ -944,7 +1154,16 @@ public Builder trialType(String trialType) { * @return Builder */ public Builder introductoryOffer(Boolean introductoryOffer) { - this.introductoryOffer = introductoryOffer; + this.introductoryOffer = OptionalNullable.of(introductoryOffer); + return this; + } + + /** + * UnSetter for introductoryOffer. + * @return Builder + */ + public Builder unsetIntroductoryOffer() { + introductoryOffer = null; return this; } @@ -954,7 +1173,16 @@ public Builder introductoryOffer(Boolean introductoryOffer) { * @return Builder */ public Builder initialChargeInCents(Long initialChargeInCents) { - this.initialChargeInCents = initialChargeInCents; + this.initialChargeInCents = OptionalNullable.of(initialChargeInCents); + return this; + } + + /** + * UnSetter for initialChargeInCents. + * @return Builder + */ + public Builder unsetInitialChargeInCents() { + initialChargeInCents = null; return this; } @@ -964,7 +1192,16 @@ public Builder initialChargeInCents(Long initialChargeInCents) { * @return Builder */ public Builder initialChargeAfterTrial(Boolean initialChargeAfterTrial) { - this.initialChargeAfterTrial = initialChargeAfterTrial; + this.initialChargeAfterTrial = OptionalNullable.of(initialChargeAfterTrial); + return this; + } + + /** + * UnSetter for initialChargeAfterTrial. + * @return Builder + */ + public Builder unsetInitialChargeAfterTrial() { + initialChargeAfterTrial = null; return this; } @@ -974,7 +1211,16 @@ public Builder initialChargeAfterTrial(Boolean initialChargeAfterTrial) { * @return Builder */ public Builder expirationInterval(Integer expirationInterval) { - this.expirationInterval = expirationInterval; + this.expirationInterval = OptionalNullable.of(expirationInterval); + return this; + } + + /** + * UnSetter for expirationInterval. + * @return Builder + */ + public Builder unsetExpirationInterval() { + expirationInterval = null; return this; } @@ -984,7 +1230,16 @@ public Builder expirationInterval(Integer expirationInterval) { * @return Builder */ public Builder expirationIntervalUnit(IntervalUnit expirationIntervalUnit) { - this.expirationIntervalUnit = expirationIntervalUnit; + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + return this; + } + + /** + * UnSetter for expirationIntervalUnit. + * @return Builder + */ + public Builder unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Subscription.java b/src/main/java/com/maxio/advancedbilling/models/Subscription.java index 993f6064..3ffd7289 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Subscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/Subscription.java @@ -28,11 +28,11 @@ public class Subscription private Long totalRevenueInCents; private Long productPriceInCents; private Integer productVersionNumber; - private ZonedDateTime currentPeriodEndsAt; - private ZonedDateTime nextAssessmentAt; + private OptionalNullable currentPeriodEndsAt; + private OptionalNullable nextAssessmentAt; private OptionalNullable trialStartedAt; private OptionalNullable trialEndedAt; - private ZonedDateTime activatedAt; + private OptionalNullable activatedAt; private OptionalNullable expiresAt; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -40,7 +40,7 @@ public class Subscription private OptionalNullable cancellationMethod; private OptionalNullable cancelAtEndOfPeriod; private OptionalNullable canceledAt; - private ZonedDateTime currentPeriodStartedAt; + private OptionalNullable currentPeriodStartedAt; private SubscriptionState previousState; private Integer signupPaymentId; private String signupRevenue; @@ -82,7 +82,7 @@ public class Subscription private OptionalNullable scheduledCancellationAt; private Long creditBalanceInCents; private Long prepaymentBalanceInCents; - private PrepaidConfiguration prepaidConfiguration; + private OptionalNullable prepaidConfiguration; private String selfServicePageToken; /** @@ -227,11 +227,11 @@ public Subscription( this.totalRevenueInCents = totalRevenueInCents; this.productPriceInCents = productPriceInCents; this.productVersionNumber = productVersionNumber; - this.currentPeriodEndsAt = currentPeriodEndsAt; - this.nextAssessmentAt = nextAssessmentAt; + this.currentPeriodEndsAt = OptionalNullable.of(currentPeriodEndsAt); + this.nextAssessmentAt = OptionalNullable.of(nextAssessmentAt); this.trialStartedAt = OptionalNullable.of(trialStartedAt); this.trialEndedAt = OptionalNullable.of(trialEndedAt); - this.activatedAt = activatedAt; + this.activatedAt = OptionalNullable.of(activatedAt); this.expiresAt = OptionalNullable.of(expiresAt); this.createdAt = createdAt; this.updatedAt = updatedAt; @@ -239,7 +239,7 @@ public Subscription( this.cancellationMethod = OptionalNullable.of(cancellationMethod); this.cancelAtEndOfPeriod = OptionalNullable.of(cancelAtEndOfPeriod); this.canceledAt = OptionalNullable.of(canceledAt); - this.currentPeriodStartedAt = currentPeriodStartedAt; + this.currentPeriodStartedAt = OptionalNullable.of(currentPeriodStartedAt); this.previousState = previousState; this.signupPaymentId = signupPaymentId; this.signupRevenue = signupRevenue; @@ -282,7 +282,7 @@ public Subscription( this.scheduledCancellationAt = OptionalNullable.of(scheduledCancellationAt); this.creditBalanceInCents = creditBalanceInCents; this.prepaymentBalanceInCents = prepaymentBalanceInCents; - this.prepaidConfiguration = prepaidConfiguration; + this.prepaidConfiguration = OptionalNullable.of(prepaidConfiguration); this.selfServicePageToken = selfServicePageToken; } @@ -355,15 +355,18 @@ public Subscription( protected Subscription(Integer id, SubscriptionState state, Long balanceInCents, Long totalRevenueInCents, Long productPriceInCents, Integer productVersionNumber, - ZonedDateTime currentPeriodEndsAt, ZonedDateTime nextAssessmentAt, + OptionalNullable currentPeriodEndsAt, + OptionalNullable nextAssessmentAt, OptionalNullable trialStartedAt, - OptionalNullable trialEndedAt, ZonedDateTime activatedAt, - OptionalNullable expiresAt, ZonedDateTime createdAt, - ZonedDateTime updatedAt, OptionalNullable cancellationMessage, + OptionalNullable trialEndedAt, + OptionalNullable activatedAt, OptionalNullable expiresAt, + ZonedDateTime createdAt, ZonedDateTime updatedAt, + OptionalNullable cancellationMessage, OptionalNullable cancellationMethod, OptionalNullable cancelAtEndOfPeriod, - OptionalNullable canceledAt, ZonedDateTime currentPeriodStartedAt, - SubscriptionState previousState, Integer signupPaymentId, String signupRevenue, + OptionalNullable canceledAt, + OptionalNullable currentPeriodStartedAt, SubscriptionState previousState, + Integer signupPaymentId, String signupRevenue, OptionalNullable delayedCancelAt, OptionalNullable couponCode, OptionalNullable snapDay, CollectionMethod paymentCollectionMethod, Customer customer, Product product, CreditCardPaymentProfile creditCard, @@ -385,7 +388,8 @@ protected Subscription(Integer id, SubscriptionState state, Long balanceInCents, OptionalNullable receivesInvoiceEmails, OptionalNullable locale, String currency, OptionalNullable scheduledCancellationAt, Long creditBalanceInCents, Long prepaymentBalanceInCents, - PrepaidConfiguration prepaidConfiguration, String selfServicePageToken) { + OptionalNullable prepaidConfiguration, + String selfServicePageToken) { this.id = id; this.state = state; this.balanceInCents = balanceInCents; @@ -671,16 +675,26 @@ public void setProductVersionNumber(Integer productVersionNumber) { } /** - * Getter for CurrentPeriodEndsAt. + * Internal Getter for CurrentPeriodEndsAt. * Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly * scheduled attempted charge will occur) - * @return Returns the ZonedDateTime + * @return Returns the Internal ZonedDateTime */ @JsonGetter("current_period_ends_at") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetCurrentPeriodEndsAt() { + return this.currentPeriodEndsAt; + } + + /** + * Getter for CurrentPeriodEndsAt. + * Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly + * scheduled attempted charge will occur) + * @return Returns the ZonedDateTime + */ public ZonedDateTime getCurrentPeriodEndsAt() { - return currentPeriodEndsAt; + return OptionalNullable.getFrom(currentPeriodEndsAt); } /** @@ -692,23 +706,45 @@ public ZonedDateTime getCurrentPeriodEndsAt() { @JsonSetter("current_period_ends_at") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setCurrentPeriodEndsAt(ZonedDateTime currentPeriodEndsAt) { - this.currentPeriodEndsAt = currentPeriodEndsAt; + this.currentPeriodEndsAt = OptionalNullable.of(currentPeriodEndsAt); } /** - * Getter for NextAssessmentAt. + * UnSetter for CurrentPeriodEndsAt. + * Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly + * scheduled attempted charge will occur) + */ + public void unsetCurrentPeriodEndsAt() { + currentPeriodEndsAt = null; + } + + /** + * Internal Getter for NextAssessmentAt. * Timestamp that indicates when capture of payment will be tried or,retried. This value will * usually track the current_period_ends_at, but,will diverge if a renewal payment fails and * must be retried. In that,case, the current_period_ends_at will advance to the end of the * next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will * be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) - * @return Returns the ZonedDateTime + * @return Returns the Internal ZonedDateTime */ @JsonGetter("next_assessment_at") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetNextAssessmentAt() { + return this.nextAssessmentAt; + } + + /** + * Getter for NextAssessmentAt. + * Timestamp that indicates when capture of payment will be tried or,retried. This value will + * usually track the current_period_ends_at, but,will diverge if a renewal payment fails and + * must be retried. In that,case, the current_period_ends_at will advance to the end of the + * next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will + * be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) + * @return Returns the ZonedDateTime + */ public ZonedDateTime getNextAssessmentAt() { - return nextAssessmentAt; + return OptionalNullable.getFrom(nextAssessmentAt); } /** @@ -723,7 +759,19 @@ public ZonedDateTime getNextAssessmentAt() { @JsonSetter("next_assessment_at") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setNextAssessmentAt(ZonedDateTime nextAssessmentAt) { - this.nextAssessmentAt = nextAssessmentAt; + this.nextAssessmentAt = OptionalNullable.of(nextAssessmentAt); + } + + /** + * UnSetter for NextAssessmentAt. + * Timestamp that indicates when capture of payment will be tried or,retried. This value will + * usually track the current_period_ends_at, but,will diverge if a renewal payment fails and + * must be retried. In that,case, the current_period_ends_at will advance to the end of the + * next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will + * be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) + */ + public void unsetNextAssessmentAt() { + nextAssessmentAt = null; } /** @@ -807,16 +855,26 @@ public void unsetTrialEndedAt() { } /** - * Getter for ActivatedAt. + * Internal Getter for ActivatedAt. * Timestamp for when the subscription began (i.e. when it came out of trial, or when it began * in the case of no trial) - * @return Returns the ZonedDateTime + * @return Returns the Internal ZonedDateTime */ @JsonGetter("activated_at") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetActivatedAt() { + return this.activatedAt; + } + + /** + * Getter for ActivatedAt. + * Timestamp for when the subscription began (i.e. when it came out of trial, or when it began + * in the case of no trial) + * @return Returns the ZonedDateTime + */ public ZonedDateTime getActivatedAt() { - return activatedAt; + return OptionalNullable.getFrom(activatedAt); } /** @@ -828,7 +886,16 @@ public ZonedDateTime getActivatedAt() { @JsonSetter("activated_at") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setActivatedAt(ZonedDateTime activatedAt) { - this.activatedAt = activatedAt; + this.activatedAt = OptionalNullable.of(activatedAt); + } + + /** + * UnSetter for ActivatedAt. + * Timestamp for when the subscription began (i.e. when it came out of trial, or when it began + * in the case of no trial) + */ + public void unsetActivatedAt() { + activatedAt = null; } /** @@ -1079,15 +1146,24 @@ public void unsetCanceledAt() { } /** - * Getter for CurrentPeriodStartedAt. + * Internal Getter for CurrentPeriodStartedAt. * Timestamp relating to the start of the current (recurring) period - * @return Returns the ZonedDateTime + * @return Returns the Internal ZonedDateTime */ @JsonGetter("current_period_started_at") @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetCurrentPeriodStartedAt() { + return this.currentPeriodStartedAt; + } + + /** + * Getter for CurrentPeriodStartedAt. + * Timestamp relating to the start of the current (recurring) period + * @return Returns the ZonedDateTime + */ public ZonedDateTime getCurrentPeriodStartedAt() { - return currentPeriodStartedAt; + return OptionalNullable.getFrom(currentPeriodStartedAt); } /** @@ -1098,7 +1174,15 @@ public ZonedDateTime getCurrentPeriodStartedAt() { @JsonSetter("current_period_started_at") @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) public void setCurrentPeriodStartedAt(ZonedDateTime currentPeriodStartedAt) { - this.currentPeriodStartedAt = currentPeriodStartedAt; + this.currentPeriodStartedAt = OptionalNullable.of(currentPeriodStartedAt); + } + + /** + * UnSetter for CurrentPeriodStartedAt. + * Timestamp relating to the start of the current (recurring) period + */ + public void unsetCurrentPeriodStartedAt() { + currentPeriodStartedAt = null; } /** @@ -2415,13 +2499,22 @@ public void setPrepaymentBalanceInCents(Long prepaymentBalanceInCents) { } /** - * Getter for PrepaidConfiguration. - * @return Returns the PrepaidConfiguration + * Internal Getter for PrepaidConfiguration. + * @return Returns the Internal PrepaidConfiguration */ @JsonGetter("prepaid_configuration") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetPrepaidConfiguration() { + return this.prepaidConfiguration; + } + + /** + * Getter for PrepaidConfiguration. + * @return Returns the PrepaidConfiguration + */ public PrepaidConfiguration getPrepaidConfiguration() { - return prepaidConfiguration; + return OptionalNullable.getFrom(prepaidConfiguration); } /** @@ -2430,7 +2523,14 @@ public PrepaidConfiguration getPrepaidConfiguration() { */ @JsonSetter("prepaid_configuration") public void setPrepaidConfiguration(PrepaidConfiguration prepaidConfiguration) { - this.prepaidConfiguration = prepaidConfiguration; + this.prepaidConfiguration = OptionalNullable.of(prepaidConfiguration); + } + + /** + * UnSetter for PrepaidConfiguration. + */ + public void unsetPrepaidConfiguration() { + prepaidConfiguration = null; } /** @@ -2512,12 +2612,8 @@ public Builder toBuilder() { .totalRevenueInCents(getTotalRevenueInCents()) .productPriceInCents(getProductPriceInCents()) .productVersionNumber(getProductVersionNumber()) - .currentPeriodEndsAt(getCurrentPeriodEndsAt()) - .nextAssessmentAt(getNextAssessmentAt()) - .activatedAt(getActivatedAt()) .createdAt(getCreatedAt()) .updatedAt(getUpdatedAt()) - .currentPeriodStartedAt(getCurrentPeriodStartedAt()) .previousState(getPreviousState()) .signupPaymentId(getSignupPaymentId()) .signupRevenue(getSignupRevenue()) @@ -2536,15 +2632,18 @@ public Builder toBuilder() { .currency(getCurrency()) .creditBalanceInCents(getCreditBalanceInCents()) .prepaymentBalanceInCents(getPrepaymentBalanceInCents()) - .prepaidConfiguration(getPrepaidConfiguration()) .selfServicePageToken(getSelfServicePageToken()); + builder.currentPeriodEndsAt = internalGetCurrentPeriodEndsAt(); + builder.nextAssessmentAt = internalGetNextAssessmentAt(); builder.trialStartedAt = internalGetTrialStartedAt(); builder.trialEndedAt = internalGetTrialEndedAt(); + builder.activatedAt = internalGetActivatedAt(); builder.expiresAt = internalGetExpiresAt(); builder.cancellationMessage = internalGetCancellationMessage(); builder.cancellationMethod = internalGetCancellationMethod(); builder.cancelAtEndOfPeriod = internalGetCancelAtEndOfPeriod(); builder.canceledAt = internalGetCanceledAt(); + builder.currentPeriodStartedAt = internalGetCurrentPeriodStartedAt(); builder.delayedCancelAt = internalGetDelayedCancelAt(); builder.couponCode = internalGetCouponCode(); builder.snapDay = internalGetSnapDay(); @@ -2568,6 +2667,7 @@ public Builder toBuilder() { builder.receivesInvoiceEmails = internalGetReceivesInvoiceEmails(); builder.locale = internalGetLocale(); builder.scheduledCancellationAt = internalGetScheduledCancellationAt(); + builder.prepaidConfiguration = internalGetPrepaidConfiguration(); return builder; } @@ -2581,11 +2681,11 @@ public static class Builder { private Long totalRevenueInCents; private Long productPriceInCents; private Integer productVersionNumber; - private ZonedDateTime currentPeriodEndsAt; - private ZonedDateTime nextAssessmentAt; + private OptionalNullable currentPeriodEndsAt; + private OptionalNullable nextAssessmentAt; private OptionalNullable trialStartedAt; private OptionalNullable trialEndedAt; - private ZonedDateTime activatedAt; + private OptionalNullable activatedAt; private OptionalNullable expiresAt; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; @@ -2593,7 +2693,7 @@ public static class Builder { private OptionalNullable cancellationMethod; private OptionalNullable cancelAtEndOfPeriod; private OptionalNullable canceledAt; - private ZonedDateTime currentPeriodStartedAt; + private OptionalNullable currentPeriodStartedAt; private SubscriptionState previousState; private Integer signupPaymentId; private String signupRevenue; @@ -2635,7 +2735,7 @@ public static class Builder { private OptionalNullable scheduledCancellationAt; private Long creditBalanceInCents; private Long prepaymentBalanceInCents; - private PrepaidConfiguration prepaidConfiguration; + private OptionalNullable prepaidConfiguration; private String selfServicePageToken; @@ -2706,7 +2806,16 @@ public Builder productVersionNumber(Integer productVersionNumber) { * @return Builder */ public Builder currentPeriodEndsAt(ZonedDateTime currentPeriodEndsAt) { - this.currentPeriodEndsAt = currentPeriodEndsAt; + this.currentPeriodEndsAt = OptionalNullable.of(currentPeriodEndsAt); + return this; + } + + /** + * UnSetter for currentPeriodEndsAt. + * @return Builder + */ + public Builder unsetCurrentPeriodEndsAt() { + currentPeriodEndsAt = null; return this; } @@ -2716,7 +2825,16 @@ public Builder currentPeriodEndsAt(ZonedDateTime currentPeriodEndsAt) { * @return Builder */ public Builder nextAssessmentAt(ZonedDateTime nextAssessmentAt) { - this.nextAssessmentAt = nextAssessmentAt; + this.nextAssessmentAt = OptionalNullable.of(nextAssessmentAt); + return this; + } + + /** + * UnSetter for nextAssessmentAt. + * @return Builder + */ + public Builder unsetNextAssessmentAt() { + nextAssessmentAt = null; return this; } @@ -2764,7 +2882,16 @@ public Builder unsetTrialEndedAt() { * @return Builder */ public Builder activatedAt(ZonedDateTime activatedAt) { - this.activatedAt = activatedAt; + this.activatedAt = OptionalNullable.of(activatedAt); + return this; + } + + /** + * UnSetter for activatedAt. + * @return Builder + */ + public Builder unsetActivatedAt() { + activatedAt = null; return this; } @@ -2889,7 +3016,16 @@ public Builder unsetCanceledAt() { * @return Builder */ public Builder currentPeriodStartedAt(ZonedDateTime currentPeriodStartedAt) { - this.currentPeriodStartedAt = currentPeriodStartedAt; + this.currentPeriodStartedAt = OptionalNullable.of(currentPeriodStartedAt); + return this; + } + + /** + * UnSetter for currentPeriodStartedAt. + * @return Builder + */ + public Builder unsetCurrentPeriodStartedAt() { + currentPeriodStartedAt = null; return this; } @@ -3521,7 +3657,16 @@ public Builder prepaymentBalanceInCents(Long prepaymentBalanceInCents) { * @return Builder */ public Builder prepaidConfiguration(PrepaidConfiguration prepaidConfiguration) { - this.prepaidConfiguration = prepaidConfiguration; + this.prepaidConfiguration = OptionalNullable.of(prepaidConfiguration); + return this; + } + + /** + * UnSetter for prepaidConfiguration. + * @return Builder + */ + public Builder unsetPrepaidConfiguration() { + prepaidConfiguration = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java index 99d8d876..43d6dff4 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java @@ -13,10 +13,10 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.models.containers.SubscriptionComponentAllocatedQuantity; -import com.maxio.advancedbilling.models.containers.SubscriptionComponentPricePointType; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; +import java.util.List; /** * This is a model class for SubscriptionComponent type. @@ -41,7 +41,7 @@ public class SubscriptionComponent private OptionalNullable archivedAt; private OptionalNullable pricePointId; private OptionalNullable pricePointHandle; - private SubscriptionComponentPricePointType pricePointType; + private OptionalNullable pricePointType; private OptionalNullable pricePointName; private Integer productFamilyId; private String productFamilyHandle; @@ -51,6 +51,7 @@ public class SubscriptionComponent private OptionalNullable description; private Boolean allowFractionalQuantities; private SubscriptionComponentSubscription subscription; + private List historicUsages; private Boolean displayOnHostedPage; private Integer interval; private IntervalUnit intervalUnit; @@ -82,7 +83,7 @@ public SubscriptionComponent() { * @param archivedAt ZonedDateTime value for archivedAt. * @param pricePointId Integer value for pricePointId. * @param pricePointHandle String value for pricePointHandle. - * @param pricePointType SubscriptionComponentPricePointType value for pricePointType. + * @param pricePointType PricePointType value for pricePointType. * @param pricePointName String value for pricePointName. * @param productFamilyId Integer value for productFamilyId. * @param productFamilyHandle String value for productFamilyHandle. @@ -92,6 +93,7 @@ public SubscriptionComponent() { * @param description String value for description. * @param allowFractionalQuantities Boolean value for allowFractionalQuantities. * @param subscription SubscriptionComponentSubscription value for subscription. + * @param historicUsages List of HistoricUsage value for historicUsages. * @param displayOnHostedPage Boolean value for displayOnHostedPage. * @param interval Integer value for interval. * @param intervalUnit IntervalUnit value for intervalUnit. @@ -115,7 +117,7 @@ public SubscriptionComponent( ZonedDateTime archivedAt, Integer pricePointId, String pricePointHandle, - SubscriptionComponentPricePointType pricePointType, + PricePointType pricePointType, String pricePointName, Integer productFamilyId, String productFamilyHandle, @@ -125,6 +127,7 @@ public SubscriptionComponent( String description, Boolean allowFractionalQuantities, SubscriptionComponentSubscription subscription, + List historicUsages, Boolean displayOnHostedPage, Integer interval, IntervalUnit intervalUnit) { @@ -146,7 +149,7 @@ public SubscriptionComponent( this.archivedAt = OptionalNullable.of(archivedAt); this.pricePointId = OptionalNullable.of(pricePointId); this.pricePointHandle = OptionalNullable.of(pricePointHandle); - this.pricePointType = pricePointType; + this.pricePointType = OptionalNullable.of(pricePointType); this.pricePointName = OptionalNullable.of(pricePointName); this.productFamilyId = productFamilyId; this.productFamilyHandle = productFamilyHandle; @@ -156,6 +159,7 @@ public SubscriptionComponent( this.description = OptionalNullable.of(description); this.allowFractionalQuantities = allowFractionalQuantities; this.subscription = subscription; + this.historicUsages = historicUsages; this.displayOnHostedPage = displayOnHostedPage; this.interval = interval; this.intervalUnit = intervalUnit; @@ -182,7 +186,7 @@ public SubscriptionComponent( * @param archivedAt ZonedDateTime value for archivedAt. * @param pricePointId Integer value for pricePointId. * @param pricePointHandle String value for pricePointHandle. - * @param pricePointType SubscriptionComponentPricePointType value for pricePointType. + * @param pricePointType PricePointType value for pricePointType. * @param pricePointName String value for pricePointName. * @param productFamilyId Integer value for productFamilyId. * @param productFamilyHandle String value for productFamilyHandle. @@ -192,6 +196,7 @@ public SubscriptionComponent( * @param description String value for description. * @param allowFractionalQuantities Boolean value for allowFractionalQuantities. * @param subscription SubscriptionComponentSubscription value for subscription. + * @param historicUsages List of HistoricUsage value for historicUsages. * @param displayOnHostedPage Boolean value for displayOnHostedPage. * @param interval Integer value for interval. * @param intervalUnit IntervalUnit value for intervalUnit. @@ -206,12 +211,13 @@ protected SubscriptionComponent(Integer id, String name, ComponentKind kind, Str OptionalNullable downgradeCredit, OptionalNullable archivedAt, OptionalNullable pricePointId, OptionalNullable pricePointHandle, - SubscriptionComponentPricePointType pricePointType, + OptionalNullable pricePointType, OptionalNullable pricePointName, Integer productFamilyId, String productFamilyHandle, ZonedDateTime createdAt, ZonedDateTime updatedAt, OptionalNullable useSiteExchangeRate, OptionalNullable description, Boolean allowFractionalQuantities, SubscriptionComponentSubscription subscription, - Boolean displayOnHostedPage, Integer interval, IntervalUnit intervalUnit) { + List historicUsages, Boolean displayOnHostedPage, Integer interval, + IntervalUnit intervalUnit) { this.id = id; this.name = name; this.kind = kind; @@ -240,6 +246,7 @@ protected SubscriptionComponent(Integer id, String name, ComponentKind kind, Str this.description = description; this.allowFractionalQuantities = allowFractionalQuantities; this.subscription = subscription; + this.historicUsages = historicUsages; this.displayOnHostedPage = displayOnHostedPage; this.interval = interval; this.intervalUnit = intervalUnit; @@ -725,22 +732,38 @@ public void unsetPricePointHandle() { } /** - * Getter for PricePointType. - * @return Returns the SubscriptionComponentPricePointType + * Internal Getter for PricePointType. + * @return Returns the Internal PricePointType */ @JsonGetter("price_point_type") @JsonInclude(JsonInclude.Include.NON_NULL) - public SubscriptionComponentPricePointType getPricePointType() { - return pricePointType; + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetPricePointType() { + return this.pricePointType; + } + + /** + * Getter for PricePointType. + * @return Returns the PricePointType + */ + public PricePointType getPricePointType() { + return OptionalNullable.getFrom(pricePointType); } /** * Setter for PricePointType. - * @param pricePointType Value for SubscriptionComponentPricePointType + * @param pricePointType Value for PricePointType */ @JsonSetter("price_point_type") - public void setPricePointType(SubscriptionComponentPricePointType pricePointType) { - this.pricePointType = pricePointType; + public void setPricePointType(PricePointType pricePointType) { + this.pricePointType = OptionalNullable.of(pricePointType); + } + + /** + * UnSetter for PricePointType. + */ + public void unsetPricePointType() { + pricePointType = null; } /** @@ -968,6 +991,25 @@ public void setSubscription(SubscriptionComponentSubscription subscription) { this.subscription = subscription; } + /** + * Getter for HistoricUsages. + * @return Returns the List of HistoricUsage + */ + @JsonGetter("historic_usages") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getHistoricUsages() { + return historicUsages; + } + + /** + * Setter for HistoricUsages. + * @param historicUsages Value for List of HistoricUsage + */ + @JsonSetter("historic_usages") + public void setHistoricUsages(List historicUsages) { + this.historicUsages = historicUsages; + } + /** * Getter for DisplayOnHostedPage. * @return Returns the Boolean @@ -1054,9 +1096,9 @@ public String toString() { + productFamilyHandle + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + ", useSiteExchangeRate=" + useSiteExchangeRate + ", description=" + description + ", allowFractionalQuantities=" + allowFractionalQuantities + ", subscription=" - + subscription + ", displayOnHostedPage=" + displayOnHostedPage + ", interval=" - + interval + ", intervalUnit=" + intervalUnit + ", additionalProperties=" - + getAdditionalProperties() + "]"; + + subscription + ", historicUsages=" + historicUsages + ", displayOnHostedPage=" + + displayOnHostedPage + ", interval=" + interval + ", intervalUnit=" + intervalUnit + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -1077,13 +1119,13 @@ public Builder toBuilder() { .componentId(getComponentId()) .subscriptionId(getSubscriptionId()) .recurring(getRecurring()) - .pricePointType(getPricePointType()) .productFamilyId(getProductFamilyId()) .productFamilyHandle(getProductFamilyHandle()) .createdAt(getCreatedAt()) .updatedAt(getUpdatedAt()) .allowFractionalQuantities(getAllowFractionalQuantities()) .subscription(getSubscription()) + .historicUsages(getHistoricUsages()) .displayOnHostedPage(getDisplayOnHostedPage()) .interval(getInterval()) .intervalUnit(getIntervalUnit()); @@ -1094,6 +1136,7 @@ public Builder toBuilder() { builder.archivedAt = internalGetArchivedAt(); builder.pricePointId = internalGetPricePointId(); builder.pricePointHandle = internalGetPricePointHandle(); + builder.pricePointType = internalGetPricePointType(); builder.pricePointName = internalGetPricePointName(); builder.useSiteExchangeRate = internalGetUseSiteExchangeRate(); builder.description = internalGetDescription(); @@ -1122,7 +1165,7 @@ public static class Builder { private OptionalNullable archivedAt; private OptionalNullable pricePointId; private OptionalNullable pricePointHandle; - private SubscriptionComponentPricePointType pricePointType; + private OptionalNullable pricePointType; private OptionalNullable pricePointName; private Integer productFamilyId; private String productFamilyHandle; @@ -1132,6 +1175,7 @@ public static class Builder { private OptionalNullable description; private Boolean allowFractionalQuantities; private SubscriptionComponentSubscription subscription; + private List historicUsages; private Boolean displayOnHostedPage; private Integer interval; private IntervalUnit intervalUnit; @@ -1385,11 +1429,20 @@ public Builder unsetPricePointHandle() { /** * Setter for pricePointType. - * @param pricePointType SubscriptionComponentPricePointType value for pricePointType. + * @param pricePointType PricePointType value for pricePointType. * @return Builder */ - public Builder pricePointType(SubscriptionComponentPricePointType pricePointType) { - this.pricePointType = pricePointType; + public Builder pricePointType(PricePointType pricePointType) { + this.pricePointType = OptionalNullable.of(pricePointType); + return this; + } + + /** + * UnSetter for pricePointType. + * @return Builder + */ + public Builder unsetPricePointType() { + pricePointType = null; return this; } @@ -1510,6 +1563,16 @@ public Builder subscription(SubscriptionComponentSubscription subscription) { return this; } + /** + * Setter for historicUsages. + * @param historicUsages List of HistoricUsage value for historicUsages. + * @return Builder + */ + public Builder historicUsages(List historicUsages) { + this.historicUsages = historicUsages; + return this; + } + /** * Setter for displayOnHostedPage. * @param displayOnHostedPage Boolean value for displayOnHostedPage. @@ -1550,8 +1613,8 @@ public SubscriptionComponent build() { subscriptionId, recurring, upgradeCharge, downgradeCredit, archivedAt, pricePointId, pricePointHandle, pricePointType, pricePointName, productFamilyId, productFamilyHandle, createdAt, updatedAt, useSiteExchangeRate, description, - allowFractionalQuantities, subscription, displayOnHostedPage, interval, - intervalUnit); + allowFractionalQuantities, subscription, historicUsages, displayOnHostedPage, + interval, intervalUnit); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentResponse.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentResponse.java index 5d968ca3..66e0bed1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentResponse.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; /** * This is a model class for SubscriptionGroupPrepaymentResponse type. @@ -20,7 +22,7 @@ public class SubscriptionGroupPrepaymentResponse private Long amountInCents; private Long endingBalanceInCents; private ServiceCreditType entryType; - private String memo; + private OptionalNullable memo; /** * Default constructor. @@ -46,6 +48,25 @@ public SubscriptionGroupPrepaymentResponse( this.amountInCents = amountInCents; this.endingBalanceInCents = endingBalanceInCents; this.entryType = entryType; + this.memo = OptionalNullable.of(memo); + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param amountInCents Long value for amountInCents. + * @param endingBalanceInCents Long value for endingBalanceInCents. + * @param entryType ServiceCreditType value for entryType. + * @param memo String value for memo. + */ + + protected SubscriptionGroupPrepaymentResponse(Integer id, Long amountInCents, + Long endingBalanceInCents, ServiceCreditType entryType, + OptionalNullable memo) { + this.id = id; + this.amountInCents = amountInCents; + this.endingBalanceInCents = endingBalanceInCents; + this.entryType = entryType; this.memo = memo; } @@ -132,14 +153,24 @@ public void setEntryType(ServiceCreditType entryType) { } /** - * Getter for Memo. + * Internal Getter for Memo. * A memo attached to the entry. - * @return Returns the String + * @return Returns the Internal String */ @JsonGetter("memo") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMemo() { + return this.memo; + } + + /** + * Getter for Memo. + * A memo attached to the entry. + * @return Returns the String + */ public String getMemo() { - return memo; + return OptionalNullable.getFrom(memo); } /** @@ -149,7 +180,15 @@ public String getMemo() { */ @JsonSetter("memo") public void setMemo(String memo) { - this.memo = memo; + this.memo = OptionalNullable.of(memo); + } + + /** + * UnSetter for Memo. + * A memo attached to the entry. + */ + public void unsetMemo() { + memo = null; } /** @@ -174,8 +213,8 @@ public Builder toBuilder() { .id(getId()) .amountInCents(getAmountInCents()) .endingBalanceInCents(getEndingBalanceInCents()) - .entryType(getEntryType()) - .memo(getMemo()); + .entryType(getEntryType()); + builder.memo = internalGetMemo(); return builder; } @@ -187,7 +226,7 @@ public static class Builder { private Long amountInCents; private Long endingBalanceInCents; private ServiceCreditType entryType; - private String memo; + private OptionalNullable memo; @@ -237,7 +276,16 @@ public Builder entryType(ServiceCreditType entryType) { * @return Builder */ public Builder memo(String memo) { - this.memo = memo; + this.memo = OptionalNullable.of(memo); + return this; + } + + /** + * UnSetter for memo. + * @return Builder + */ + public Builder unsetMemo() { + memo = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Usage.java b/src/main/java/com/maxio/advancedbilling/models/Usage.java index d2953088..892ebc98 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Usage.java +++ b/src/main/java/com/maxio/advancedbilling/models/Usage.java @@ -14,6 +14,7 @@ import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.models.containers.UsageQuantity; import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; /** @@ -22,7 +23,7 @@ public class Usage extends BaseModel { private Long id; - private String memo; + private OptionalNullable memo; private ZonedDateTime createdAt; private Integer pricePointId; private UsageQuantity quantity; @@ -60,6 +61,33 @@ public Usage( String componentHandle, Integer subscriptionId) { this.id = id; + this.memo = OptionalNullable.of(memo); + this.createdAt = createdAt; + this.pricePointId = pricePointId; + this.quantity = quantity; + this.overageQuantity = overageQuantity; + this.componentId = componentId; + this.componentHandle = componentHandle; + this.subscriptionId = subscriptionId; + } + + /** + * Initialization constructor. + * @param id Long value for id. + * @param memo String value for memo. + * @param createdAt ZonedDateTime value for createdAt. + * @param pricePointId Integer value for pricePointId. + * @param quantity UsageQuantity value for quantity. + * @param overageQuantity Integer value for overageQuantity. + * @param componentId Integer value for componentId. + * @param componentHandle String value for componentHandle. + * @param subscriptionId Integer value for subscriptionId. + */ + + protected Usage(Long id, OptionalNullable memo, ZonedDateTime createdAt, + Integer pricePointId, UsageQuantity quantity, Integer overageQuantity, + Integer componentId, String componentHandle, Integer subscriptionId) { + this.id = id; this.memo = memo; this.createdAt = createdAt; this.pricePointId = pricePointId; @@ -90,13 +118,22 @@ public void setId(Long id) { } /** - * Getter for Memo. - * @return Returns the String + * Internal Getter for Memo. + * @return Returns the Internal String */ @JsonGetter("memo") @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetMemo() { + return this.memo; + } + + /** + * Getter for Memo. + * @return Returns the String + */ public String getMemo() { - return memo; + return OptionalNullable.getFrom(memo); } /** @@ -105,7 +142,14 @@ public String getMemo() { */ @JsonSetter("memo") public void setMemo(String memo) { - this.memo = memo; + this.memo = OptionalNullable.of(memo); + } + + /** + * UnSetter for Memo. + */ + public void unsetMemo() { + memo = null; } /** @@ -264,7 +308,6 @@ public String toString() { public Builder toBuilder() { Builder builder = new Builder() .id(getId()) - .memo(getMemo()) .createdAt(getCreatedAt()) .pricePointId(getPricePointId()) .quantity(getQuantity()) @@ -272,6 +315,7 @@ public Builder toBuilder() { .componentId(getComponentId()) .componentHandle(getComponentHandle()) .subscriptionId(getSubscriptionId()); + builder.memo = internalGetMemo(); return builder; } @@ -280,7 +324,7 @@ public Builder toBuilder() { */ public static class Builder { private Long id; - private String memo; + private OptionalNullable memo; private ZonedDateTime createdAt; private Integer pricePointId; private UsageQuantity quantity; @@ -307,7 +351,16 @@ public Builder id(Long id) { * @return Builder */ public Builder memo(String memo) { - this.memo = memo; + this.memo = OptionalNullable.of(memo); + return this; + } + + /** + * UnSetter for memo. + * @return Builder + */ + public Builder unsetMemo() { + memo = null; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CouponCompoundingStrategy.java b/src/main/java/com/maxio/advancedbilling/models/containers/CouponCompoundingStrategy.java deleted file mode 100644 index 0bf23255..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CouponCompoundingStrategy.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * AdvancedBilling - * - * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package com.maxio.advancedbilling.models.containers; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.ObjectCodec; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.models.CompoundingStrategy; -import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; -import java.io.IOException; -import java.util.Arrays; - -/** - * This is a container class for any-of types. - */ -@JsonDeserialize(using = CouponCompoundingStrategy.CouponCompoundingStrategyDeserializer.class) -public abstract class CouponCompoundingStrategy { - - /** - * This is Compounding Strategy case. - * @param compoundingStrategy CompoundingStrategy value for compoundingStrategy. - * @return The CompoundingStrategyCase object. - */ - public static CouponCompoundingStrategy fromCompoundingStrategy( - CompoundingStrategy compoundingStrategy) { - return compoundingStrategy == null ? null : new CompoundingStrategyCase(compoundingStrategy); - } - - /** - * Method to match from the provided any-of cases. - * @param The type to return after applying callback. - * @param cases The any-of type cases callback. - * @return The any-of matched case. - */ - public abstract R match(Cases cases); - - /** - * This is interface for any-of cases. - * @param The type to return after applying callback. - */ - public interface Cases { - R compoundingStrategy(CompoundingStrategy compoundingStrategy); - } - - /** - * This is a implementation class for CompoundingStrategyCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "CompoundingStrategy") - private static class CompoundingStrategyCase extends CouponCompoundingStrategy { - - @JsonValue - private CompoundingStrategy compoundingStrategy; - - CompoundingStrategyCase(CompoundingStrategy compoundingStrategy) { - this.compoundingStrategy = compoundingStrategy; - } - - @Override - public R match(Cases cases) { - return cases.compoundingStrategy(this.compoundingStrategy); - } - - @JsonCreator - private CompoundingStrategyCase(JsonNode jsonNode) throws IOException { - this.compoundingStrategy = - CompoundingStrategy.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.compoundingStrategy == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return compoundingStrategy.toString(); - } - } - - /** - * This is a custom deserializer class for CouponCompoundingStrategy. - */ - protected static class CouponCompoundingStrategyDeserializer - extends JsonDeserializer { - - @Override - public CouponCompoundingStrategy deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(CompoundingStrategyCase.class), false); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricePointType.java b/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricePointType.java deleted file mode 100644 index 4ca9b4fe..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricePointType.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * AdvancedBilling - * - * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). - */ - -package com.maxio.advancedbilling.models.containers; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.ObjectCodec; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.models.PricePointType; -import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; -import java.io.IOException; -import java.util.Arrays; - -/** - * This is a container class for one-of types. - */ -@JsonDeserialize(using = SubscriptionComponentPricePointType.SubscriptionComponentPricePointTypeDeserializer.class) -public abstract class SubscriptionComponentPricePointType { - - /** - * This is Price Point Type case. - * @param pricePointType PricePointType value for pricePointType. - * @return The PricePointTypeCase object. - */ - public static SubscriptionComponentPricePointType fromPricePointType( - PricePointType pricePointType) { - return pricePointType == null ? null : new PricePointTypeCase(pricePointType); - } - - /** - * Method to match from the provided one-of cases. - * @param The type to return after applying callback. - * @param cases The one-of type cases callback. - * @return The one-of matched case. - */ - public abstract R match(Cases cases); - - /** - * This is interface for one-of cases. - * @param The type to return after applying callback. - */ - public interface Cases { - R pricePointType(PricePointType pricePointType); - } - - /** - * This is a implementation class for PricePointTypeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "PricePointType") - private static class PricePointTypeCase extends SubscriptionComponentPricePointType { - - @JsonValue - private PricePointType pricePointType; - - PricePointTypeCase(PricePointType pricePointType) { - this.pricePointType = pricePointType; - } - - @Override - public R match(Cases cases) { - return cases.pricePointType(this.pricePointType); - } - - @JsonCreator - private PricePointTypeCase(JsonNode jsonNode) throws IOException { - this.pricePointType = - PricePointType.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.pricePointType == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return pricePointType.toString(); - } - } - - /** - * This is a custom deserializer class for SubscriptionComponentPricePointType. - */ - protected static class SubscriptionComponentPricePointTypeDeserializer - extends JsonDeserializer { - - @Override - public SubscriptionComponentPricePointType deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(PricePointTypeCase.class), true); - } - } - -} From e05066982d74e2fa89610a23856883dbad602883 Mon Sep 17 00:00:00 2001 From: Maciej Nedza Date: Tue, 7 May 2024 08:21:58 +0200 Subject: [PATCH 2/2] [DE-799] Fix tests after SDK update --- .../SubscriptionComponentsControllerListForSiteTest.java | 2 +- .../SubscriptionComponentsControllerListTest.java | 3 ++- .../subscriptions/SubscriptionsControllerCreateTest.java | 3 +-- .../subscriptions/SubscriptionsControllerUpdateTest.java | 4 ++-- .../advancedbilling/utils/matchers/UsageQuantityGetter.java | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListForSiteTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListForSiteTest.java index b44a98dd..4cbd0008 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListForSiteTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListForSiteTest.java @@ -73,7 +73,7 @@ static void setup() throws IOException, ApiException { .listSubscriptionComponents(new ListSubscriptionComponentsInput() .toBuilder() .subscriptionId(subscription.getId()) - .include(ListSubscriptionComponentsInclude.SUBSCRIPTION) + .include(List.of(ListSubscriptionComponentsInclude.SUBSCRIPTION)) .build() ); } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListTest.java index ea250d00..9911b04b 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptioncomponents/SubscriptionComponentsControllerListTest.java @@ -20,6 +20,7 @@ import org.junit.jupiter.api.Test; import java.io.IOException; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.function.Function; @@ -77,7 +78,7 @@ void shouldReturnAllSubscriptionComponents() throws IOException, ApiException { .listSubscriptionComponents(new ListSubscriptionComponentsInput() .toBuilder() .subscriptionId(subscription.getId()) - .include(ListSubscriptionComponentsInclude.SUBSCRIPTION) + .include(Collections.singletonList(ListSubscriptionComponentsInclude.SUBSCRIPTION)) .build() ) .stream().map(SubscriptionComponentResponse::getComponent).toList(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerCreateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerCreateTest.java index 45d1f99e..74eaa50a 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerCreateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerCreateTest.java @@ -762,8 +762,7 @@ private void assertSubscriptionComponent(Component component1, SubscriptionCompo assertThat(subscriptionComponent1.getArchivedAt()).isNull(); assertThat(subscriptionComponent1.getPricePointId()).isNotNull(); assertThat(subscriptionComponent1.getPricePointHandle()).isNotNull(); - assertThat(subscriptionComponent1.getPricePointType().match(PricePointType::value)) - .isEqualTo("default"); + assertThat(subscriptionComponent1.getPricePointType()).isEqualTo(PricePointType.ENUM_DEFAULT); assertThat(subscriptionComponent1.getPricePointName()).isNotNull(); assertThat(subscriptionComponent1.getProductFamilyId()).isEqualTo(PRODUCT_FAMILY.getId()); assertThat(subscriptionComponent1.getProductFamilyHandle()).isEqualTo(PRODUCT_FAMILY.getHandle()); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerUpdateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerUpdateTest.java index d5a9221d..b1f5a019 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerUpdateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerUpdateTest.java @@ -147,14 +147,14 @@ void shouldUpdateComponentAndCustomPricing() throws IOException, ApiException { assertThat(subscriptionComponent1.getName()).isEqualTo(component1.getName()); PricingScheme pricingScheme1 = subscriptionComponent1.getPricingScheme(); assertThat(pricingScheme1).isEqualTo(PricingScheme.STAIRSTEP); - PricePointType pricePointType1 = subscriptionComponent1.getPricePointType().match(p -> p); + PricePointType pricePointType1 = subscriptionComponent1.getPricePointType(); assertThat(pricePointType1).isEqualTo(PricePointType.CUSTOM); SubscriptionComponent subscriptionComponent2 = componentMap.get(component2.getId()); assertThat(subscriptionComponent2.getName()).isEqualTo(component2.getName()); PricingScheme pricingScheme2 = subscriptionComponent2.getPricingScheme(); assertThat(pricingScheme2).isEqualTo(PricingScheme.PER_UNIT); - PricePointType pricePointType2 = subscriptionComponent2.getPricePointType().match(p -> p); + PricePointType pricePointType2 = subscriptionComponent2.getPricePointType(); assertThat(pricePointType2).isEqualTo(PricePointType.ENUM_DEFAULT); ComponentPricePointsResponse customPricePoint1 = CLIENT.getComponentsController().listComponentPricePoints(new ListComponentPricePointsInput.Builder() diff --git a/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/UsageQuantityGetter.java b/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/UsageQuantityGetter.java index 610ffa2b..3f85a38a 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/UsageQuantityGetter.java +++ b/tests/src/test/java/com/maxio/advancedbilling/utils/matchers/UsageQuantityGetter.java @@ -2,6 +2,7 @@ import com.maxio.advancedbilling.models.containers.UsageQuantity; +@SuppressWarnings("unchecked") public class UsageQuantityGetter implements UsageQuantity.Cases { @Override public R number(int number) {