diff --git a/README.md b/README.md index 3f2c73db..745fb9c1 100644 --- a/README.md +++ b/README.md @@ -33,16 +33,16 @@ Install the SDK by adding the following dependency in your project's pom.xml fil com.maxio advanced-billing-sdk - 2.0.0 + 3.0.0 ``` You can also view the package at: -https://mvnrepository.com/artifact/com.maxio/advanced-billing-sdk/2.0.0 +https://mvnrepository.com/artifact/com.maxio/advanced-billing-sdk/3.0.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/client.md) The following parameters are configurable for the API Client: @@ -51,8 +51,8 @@ The following parameters are configurable for the API Client: | `subdomain` | `String` | The subdomain for your Chargify site.
*Default*: `"subdomain"` | | `domain` | `String` | The Chargify server domain.
*Default*: `"chargify.com"` | | `environment` | `Environment` | The API environment.
**Default: `Environment.PRODUCTION`** | -| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-client-configuration.md) | Http Client Configuration instance. | -| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| `httpClientConfig` | [`ReadonlyHttpClientConfiguration`](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-client-configuration.md) | Http Client Configuration instance. | +| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -86,53 +86,53 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/$a/https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/billing-portal.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/billing-portal.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/controllers/webhooks.md) ## Classes Documentation -* [Utility Classes](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/utility-classes.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-string-response.md) -* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-context.md) -* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-body-request.md) -* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/headers.md) -* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/api-exception.md) -* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/configuration-interface.md) -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-client-configuration.md) -* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/2.0.0/doc/http-client-configuration-builder.md) +* [Utility Classes](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/utility-classes.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-string-response.md) +* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-context.md) +* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-body-request.md) +* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/headers.md) +* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/api-exception.md) +* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/configuration-interface.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-client-configuration.md) +* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/3.0.0/doc/http-client-configuration-builder.md) diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 44029873..9913264e 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -630,7 +630,6 @@ try { "taxable": false, "description": null, "default_price_point_id": null, - "prices": [], "price_point_count": 0, "price_points_url": "https://staging.chargify.com/components/1489581/price_points", "default_price_point_name": "Original", @@ -969,8 +968,7 @@ List listComponents( | `includeArchived` | `Boolean` | Query, Optional | Include archived items | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `filterIds` | `List` | Query, Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | +| `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | ## Response Type @@ -983,7 +981,14 @@ ListComponentsInput listComponentsInput = new ListComponentsInput.Builder() .dateField(BasicDateField.UPDATED_AT) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build(); + .filter(new ListComponentsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .build(); try { List result = componentsController.listComponents(listComponentsInput); @@ -1263,15 +1268,14 @@ List listComponentsForProductFamily( | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Chargify id of the product family | | `includeArchived` | `Boolean` | Query, Optional | Include archived items. | -| `filterIds` | `List` | Query, Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2`. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | | `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `endDate` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before 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 end_date. optional. | | `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. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | ## Response Type @@ -1283,10 +1287,17 @@ List listComponentsForProductFamily( ListComponentsForProductFamilyInput listComponentsForProductFamilyInput = new ListComponentsForProductFamilyInput.Builder( 140 ) -Liquid error: Value cannot be null. (Parameter 'key').page(2) +.page(2) .perPage(50) +.filter(new ListComponentsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) .dateField(BasicDateField.UPDATED_AT) -Liquid error: Value cannot be null. (Parameter 'key').build(); +.build(); try { List result = componentsController.listComponentsForProductFamily(listComponentsForProductFamilyInput); @@ -2113,18 +2124,11 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `filterDateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query: `filter[date_field]=created_at`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `filterEndDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or before 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 end_date. | | `include` | [`ListComponentsPricePointsInclude`](../../doc/models/list-components-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `filterStartDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points 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. | -| `filterType` | [`List`](../../doc/models/price-point-type.md) | Query, Optional | Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filterIds` | `List` | Query, Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. | -| `filterArchivedAt` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. | +| `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | ## Response Type @@ -2134,10 +2138,26 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( ```java ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllComponentPricePointsInput.Builder() -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .include(ListComponentsPricePointsInclude.CURRENCY_PRICES) + .include(ListComponentsPricePointsInclude.CURRENCY_PRICES) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build(); + .filter(new ListPricePointsFilter.Builder() + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .type(Arrays.asList( + PricePointType.CATALOG, + PricePointType.ENUM_DEFAULT, + PricePointType.CUSTOM + )) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .build(); try { ListComponentsPricePointsResponse result = componentsController.listAllComponentPricePoints(listAllComponentPricePointsInput); diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index d833726c..6aa2b0d6 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -128,15 +128,8 @@ List listCouponsForProductFamily( | `productFamilyId` | `int` | Template, Required | The Chargify id of the product family to which the coupon belongs | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `filterDateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `filter[date_field]=created_at`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[date_field]=2011-12-15`. | -| `filterEndDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. Use in query `?filter[end_datetime]=2011-12-1T10:15:30+01:00`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-17`. | -| `filterStartDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons 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. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | -| `filterIds` | `List` | Query, Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`. | -| `filterCodes` | `List` | Query, Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | +| `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `Boolean` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | ## Response Type @@ -150,8 +143,23 @@ ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCoup ) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').currencyPrices(true) -Liquid error: Value cannot be null. (Parameter 'key').build(); +.filter(new ListCouponsFilter.Builder() + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .codes(Arrays.asList( + "free", + "free_trial" + )) + .build()) +.currencyPrices(true) +.build(); try { List result = couponsController.listCouponsForProductFamily(listCouponsForProductFamilyInput); @@ -189,7 +197,6 @@ try { "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", - "coupon_restrictions": [], "use_site_exchange_rate": true } }, @@ -215,7 +222,6 @@ try { "conversion_limit": "100", "stackable": false, "compounding_strategy": "compound", - "coupon_restrictions": [], "use_site_exchange_rate": true } }, @@ -360,8 +366,7 @@ try { "archived_at": null, "conversion_limit": null, "stackable": true, - "compounding_strategy": "compound", - "coupon_restrictions": [] + "compounding_strategy": "compound" } } ``` @@ -461,8 +466,7 @@ try { "archived_at": null, "conversion_limit": null, "stackable": true, - "compounding_strategy": "compound", - "coupon_restrictions": [] + "compounding_strategy": "compound" } } ``` @@ -531,8 +535,7 @@ try { "archived_at": "2016-12-02T13:09:33-05:00", "conversion_limit": null, "stackable": true, - "compounding_strategy": "compound", - "coupon_restrictions": [] + "compounding_strategy": "compound" } } ``` @@ -555,20 +558,8 @@ List listCoupons( | --- | --- | --- | --- | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The field was deprecated: on January 20, 2022. We recommend using filter[date_field] instead to achieve the same result. The type of filter you would like to apply to your search. | -| `startDate` | `LocalDate` | Query, Optional | The field was deprecated: on January 20, 2022. We recommend using filter[start_date] instead to achieve the same result. The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `endDate` | `LocalDate` | Query, Optional | The field was deprecated: on January 20, 2022. We recommend using filter[end_date] instead to achieve the same result. The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | The field was deprecated: on January 20, 2022. We recommend using filter[start_datetime] instead to achieve the same result. The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons 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. | -| `endDatetime` | `ZonedDateTime` | Query, Optional | The field was deprecated: on January 20, 2022. We recommend using filter[end_datetime] instead to achieve the same result. The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. | -| `filterIds` | `List` | Query, Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`. | -| `filterCodes` | `List` | Query, Optional | Allows fetching coupons with matching code based on provided values. Use in query `filter[ids]=1,2,3`. | +| `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | | `currencyPrices` | `Boolean` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-17`. | -| `filterEndDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. Use in query `filter[end_datetime]=2011-12-19T10:15:30+01:00`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-19`. | -| `filterStartDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons 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. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | -| `filterDateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `filter[date_field]=updated_at`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | ## Response Type @@ -580,12 +571,23 @@ List listCoupons( ListCouponsInput listCouponsInput = new ListCouponsInput.Builder() .page(2) .perPage(50) - .dateField(BasicDateField.UPDATED_AT) - .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) - .startDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) - .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .currencyPrices(true) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build(); + .filter(new ListCouponsFilter.Builder() + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .codes(Arrays.asList( + "free", + "free_trial" + )) + .build()) + .currencyPrices(true) + .build(); try { List result = couponsController.listCoupons(listCouponsInput); @@ -798,8 +800,7 @@ try { "archived_at": null, "conversion_limit": null, "stackable": true, - "compounding_strategy": "full-price", - "coupon_restrictions": [] + "compounding_strategy": "full-price" } } ``` @@ -955,9 +956,7 @@ try { "BALTIMOREFALL", "ORLANDOFALL", "DETROITFALL" - ], - "duplicate_codes": [], - "invalid_codes": [] + ] } ``` diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 8ab7857d..25bd1410 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -104,7 +104,6 @@ try { { "name": "Color", "scope": { - "hosted": [], "csv": "0", "statements": "0", "invoices": "0", @@ -117,7 +116,6 @@ try { { "name": "Brand", "scope": { - "hosted": [], "csv": "0", "statements": "0", "invoices": "0", @@ -520,8 +518,8 @@ Void deleteMetadata( ```java ResourceType resourceType = ResourceType.SUBSCRIPTIONS; int resourceId = 60; -Liquid error: Value cannot be null. (Parameter 'key')try { - customFieldsController.deleteMetadata(resourceType, resourceId, null, Liquid error: Value cannot be null. (Parameter 'key')); +try { + customFieldsController.deleteMetadata(resourceType, resourceId, null, null); } catch (ApiException e) { e.printStackTrace(); } catch (IOException e) { @@ -586,7 +584,7 @@ ListMetadataForResourceTypeInput listMetadataForResourceTypeInput = new ListMeta .page(2) .perPage(50) .dateField(BasicDateField.UPDATED_AT) -Liquid error: Value cannot be null. (Parameter 'key').build(); +.build(); try { PaginatedMetadata result = customFieldsController.listMetadataForResourceType(listMetadataForResourceTypeInput); diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 63fd77b0..0bf5d89b 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -118,10 +118,7 @@ ListSegmentsResponse listSegmentsForPricePoint( | `pricePointId` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `filterSegmentProperty1Value` | `String` | Query, Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_1` on attached Metric. If empty string is passed, this filter would be rejected. Use in query `filter[segment_property_1_value]=EU`. | -| `filterSegmentProperty2Value` | `String` | Query, Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_2` on attached Metric. If empty string is passed, this filter would be rejected. | -| `filterSegmentProperty3Value` | `String` | Query, Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_3` on attached Metric. If empty string is passed, this filter would be rejected. | -| `filterSegmentProperty4Value` | `String` | Query, Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_4` on attached Metric. If empty string is passed, this filter would be rejected. | +| `filter` | [`ListSegmentsFilter`](../../doc/models/list-segments-filter.md) | Query, Optional | Filter to use for List Segments for a Price Point operation | ## Response Type @@ -136,7 +133,10 @@ ListSegmentsForPricePointInput listSegmentsForPricePointInput = new ListSegments ) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').build(); +.filter(new ListSegmentsFilter.Builder() + .segmentProperty1Value("EU") + .build()) +.build(); try { ListSegmentsResponse result = eventsBasedBillingSegmentsController.listSegmentsForPricePoint(listSegmentsForPricePointInput); diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index d13e1a30..5a3a046a 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -259,7 +259,7 @@ SubscriptionMRRResponse listMrrPerSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `filterSubscriptionIds` | `List` | Query, Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`. | +| `filter` | [`ListMrrFilter`](../../doc/models/list-mrr-filter.md) | Query, Optional | Filter to use for List MRR per subscription operation | | `atTime` | `String` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | @@ -273,7 +273,14 @@ SubscriptionMRRResponse listMrrPerSubscription( ```java ListMrrPerSubscriptionInput listMrrPerSubscriptionInput = new ListMrrPerSubscriptionInput.Builder() -Liquid error: Value cannot be null. (Parameter 'key') .atTime("at_time=2022-01-10T10:00:00-05:00") + .filter(new ListMrrFilter.Builder() + .subscriptionIds(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .atTime("at_time=2022-01-10T10:00:00-05:00") .page(2) .perPage(50) .direction(Direction.DESC) diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index b24f5c71..ae5f5c12 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -568,9 +568,6 @@ try { "price_point_id": null } ], - "discounts": [], - "taxes": [], - "credits": [], "payments": [ { "transaction_time": "2018-07-26T15:22:02Z", @@ -588,8 +585,6 @@ try { "prepayment": false } ], - "refunds": [], - "custom_fields": [], "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" } ``` @@ -736,7 +731,6 @@ try { "organization": null, "email": "evan4@example.com" }, - "recipient_emails": [], "net_terms": 0, "memo": "Thanks for your business! If you have any questions, please contact your account manager.", "billing_address": { @@ -1002,8 +996,6 @@ try { "total_amount": "168.61", "paid_amount": "168.61", "due_amount": "0.0", - "credits": [], - "refunds": [], "payments": [ { "memo": "Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment", @@ -1021,7 +1013,6 @@ try { "prepayment": false } ], - "custom_fields": [], "display_settings": { "hide_zero_subtotal_lines": false, "include_discounts_on_lines": false @@ -2714,12 +2705,6 @@ try { "price_point_id": null } ], - "discounts": [], - "taxes": [], - "credits": [], - "payments": [], - "refunds": [], - "custom_fields": [], "public_url": "https://www.test-chargifypay.com/invoice/inv_98nbmb93gxjz8?token=rmfmwvbdy4xmyw5f29j5gc6x" } } diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index ca1b755f..48eb5a73 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -201,8 +201,7 @@ try { "price_point_id": 149438, "price_point_name": "Auto-created", "starting_quantity": "0.0", - "editable": false, - "currency_prices": [] + "editable": false } ], "offer_discounts": [ diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 6eb34f17..e05e476f 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -33,14 +33,13 @@ List listProductsForProductFamily( | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | | `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | +| `filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | | `startDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `endDate` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM 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 products 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. | | `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before 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 end_date. | | `includeArchived` | `Boolean` | Query, Optional | Include archived products | | `include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | -| `filterPrepaidProductPricePointProductPricePointId` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | ## Response Type @@ -56,7 +55,7 @@ ListProductsForProductFamilyInput listProductsForProductFamilyInput = new ListPr .perPage(50) .dateField(BasicDateField.UPDATED_AT) .include(ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').build(); +.build(); try { List result = productFamiliesController.listProductsForProductFamily(listProductsForProductFamilyInput); diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 530cd1f7..6bc51840 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -567,8 +567,7 @@ try { "accounting_code": null, "created_at": "2023-12-01T06:56:12-05:00", "updated_at": "2023-12-01T06:56:12-05:00" - }, - "public_signup_pages": [] + } } } ``` @@ -863,14 +862,7 @@ ListProductPricePointsResponse listAllProductPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filterArchivedAt` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. | -| `filterDateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query: `filter[date_field]=created_at`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `filterEndDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or before 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 end_date. | -| `filterIds` | `List` | Query, Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `filterStartDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points 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. | -| `filterType` | [`List`](../../doc/models/price-point-type.md) | Query, Optional | Allows fetching price points with matching type. Use in query: `filter[type]=catalog,custom`. | +| `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | | `include` | [`ListProductsPricePointsInclude`](../../doc/models/list-products-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | @@ -883,7 +875,23 @@ ListProductPricePointsResponse listAllProductPricePoints( ```java ListAllProductPricePointsInput listAllProductPricePointsInput = new ListAllProductPricePointsInput.Builder() -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .include(ListProductsPricePointsInclude.CURRENCY_PRICES) + .filter(new ListPricePointsFilter.Builder() + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .type(Arrays.asList( + PricePointType.CATALOG, + PricePointType.ENUM_DEFAULT, + PricePointType.CUSTOM + )) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .include(ListProductsPricePointsInclude.CURRENCY_PRICES) .page(2) .perPage(50) .build(); diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 37afbb56..8508a3f2 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -201,7 +201,6 @@ try { "handle": "acme-products", "accounting_code": null }, - "public_signup_pages": [], "product_price_point_name": "Default" } } @@ -380,7 +379,6 @@ try { "handle": "acme-products", "accounting_code": null }, - "public_signup_pages": [], "product_price_point_name": "Default" } } @@ -510,6 +508,7 @@ List listProducts( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | +| `filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | | `endDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `endDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before 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 end_date. | | `startDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | @@ -518,8 +517,6 @@ List listProducts( | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | | `includeArchived` | `Boolean` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | | `include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | -| `filterPrepaidProductPricePointProductPricePointId` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | ## Response Type @@ -534,7 +531,7 @@ ListProductsInput listProductsInput = new ListProductsInput.Builder() .perPage(50) .includeArchived(true) .include(ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build(); + .build(); try { List result = productsController.listProducts(listProductsInput); diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 71107f32..c4fc619e 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -112,6 +112,7 @@ List listSubscriptionComponents( | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | | `dateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Use in query `date_field=updated_at`. | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `filter` | [`ListSubscriptionComponentsFilter`](../../doc/models/list-subscription-components-filter.md) | Query, Optional | Filter to use for List Subscription Components operation | | `endDate` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before 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 end_date. | | `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`. | @@ -120,8 +121,6 @@ List listSubscriptionComponents( | `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`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | -| `filterCurrencies` | `List` | Query, Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`. | ## Response Type @@ -134,6 +133,12 @@ ListSubscriptionComponentsInput listSubscriptionComponentsInput = new ListSubscr 222 ) .dateField(SubscriptionListDateField.UPDATED_AT) +.filter(new ListSubscriptionComponentsFilter.Builder() + .currencies(Arrays.asList( + "EUR", + "USD" + )) + .build()) .pricePointIds(IncludeNotNull.NOT_NULL) .productFamilyIds(Arrays.asList( 1, @@ -142,7 +147,7 @@ ListSubscriptionComponentsInput listSubscriptionComponentsInput = new ListSubscr )) .sort(ListSubscriptionComponentsSort.UPDATED_AT) .include(ListSubscriptionComponentsInclude.SUBSCRIPTION) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').build(); +.build(); try { List result = subscriptionComponentsController.listSubscriptionComponents(listSubscriptionComponentsInput); @@ -402,8 +407,7 @@ try { "description": "Duis", "handle": "ea dolore dolore sunt", "accounting_code": null - }, - "public_signup_pages": [] + } } } } @@ -1493,6 +1497,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | | `sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | | `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `filter` | [`ListSubscriptionComponentsForSiteFilter`](../../doc/models/list-subscription-components-for-site-filter.md) | Query, Optional | Filter to use for List Subscription Components For Site operation | | `dateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Use in query: `date_field=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. Use in query `start_date=2011-12-15`. | | `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. Use in query `start_datetime=2022-07-01 09:00:05`. | @@ -1502,14 +1507,6 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | `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`. | -| `filterUseSiteExchangeRate` | `Boolean` | Query, Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | -| `filterCurrencies` | `List` | Query, Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`. | -| `filterSubscriptionStates` | [`List`](../../doc/models/subscription-state-filter.md) | Query, Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`. | -| `filterSubscriptionDateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | -| `filterSubscriptionStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | -| `filterSubscriptionStartDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription 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. To use this filter you also have to include the following param in the request `include=subscription`. | -| `filterSubscriptionEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | -| `filterSubscriptionEndDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you also have to include the following param in the request `include=subscription`. | ## Response Type @@ -1522,6 +1519,12 @@ ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = .page(2) .perPage(50) .sort(ListSubscriptionComponentsSort.UPDATED_AT) + .filter(new ListSubscriptionComponentsForSiteFilter.Builder() + .currencies(Arrays.asList( + "EUR", + "USD" + )) + .build()) .dateField(SubscriptionListDateField.UPDATED_AT) .subscriptionIds(Arrays.asList( 1, @@ -1535,7 +1538,7 @@ ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = 3 )) .include(ListSubscriptionComponentsInclude.SUBSCRIPTION) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') .build(); + .build(); try { ListSubscriptionComponentsResponse result = subscriptionComponentsController.listSubscriptionComponentsForSite(listSubscriptionComponentsForSiteInput); diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 37bf4377..9d9d788f 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -84,11 +84,9 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `uid` | `String` | Template, Required | The uid of the subscription group | -| `filterDateField` | [`ListSubscriptionGroupPrepaymentDateField`](../../doc/models/list-subscription-group-prepayment-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `filter[date_field]=created_at`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field.
Returns prepayments with a timestamp up to and including 11:59:59PM in your site's time zone on the date specified.
Use in query: `filter[end_date]=2011-12-15`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field.
Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date specified.
Use in query: `filter[start_date]=2011-12-15`. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | +| `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type @@ -100,8 +98,13 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( ListPrepaymentsForSubscriptionGroupInput listPrepaymentsForSubscriptionGroupInput = new ListPrepaymentsForSubscriptionGroupInput.Builder( "uid0" ) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').page(2) +.page(2) .perPage(50) +.filter(new ListPrepaymentsFilter.Builder() + .dateField(ListPrepaymentDateField.CREATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .endDate(DateTimeHelper.fromSimpleDate("2024-01-31")) + .build()) .build(); try { diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 97048bc5..8e4f426e 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -194,7 +194,10 @@ ListSubscriptionGroupsResponse listSubscriptionGroups( ListSubscriptionGroupsInput listSubscriptionGroupsInput = new ListSubscriptionGroupsInput.Builder() .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key') .build(); + .include(Arrays.asList( + SubscriptionGroupsListInclude.ACCOUNT_BALANCES + )) + .build(); try { ListSubscriptionGroupsResponse result = subscriptionGroupsController.listSubscriptionGroups(listSubscriptionGroupsInput); @@ -274,8 +277,12 @@ FullSubscriptionGroupResponse readSubscriptionGroup( ```java String uid = "uid0"; -Liquid error: Value cannot be null. (Parameter 'key')try { - FullSubscriptionGroupResponse result = subscriptionGroupsController.readSubscriptionGroup(uid, Liquid error: Value cannot be null. (Parameter 'key')); +List include = Arrays.asList( + SubscriptionGroupInclude.CURRENT_BILLING_AMOUNT_IN_CENTS +); + +try { + FullSubscriptionGroupResponse result = subscriptionGroupsController.readSubscriptionGroup(uid, include); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -330,7 +337,7 @@ Liquid error: Value cannot be null. (Parameter 'key')try { # Update Subscription Group Members Use this endpoint to update subscription group members. -`"member_ids": []` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from subscription group. To clean up members, just leave the array empty. +`"member_ids"` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from subscription group. To clean up members, just leave the array empty. ```java SubscriptionGroupResponse updateSubscriptionGroupMembers( diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 7b8292ab..e9543089 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -144,9 +144,7 @@ PrepaymentsResponse listPrepayments( | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`. | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`. | -| `filterDateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. created_at - Time when prepayment was created. application_at - Time when prepayment was applied to invoice. Use in query `filter[date_field]=created_at`. | -| `filterStartDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-15`. | -| `filterEndDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | +| `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | ## Response Type @@ -160,7 +158,12 @@ ListPrepaymentsInput listPrepaymentsInput = new ListPrepaymentsInput.Builder( ) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').build(); +.filter(new ListPrepaymentsFilter.Builder() + .dateField(ListPrepaymentDateField.CREATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .endDate(DateTimeHelper.fromSimpleDate("2024-01-31")) + .build()) +.build(); try { PrepaymentsResponse result = subscriptionInvoiceAccountController.listPrepayments(listPrepaymentsInput); diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 5b4a0832..663702d0 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -110,7 +110,6 @@ try { "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": null, - "coupon_codes": [], "offer_id": null, "credit_balance_in_cents": 0, "prepayment_balance_in_cents": 0, @@ -785,7 +784,6 @@ try { "coupon_uses_allowed": null, "reason_code": null, "automatically_resume_at": "2019-01-20T00:00:00-06:00", - "coupon_codes": [], "customer": { "id": 19948683, "first_name": "Vanessa", @@ -842,8 +840,7 @@ try { "description": "", "handle": "acme-products", "accounting_code": null - }, - "public_signup_pages": [] + } }, "credit_card": { "id": 13826563, diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index a0ceee4a..f335d82f 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -902,7 +902,10 @@ ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput.Build .startDatetime(DateTimeHelper.fromRfc8601DateTime("2022-07-01 09:00:05")) .endDatetime(DateTimeHelper.fromRfc8601DateTime("2022-08-01 10:00:05")) .sort(SubscriptionSort.SIGNUP_DATE) -Liquid error: Value cannot be null. (Parameter 'key') .build(); + .include(Arrays.asList( + SubscriptionListInclude.SELF_SERVICE_PAGE_TOKEN + )) + .build(); try { List result = subscriptionsController.listSubscriptions(listSubscriptionsInput); @@ -1148,8 +1151,13 @@ SubscriptionResponse readSubscription( ```java int subscriptionId = 222; -Liquid error: Value cannot be null. (Parameter 'key')try { - SubscriptionResponse result = subscriptionsController.readSubscription(subscriptionId, Liquid error: Value cannot be null. (Parameter 'key')); +List include = Arrays.asList( + SubscriptionInclude.COUPONS, + SubscriptionInclude.SELF_SERVICE_PAGE_TOKEN +); + +try { + SubscriptionResponse result = subscriptionsController.readSubscription(subscriptionId, include); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -1436,8 +1444,13 @@ Void purgeSubscription( ```java int subscriptionId = 222; int ack = 252; -Liquid error: Value cannot be null. (Parameter 'key')try { - subscriptionsController.purgeSubscription(subscriptionId, ack, Liquid error: Value cannot be null. (Parameter 'key')); +List cascade = Arrays.asList( + SubscriptionPurgeType.CUSTOMER, + SubscriptionPurgeType.PAYMENT_PROFILE +); + +try { + subscriptionsController.purgeSubscription(subscriptionId, ack, cascade); } catch (ApiException e) { e.printStackTrace(); } catch (IOException e) { diff --git a/doc/models/allocation.md b/doc/models/allocation.md index 096838b9..f0c809e7 100644 --- a/doc/models/allocation.md +++ b/doc/models/allocation.md @@ -30,7 +30,7 @@ | `InitiateDunning` | `Boolean` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | Boolean getInitiateDunning() | setInitiateDunning(Boolean initiateDunning) | | `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | | `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | -| `Payment` | [`AllocationPayment`](../../doc/models/containers/allocation-payment.md) | Optional | This is a container for one-of cases. | AllocationPayment getPayment() | setPayment(AllocationPayment payment) | +| `Payment` | [`PaymentForAllocation`](../../doc/models/payment-for-allocation.md) | Optional | - | PaymentForAllocation getPayment() | setPayment(PaymentForAllocation payment) | | `ExpiresAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) | | `UsedQuantity` | `Long` | Optional | - | Long getUsedQuantity() | setUsedQuantity(Long usedQuantity) | | `ChargeId` | `Long` | Optional | - | Long getChargeId() | setChargeId(Long chargeId) | diff --git a/doc/models/component-price-point.md b/doc/models/component-price-point.md index 8fc4cdad..a6822a74 100644 --- a/doc/models/component-price-point.md +++ b/doc/models/component-price-point.md @@ -24,7 +24,7 @@ | `SubscriptionId` | `Integer` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | | `TaxIncluded` | `Boolean` | Optional | - | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | | `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` | [`ComponentPricePointIntervalUnit`](../../doc/models/containers/component-price-point-interval-unit.md) | Optional | This is a container for one-of cases. | ComponentPricePointIntervalUnit getIntervalUnit() | setIntervalUnit(ComponentPricePointIntervalUnit intervalUnit) | +| `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) | | `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. | List getCurrencyPrices() | setCurrencyPrices(List currencyPrices) | ## Example (as JSON) diff --git a/doc/models/component-response.md b/doc/models/component-response.md index a6e4eee6..2095c6c6 100644 --- a/doc/models/component-response.md +++ b/doc/models/component-response.md @@ -20,7 +20,7 @@ "id": 80, "name": "name8", "handle": "handle4", - "pricing_scheme": "tiered", + "pricing_scheme": "per_unit", "unit_name": "unit_name0" } } diff --git a/doc/models/component.md b/doc/models/component.md index c77de4a7..03d058e0 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -12,7 +12,7 @@ | `Id` | `Integer` | Optional | The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API. | Integer getId() | setId(Integer id) | | `Name` | `String` | Optional | The name of the Component, suitable for display on statements. i.e. Text Messages. | String getName() | setName(String name) | | `Handle` | `String` | Optional | The component API handle | String getHandle() | setHandle(String handle) | -| `PricingScheme` | [`ComponentPricingScheme`](../../doc/models/containers/component-pricing-scheme.md) | Optional | This is a container for one-of cases. | ComponentPricingScheme getPricingScheme() | setPricingScheme(ComponentPricingScheme pricingScheme) | +| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | - | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | | `UnitName` | `String` | Optional | The name of the unit that the component’s usage is measured in. i.e. message | String getUnitName() | setUnitName(String unitName) | | `UnitPrice` | `String` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | String getUnitPrice() | setUnitPrice(String unitPrice) | | `ProductFamilyId` | `Integer` | Optional | The id of the Product Family to which the Component belongs | Integer getProductFamilyId() | setProductFamilyId(Integer productFamilyId) | @@ -52,7 +52,7 @@ "id": 24, "name": "name2", "handle": "handle8", - "pricing_scheme": "tiered", + "pricing_scheme": "per_unit", "unit_name": "unit_name4" } ``` diff --git a/doc/models/containers/allocation-payment.md b/doc/models/containers/allocation-payment.md deleted file mode 100644 index 51632999..00000000 --- a/doc/models/containers/allocation-payment.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Allocation Payment - -## Class Name - -`AllocationPayment` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`PaymentForAllocation`](../../../doc/models/payment-for-allocation.md) | AllocationPayment.fromPaymentForAllocation(PaymentForAllocation paymentForAllocation) | - diff --git a/doc/models/containers/component-price-point-interval-unit.md b/doc/models/containers/component-price-point-interval-unit.md deleted file mode 100644 index b05542dc..00000000 --- a/doc/models/containers/component-price-point-interval-unit.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Component Price Point Interval Unit - -## Class Name - -`ComponentPricePointIntervalUnit` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`IntervalUnit`](../../../doc/models/interval-unit.md) | ComponentPricePointIntervalUnit.fromIntervalUnit(IntervalUnit intervalUnit) | - diff --git a/doc/models/containers/component-pricing-scheme.md b/doc/models/containers/component-pricing-scheme.md deleted file mode 100644 index cb94f1e4..00000000 --- a/doc/models/containers/component-pricing-scheme.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Component Pricing Scheme - -## Class Name - -`ComponentPricingScheme` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`PricingScheme`](../../../doc/models/pricing-scheme.md) | ComponentPricingScheme.fromPricingScheme(PricingScheme pricingScheme) | - diff --git a/doc/models/containers/customer-change-billing-address.md b/doc/models/containers/customer-change-billing-address.md deleted file mode 100644 index 42d55667..00000000 --- a/doc/models/containers/customer-change-billing-address.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Customer Change Billing Address - -## Class Name - -`CustomerChangeBillingAddress` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`AddressChange`](../../../doc/models/address-change.md) | CustomerChangeBillingAddress.fromAddressChange(AddressChange addressChange) | - diff --git a/doc/models/containers/customer-change-custom-fields.md b/doc/models/containers/customer-change-custom-fields.md deleted file mode 100644 index 587565bf..00000000 --- a/doc/models/containers/customer-change-custom-fields.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Customer Change Custom Fields - -## Class Name - -`CustomerChangeCustomFields` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`CustomerCustomFieldsChange`](../../../doc/models/customer-custom-fields-change.md) | CustomerChangeCustomFields.fromCustomerCustomFieldsChange(CustomerCustomFieldsChange customerCustomFieldsChange) | - diff --git a/doc/models/containers/customer-change-payer.md b/doc/models/containers/customer-change-payer.md deleted file mode 100644 index 8018dd70..00000000 --- a/doc/models/containers/customer-change-payer.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Customer Change Payer - -## Class Name - -`CustomerChangePayer` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`CustomerPayerChange`](../../../doc/models/customer-payer-change.md) | CustomerChangePayer.fromCustomerPayerChange(CustomerPayerChange customerPayerChange) | - diff --git a/doc/models/containers/customer-change-shipping-address.md b/doc/models/containers/customer-change-shipping-address.md deleted file mode 100644 index f715f824..00000000 --- a/doc/models/containers/customer-change-shipping-address.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Customer Change Shipping Address - -## Class Name - -`CustomerChangeShippingAddress` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`AddressChange`](../../../doc/models/address-change.md) | CustomerChangeShippingAddress.fromAddressChange(AddressChange addressChange) | - diff --git a/doc/models/containers/invoice-line-item-component-cost-data-2.md b/doc/models/containers/invoice-line-item-component-cost-data-2.md deleted file mode 100644 index b90cacaf..00000000 --- a/doc/models/containers/invoice-line-item-component-cost-data-2.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Invoice Line Item Component Cost Data 2 - -## Class Name - -`InvoiceLineItemComponentCostData2` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`InvoiceLineItemComponentCostData`](../../../doc/models/invoice-line-item-component-cost-data.md) | InvoiceLineItemComponentCostData2.fromInvoiceLineItemComponentCostData(InvoiceLineItemComponentCostData invoiceLineItemComponentCostData) | - diff --git a/doc/models/containers/product-expiration-interval-unit.md b/doc/models/containers/product-expiration-interval-unit.md deleted file mode 100644 index 1ef7e2b9..00000000 --- a/doc/models/containers/product-expiration-interval-unit.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Product Expiration Interval Unit - -## Class Name - -`ProductExpirationIntervalUnit` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`ExtendedIntervalUnit`](../../../doc/models/extended-interval-unit.md) | ProductExpirationIntervalUnit.fromExtendedIntervalUnit(ExtendedIntervalUnit extendedIntervalUnit) | - diff --git a/doc/models/containers/product-trial-interval-unit.md b/doc/models/containers/product-trial-interval-unit.md deleted file mode 100644 index 3529a8f3..00000000 --- a/doc/models/containers/product-trial-interval-unit.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Product Trial Interval Unit - -## Class Name - -`ProductTrialIntervalUnit` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`IntervalUnit`](../../../doc/models/interval-unit.md) | ProductTrialIntervalUnit.fromIntervalUnit(IntervalUnit intervalUnit) | - diff --git a/doc/models/containers/record-payment-response-prepayment.md b/doc/models/containers/record-payment-response-prepayment.md deleted file mode 100644 index 546d61f1..00000000 --- a/doc/models/containers/record-payment-response-prepayment.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Record Payment Response Prepayment - -## Class Name - -`RecordPaymentResponsePrepayment` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`InvoicePrePayment`](../../../doc/models/invoice-pre-payment.md) | RecordPaymentResponsePrepayment.fromInvoicePrePayment(InvoicePrePayment invoicePrePayment) | - diff --git a/doc/models/containers/subscription-component-pricing-scheme.md b/doc/models/containers/subscription-component-pricing-scheme.md deleted file mode 100644 index a285ca18..00000000 --- a/doc/models/containers/subscription-component-pricing-scheme.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Subscription Component Pricing Scheme - -## Class Name - -`SubscriptionComponentPricingScheme` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`PricingScheme`](../../../doc/models/pricing-scheme.md) | SubscriptionComponentPricingScheme.fromPricingScheme(PricingScheme pricingScheme) | - diff --git a/doc/models/containers/subscription-group-2.md b/doc/models/containers/subscription-group-2.md deleted file mode 100644 index a146fb13..00000000 --- a/doc/models/containers/subscription-group-2.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Subscription Group 2 - -## Class Name - -`SubscriptionGroup2` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`NestedSubscriptionGroup`](../../../doc/models/nested-subscription-group.md) | SubscriptionGroup2.fromNestedSubscriptionGroup(NestedSubscriptionGroup nestedSubscriptionGroup) | - diff --git a/doc/models/containers/void-invoice-event-data-credit-note-attributes.md b/doc/models/containers/void-invoice-event-data-credit-note-attributes.md deleted file mode 100644 index d75536dd..00000000 --- a/doc/models/containers/void-invoice-event-data-credit-note-attributes.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Void Invoice Event Data Credit Note Attributes - -## Class Name - -`VoidInvoiceEventDataCreditNoteAttributes` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`CreditNote`](../../../doc/models/credit-note.md) | VoidInvoiceEventDataCreditNoteAttributes.fromCreditNote(CreditNote creditNote) | - diff --git a/doc/models/customer-change.md b/doc/models/customer-change.md index 6cbd6dd6..9ff0cfe5 100644 --- a/doc/models/customer-change.md +++ b/doc/models/customer-change.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Payer` | [`CustomerChangePayer`](../../doc/models/containers/customer-change-payer.md) | Optional | This is a container for one-of cases. | CustomerChangePayer getPayer() | setPayer(CustomerChangePayer payer) | -| `ShippingAddress` | [`CustomerChangeShippingAddress`](../../doc/models/containers/customer-change-shipping-address.md) | Optional | This is a container for one-of cases. | CustomerChangeShippingAddress getShippingAddress() | setShippingAddress(CustomerChangeShippingAddress shippingAddress) | -| `BillingAddress` | [`CustomerChangeBillingAddress`](../../doc/models/containers/customer-change-billing-address.md) | Optional | This is a container for one-of cases. | CustomerChangeBillingAddress getBillingAddress() | setBillingAddress(CustomerChangeBillingAddress billingAddress) | -| `CustomFields` | [`CustomerChangeCustomFields`](../../doc/models/containers/customer-change-custom-fields.md) | Optional | This is a container for one-of cases. | CustomerChangeCustomFields getCustomFields() | setCustomFields(CustomerChangeCustomFields customFields) | +| `Payer` | [`CustomerPayerChange`](../../doc/models/customer-payer-change.md) | Optional | - | CustomerPayerChange getPayer() | setPayer(CustomerPayerChange payer) | +| `ShippingAddress` | [`AddressChange`](../../doc/models/address-change.md) | Optional | - | AddressChange getShippingAddress() | setShippingAddress(AddressChange shippingAddress) | +| `BillingAddress` | [`AddressChange`](../../doc/models/address-change.md) | Optional | - | AddressChange getBillingAddress() | setBillingAddress(AddressChange billingAddress) | +| `CustomFields` | [`CustomerCustomFieldsChange`](../../doc/models/customer-custom-fields-change.md) | Optional | - | CustomerCustomFieldsChange getCustomFields() | setCustomFields(CustomerCustomFieldsChange customFields) | ## Example (as JSON) @@ -66,6 +66,13 @@ }, "custom_fields": { "before": [ + { + "owner_id": 26, + "owner_type": "Customer", + "name": "name0", + "value": "value2", + "metadatum_id": 26 + }, { "owner_id": 26, "owner_type": "Customer", @@ -82,6 +89,13 @@ "value": "value4", "metadatum_id": 130 }, + { + "owner_id": 130, + "owner_type": "Customer", + "name": "name2", + "value": "value4", + "metadatum_id": 130 + }, { "owner_id": 130, "owner_type": "Customer", diff --git a/doc/models/customer-changes-preview-response.md b/doc/models/customer-changes-preview-response.md index d6a4f973..85ab20bb 100644 --- a/doc/models/customer-changes-preview-response.md +++ b/doc/models/customer-changes-preview-response.md @@ -64,6 +64,13 @@ }, "custom_fields": { "before": [ + { + "owner_id": 26, + "owner_type": "Customer", + "name": "name0", + "value": "value2", + "metadatum_id": 26 + }, { "owner_id": 26, "owner_type": "Customer", @@ -80,6 +87,13 @@ "value": "value4", "metadatum_id": 130 }, + { + "owner_id": 130, + "owner_type": "Customer", + "name": "name2", + "value": "value4", + "metadatum_id": 130 + }, { "owner_id": 130, "owner_type": "Customer", diff --git a/doc/models/invoice-line-item.md b/doc/models/invoice-line-item.md index a6148087..a3e5efe3 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -27,7 +27,7 @@ | `ComponentId` | `Integer` | Optional | The ID of the component being billed. Will be `nil` for non-component charges. | Integer getComponentId() | setComponentId(Integer componentId) | | `PricePointId` | `Integer` | Optional | The price point ID of the component being billed. Will be `nil` for non-component charges. | Integer getPricePointId() | setPricePointId(Integer pricePointId) | | `Hide` | `Boolean` | Optional | - | Boolean getHide() | setHide(Boolean hide) | -| `ComponentCostData` | [`InvoiceLineItemComponentCostData2`](../../doc/models/containers/invoice-line-item-component-cost-data-2.md) | Optional | This is a container for one-of cases. | InvoiceLineItemComponentCostData2 getComponentCostData() | setComponentCostData(InvoiceLineItemComponentCostData2 componentCostData) | +| `ComponentCostData` | [`InvoiceLineItemComponentCostData`](../../doc/models/invoice-line-item-component-cost-data.md) | Optional | - | InvoiceLineItemComponentCostData getComponentCostData() | setComponentCostData(InvoiceLineItemComponentCostData componentCostData) | | `ProductPricePointId` | `Integer` | Optional | The price point ID of the line item's product | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | | `CustomItem` | `Boolean` | Optional | - | Boolean getCustomItem() | setCustomItem(Boolean customItem) | | `Kind` | `String` | Optional | - | String getKind() | setKind(String kind) | diff --git a/doc/models/list-components-filter.md b/doc/models/list-components-filter.md new file mode 100644 index 00000000..79c4010b --- /dev/null +++ b/doc/models/list-components-filter.md @@ -0,0 +1,27 @@ + +# List Components Filter + +## Structure + +`ListComponentsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Ids` | `List` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | + +## Example (as JSON) + +```json +{ + "ids": [ + 1, + 2, + 3 + ], + "use_site_exchange_rate": false +} +``` + diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md new file mode 100644 index 00000000..72c3de63 --- /dev/null +++ b/doc/models/list-coupons-filter.md @@ -0,0 +1,41 @@ + +# List Coupons Filter + +## Structure + +`ListCouponsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query `filter[date_field]=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `filter[start_date]=2011-12-17`. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons 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. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `Ids` | `List` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | +| `Codes` | `List` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | List getCodes() | setCodes(List codes) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | + +## Example (as JSON) + +```json +{ + "start_date": "2011-12-17", + "end_date": "2011-12-15", + "start_datetime": "12/19/2011 09:15:30", + "end_datetime": "06/07/2019 17:20:06", + "ids": [ + 1, + 2, + 3 + ], + "codes": [ + "free", + "free_trial" + ], + "date_field": "updated_at" +} +``` + diff --git a/doc/models/list-mrr-filter.md b/doc/models/list-mrr-filter.md new file mode 100644 index 00000000..ce2e7761 --- /dev/null +++ b/doc/models/list-mrr-filter.md @@ -0,0 +1,25 @@ + +# List Mrr Filter + +## Structure + +`ListMrrFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionIds` | `List` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getSubscriptionIds() | setSubscriptionIds(List subscriptionIds) | + +## Example (as JSON) + +```json +{ + "subscription_ids": [ + 1, + 2, + 3 + ] +} +``` + diff --git a/doc/models/list-subscription-group-prepayment-date-field.md b/doc/models/list-prepayment-date-field.md similarity index 56% rename from doc/models/list-subscription-group-prepayment-date-field.md rename to doc/models/list-prepayment-date-field.md index 9437e58b..a143aa4d 100644 --- a/doc/models/list-subscription-group-prepayment-date-field.md +++ b/doc/models/list-prepayment-date-field.md @@ -1,9 +1,9 @@ -# List Subscription Group Prepayment Date Field +# List Prepayment Date Field ## Enumeration -`ListSubscriptionGroupPrepaymentDateField` +`ListPrepaymentDateField` ## Fields diff --git a/doc/models/list-prepayments-filter.md b/doc/models/list-prepayments-filter.md new file mode 100644 index 00000000..4dfef3f7 --- /dev/null +++ b/doc/models/list-prepayments-filter.md @@ -0,0 +1,25 @@ + +# List Prepayments Filter + +## Structure + +`ListPrepaymentsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`ListPrepaymentDateField`](../../doc/models/list-prepayment-date-field.md) | Optional | The type of filter you would like to apply to your search. `created_at` - Time when prepayment was created. `application_at` - Time when prepayment was applied to invoice. Use in query `filter[date_field]=created_at`. | ListPrepaymentDateField getDateField() | setDateField(ListPrepaymentDateField dateField) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date specified. Use in query: `filter[start_date]=2011-12-15`. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp up to and including 11:59:59PM in your site's time zone on the date specified. Use in query: `filter[end_date]=2011-12-15`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | + +## Example (as JSON) + +```json +{ + "date_field": "created_at", + "start_date": "2024-01-01", + "end_date": "2024-01-31" +} +``` + diff --git a/doc/models/list-price-points-filter.md b/doc/models/list-price-points-filter.md new file mode 100644 index 00000000..cd8b0b5b --- /dev/null +++ b/doc/models/list-price-points-filter.md @@ -0,0 +1,42 @@ + +# List Price Points Filter + +## Structure + +`ListPricePointsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query: `filter[date_field]=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points 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. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns price points with a timestamp at or before 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 end_date. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `Type` | [`List`](../../doc/models/price-point-type.md) | Optional | Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. | List getType() | setType(List type) | +| `Ids` | `List` | Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. | List getIds() | setIds(List ids) | +| `ArchivedAt` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. | IncludeNotNull getArchivedAt() | setArchivedAt(IncludeNotNull archivedAt) | + +## Example (as JSON) + +```json +{ + "start_date": "2011-12-17", + "end_date": "2011-12-15", + "start_datetime": "12/19/2011 09:15:30", + "end_datetime": "06/07/2019 17:20:06", + "type": [ + "catalog", + "default", + "custom" + ], + "ids": [ + 1, + 2, + 3 + ], + "date_field": "updated_at" +} +``` + diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md new file mode 100644 index 00000000..6b7dac62 --- /dev/null +++ b/doc/models/list-products-filter.md @@ -0,0 +1,25 @@ + +# List Products Filter + +## Structure + +`ListProductsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `PrepaidProductPricePoint` | [`PrepaidProductPricePointFilter`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | PrepaidProductPricePointFilter getPrepaidProductPricePoint() | setPrepaidProductPricePoint(PrepaidProductPricePointFilter prepaidProductPricePoint) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | + +## Example (as JSON) + +```json +{ + "prepaid_product_price_point": { + "product_price_point_id": "product_price_point_id2" + }, + "use_site_exchange_rate": false +} +``` + diff --git a/doc/models/list-segments-filter.md b/doc/models/list-segments-filter.md new file mode 100644 index 00000000..6a211bf9 --- /dev/null +++ b/doc/models/list-segments-filter.md @@ -0,0 +1,27 @@ + +# List Segments Filter + +## Structure + +`ListSegmentsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SegmentProperty1Value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_1` on attached Metric. If empty string is passed, this filter would be rejected. Use in query `filter[segment_property_1_value]=EU`. | String getSegmentProperty1Value() | setSegmentProperty1Value(String segmentProperty1Value) | +| `SegmentProperty2Value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_2` on attached Metric. If empty string is passed, this filter would be rejected. | String getSegmentProperty2Value() | setSegmentProperty2Value(String segmentProperty2Value) | +| `SegmentProperty3Value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_3` on attached Metric. If empty string is passed, this filter would be rejected. | String getSegmentProperty3Value() | setSegmentProperty3Value(String segmentProperty3Value) | +| `SegmentProperty4Value` | `String` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_4` on attached Metric. If empty string is passed, this filter would be rejected. | String getSegmentProperty4Value() | setSegmentProperty4Value(String segmentProperty4Value) | + +## Example (as JSON) + +```json +{ + "segment_property_1_value": "EU", + "segment_property_2_value": "segment_property_2_value4", + "segment_property_3_value": "segment_property_3_value2", + "segment_property_4_value": "segment_property_4_value6" +} +``` + diff --git a/doc/models/list-subscription-components-filter.md b/doc/models/list-subscription-components-filter.md new file mode 100644 index 00000000..63735be2 --- /dev/null +++ b/doc/models/list-subscription-components-filter.md @@ -0,0 +1,26 @@ + +# List Subscription Components Filter + +## Structure + +`ListSubscriptionComponentsFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.
**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | + +## Example (as JSON) + +```json +{ + "currencies": [ + "EUR", + "USD" + ], + "use_site_exchange_rate": false +} +``` + diff --git a/doc/models/list-subscription-components-for-site-filter.md b/doc/models/list-subscription-components-for-site-filter.md new file mode 100644 index 00000000..83b90ffc --- /dev/null +++ b/doc/models/list-subscription-components-for-site-filter.md @@ -0,0 +1,38 @@ + +# List Subscription Components for Site Filter + +## Structure + +`ListSubscriptionComponentsForSiteFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.
**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | +| `Subscription` | [`SubscriptionFilter`](../../doc/models/subscription-filter.md) | Optional | Nested filter used for List Subscription Components For Site Filter | SubscriptionFilter getSubscription() | setSubscription(SubscriptionFilter subscription) | + +## Example (as JSON) + +```json +{ + "currencies": [ + "EUR", + "USD" + ], + "use_site_exchange_rate": false, + "subscription": { + "states": [ + "active", + "canceled", + "expired" + ], + "date_field": "updated_at", + "start_date": "2016-03-13", + "end_date": "2016-03-13", + "start_datetime": "2016-03-13T12:52:32.123Z" + } +} +``` + diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md new file mode 100644 index 00000000..43b4b3f7 --- /dev/null +++ b/doc/models/prepaid-product-price-point-filter.md @@ -0,0 +1,21 @@ + +# Prepaid Product Price Point Filter + +## Structure + +`PrepaidProductPricePointFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ProductPricePointId` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Default**: `"not_null"` | String getProductPricePointId() | setProductPricePointId(String productPricePointId) | + +## Example (as JSON) + +```json +{ + "product_price_point_id": "not_null" +} +``` + diff --git a/doc/models/product.md b/doc/models/product.md index 19903231..c4cb65bc 100644 --- a/doc/models/product.md +++ b/doc/models/product.md @@ -16,7 +16,7 @@ | `AccountingCode` | `String` | Optional | E.g. Internal ID or SKU Number | String getAccountingCode() | setAccountingCode(String accountingCode) | | `RequestCreditCard` | `Boolean` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page. | Boolean getRequestCreditCard() | setRequestCreditCard(Boolean requestCreditCard) | | `ExpirationInterval` | `Integer` | Optional | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) | -| `ExpirationIntervalUnit` | [`ProductExpirationIntervalUnit`](../../doc/models/containers/product-expiration-interval-unit.md) | Optional | This is a container for one-of cases. | ProductExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ProductExpirationIntervalUnit expirationIntervalUnit) | +| `ExpirationIntervalUnit` | [`ExtendedIntervalUnit`](../../doc/models/extended-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month or day | ExtendedIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExtendedIntervalUnit expirationIntervalUnit) | | `CreatedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this product was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | | `UpdatedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this product was last updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | | `PriceInCents` | `Long` | Optional | The product price, in integer cents | Long getPriceInCents() | setPriceInCents(Long priceInCents) | @@ -25,7 +25,7 @@ | `InitialChargeInCents` | `Long` | Optional | The up front charge you have specified. | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) | | `TrialPriceInCents` | `Long` | Optional | The price of the trial period for a subscription to this product, in integer cents. | Long getTrialPriceInCents() | setTrialPriceInCents(Long trialPriceInCents) | | `TrialInterval` | `Integer` | Optional | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | Integer getTrialInterval() | setTrialInterval(Integer trialInterval) | -| `TrialIntervalUnit` | [`ProductTrialIntervalUnit`](../../doc/models/containers/product-trial-interval-unit.md) | Optional | This is a container for one-of cases. | ProductTrialIntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(ProductTrialIntervalUnit trialIntervalUnit) | +| `TrialIntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product, either month or day | IntervalUnit getTrialIntervalUnit() | setTrialIntervalUnit(IntervalUnit trialIntervalUnit) | | `ArchivedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this product was archived | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | | `RequireCreditCard` | `Boolean` | Optional | Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product. | Boolean getRequireCreditCard() | setRequireCreditCard(Boolean requireCreditCard) | | `ReturnParams` | `String` | Optional | - | String getReturnParams() | setReturnParams(String returnParams) | diff --git a/doc/models/record-payment-response.md b/doc/models/record-payment-response.md index 678d3cc9..7a56e611 100644 --- a/doc/models/record-payment-response.md +++ b/doc/models/record-payment-response.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `PaidInvoices` | [`List`](../../doc/models/paid-invoice.md) | Optional | - | List getPaidInvoices() | setPaidInvoices(List paidInvoices) | -| `Prepayment` | [`RecordPaymentResponsePrepayment`](../../doc/models/containers/record-payment-response-prepayment.md) | Optional | This is a container for one-of cases. | RecordPaymentResponsePrepayment getPrepayment() | setPrepayment(RecordPaymentResponsePrepayment prepayment) | +| `Prepayment` | [`InvoicePrePayment`](../../doc/models/invoice-pre-payment.md) | Optional | - | InvoicePrePayment getPrepayment() | setPrepayment(InvoicePrePayment prepayment) | ## Example (as JSON) @@ -37,9 +37,9 @@ } ], "prepayment": { - "subscription_id": 180, - "amount_in_cents": 100, - "ending_balance_in_cents": 60 + "subscription_id": 148, + "amount_in_cents": 124, + "ending_balance_in_cents": 164 } } ``` diff --git a/doc/models/subscription-component.md b/doc/models/subscription-component.md index 4c0150d7..75c90c51 100644 --- a/doc/models/subscription-component.md +++ b/doc/models/subscription-component.md @@ -17,7 +17,7 @@ | `UnitBalance` | `Integer` | Optional | - | Integer getUnitBalance() | setUnitBalance(Integer unitBalance) | | `Currency` | `String` | Optional | - | String getCurrency() | setCurrency(String currency) | | `AllocatedQuantity` | [`SubscriptionComponentAllocatedQuantity`](../../doc/models/containers/subscription-component-allocated-quantity.md) | Optional | This is a container for one-of cases. | SubscriptionComponentAllocatedQuantity getAllocatedQuantity() | setAllocatedQuantity(SubscriptionComponentAllocatedQuantity allocatedQuantity) | -| `PricingScheme` | [`SubscriptionComponentPricingScheme`](../../doc/models/containers/subscription-component-pricing-scheme.md) | Optional | This is a container for one-of cases. | SubscriptionComponentPricingScheme getPricingScheme() | setPricingScheme(SubscriptionComponentPricingScheme pricingScheme) | +| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | - | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | | `ComponentId` | `Integer` | Optional | - | Integer getComponentId() | setComponentId(Integer componentId) | | `ComponentHandle` | `String` | Optional | - | String getComponentHandle() | setComponentHandle(String componentHandle) | | `SubscriptionId` | `Integer` | Optional | - | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | diff --git a/doc/models/subscription-filter.md b/doc/models/subscription-filter.md new file mode 100644 index 00000000..a0f57a3d --- /dev/null +++ b/doc/models/subscription-filter.md @@ -0,0 +1,36 @@ + +# Subscription Filter + +Nested filter used for List Subscription Components For Site Filter + +## Structure + +`SubscriptionFilter` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `States` | [`List`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.
**Constraints**: *Minimum Items*: `1` | List getStates() | setStates(List states) | +| `DateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | SubscriptionListDateField getDateField() | setDateField(SubscriptionListDateField dateField) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription 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. To use this filter you also have to include the following param in the request `include=subscription`. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you also have to include the following param in the request `include=subscription`. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | + +## Example (as JSON) + +```json +{ + "states": [ + "active", + "canceled" + ], + "start_date": "2024-01-17", + "end_date": "2024-01-31", + "start_datetime": "01/17/2024 09:15:30", + "end_datetime": "01/17/2024 17:20:06", + "date_field": "updated_at" +} +``` + diff --git a/doc/models/subscription.md b/doc/models/subscription.md index 87e7ec97..3fccc31a 100644 --- a/doc/models/subscription.md +++ b/doc/models/subscription.md @@ -38,7 +38,7 @@ | `Customer` | [`Customer`](../../doc/models/customer.md) | Optional | - | Customer getCustomer() | setCustomer(Customer customer) | | `Product` | [`Product`](../../doc/models/product.md) | Optional | - | Product getProduct() | setProduct(Product product) | | `CreditCard` | [`CreditCardPaymentProfile`](../../doc/models/credit-card-payment-profile.md) | Optional | - | CreditCardPaymentProfile getCreditCard() | setCreditCard(CreditCardPaymentProfile creditCard) | -| `Group` | [`SubscriptionGroup2`](../../doc/models/containers/subscription-group-2.md) | Optional | This is a container for one-of cases. | SubscriptionGroup2 getGroup() | setGroup(SubscriptionGroup2 group) | +| `Group` | [`NestedSubscriptionGroup`](../../doc/models/nested-subscription-group.md) | Optional | - | NestedSubscriptionGroup getGroup() | setGroup(NestedSubscriptionGroup group) | | `BankAccount` | [`BankAccountPaymentProfile`](../../doc/models/bank-account-payment-profile.md) | Optional | - | BankAccountPaymentProfile getBankAccount() | setBankAccount(BankAccountPaymentProfile bankAccount) | | `PaymentType` | `String` | Optional | The payment profile type for the active profile on file. | String getPaymentType() | setPaymentType(String paymentType) | | `ReferralCode` | `String` | Optional | The subscription's unique code that can be given to referrals. | String getReferralCode() | setReferralCode(String referralCode) | @@ -51,7 +51,7 @@ | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | List getCouponCodes() | setCouponCodes(List couponCodes) | | `OfferId` | `Integer` | Optional | The ID of the offer associated with the subscription. | Integer getOfferId() | setOfferId(Integer offerId) | | `PayerId` | `Integer` | Optional | On Relationship Invoicing, the ID of the individual paying for the subscription. Defaults to the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. | Integer getPayerId() | setPayerId(Integer payerId) | -| `CurrentBillingAmountInCents` | `Long` | Optional | The balance in cents plus the estimated renewal amount in cents. | Long getCurrentBillingAmountInCents() | setCurrentBillingAmountInCents(Long currentBillingAmountInCents) | +| `CurrentBillingAmountInCents` | `Long` | Optional | The balance in cents plus the estimated renewal amount in cents. Returned ONLY for readSubscription operation as it's compute intensive operation. | Long getCurrentBillingAmountInCents() | setCurrentBillingAmountInCents(Long currentBillingAmountInCents) | | `ProductPricePointId` | `Integer` | Optional | The product price point currently subscribed to. | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | | `ProductPricePointType` | [`PricePointType`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | PricePointType getProductPricePointType() | setProductPricePointType(PricePointType productPricePointType) | | `NextProductPricePointId` | `Integer` | Optional | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | Integer getNextProductPricePointId() | setNextProductPricePointId(Integer nextProductPricePointId) | diff --git a/doc/models/update-customer.md b/doc/models/update-customer.md index 2150e0b2..07c9b380 100644 --- a/doc/models/update-customer.md +++ b/doc/models/update-customer.md @@ -27,6 +27,7 @@ | `TaxExempt` | `Boolean` | Optional | - | Boolean getTaxExempt() | setTaxExempt(Boolean taxExempt) | | `TaxExemptReason` | `String` | Optional | - | String getTaxExemptReason() | setTaxExemptReason(String taxExemptReason) | | `ParentId` | `Integer` | Optional | - | Integer getParentId() | setParentId(Integer parentId) | +| `Verified` | `Boolean` | Optional | Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway | Boolean getVerified() | setVerified(Boolean verified) | ## Example (as JSON) diff --git a/doc/models/void-invoice-event-data.md b/doc/models/void-invoice-event-data.md index 1bd3abc5..60373866 100644 --- a/doc/models/void-invoice-event-data.md +++ b/doc/models/void-invoice-event-data.md @@ -11,7 +11,7 @@ Example schema for an `void_invoice` event | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `CreditNoteAttributes` | [`VoidInvoiceEventDataCreditNoteAttributes`](../../doc/models/containers/void-invoice-event-data-credit-note-attributes.md) | Required | This is a container for one-of cases. | VoidInvoiceEventDataCreditNoteAttributes getCreditNoteAttributes() | setCreditNoteAttributes(VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes) | +| `CreditNoteAttributes` | [`CreditNote`](../../doc/models/credit-note.md) | Required | - | CreditNote getCreditNoteAttributes() | setCreditNoteAttributes(CreditNote creditNoteAttributes) | | `Memo` | `String` | Required | The memo provided during invoice voiding. | String getMemo() | setMemo(String memo) | | `AppliedAmount` | `String` | Required | The amount of the void. | String getAppliedAmount() | setAppliedAmount(String appliedAmount) | | `TransactionTime` | `ZonedDateTime` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | ZonedDateTime getTransactionTime() | setTransactionTime(ZonedDateTime transactionTime) | @@ -24,9 +24,9 @@ Example schema for an `void_invoice` event { "credit_note_attributes": { "uid": "uid2", - "site_id": 218, - "customer_id": 74, - "subscription_id": 146, + "site_id": 72, + "customer_id": 184, + "subscription_id": 0, "number": "number0" }, "memo": "memo6", diff --git a/pom.xml b/pom.xml index 7e22aa86..4afcdd33 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 com.maxio advanced-billing-sdk - 2.0.0 + 3.0.0 jar Advanced Billing SDK Ultimate billing and pricing flexibility for B2B SaaS. diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java index cfdcbc51..aed06425 100644 --- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java +++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java @@ -95,7 +95,7 @@ public final class AdvancedBillingClient implements Configuration { private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - private static String userAgent = "AB SDK Java:2.0.0 on OS {os-info}"; + private static String userAgent = "AB SDK Java:3.0.0 on OS {os-info}"; /** * Current API environment. diff --git a/src/main/java/com/maxio/advancedbilling/Environment.java b/src/main/java/com/maxio/advancedbilling/Environment.java index 847c369a..6695c1e8 100644 --- a/src/main/java/com/maxio/advancedbilling/Environment.java +++ b/src/main/java/com/maxio/advancedbilling/Environment.java @@ -48,8 +48,7 @@ public enum Environment { @JsonCreator public static Environment constructFromString(String toConvert) throws IOException { Environment enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/Server.java b/src/main/java/com/maxio/advancedbilling/Server.java index b07ffe2a..fd939f2e 100644 --- a/src/main/java/com/maxio/advancedbilling/Server.java +++ b/src/main/java/com/maxio/advancedbilling/Server.java @@ -38,8 +38,7 @@ public enum Server { @JsonCreator public static Server constructFromString(String toConvert) throws IOException { Server enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java index 7818adfd..faba28f9 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorArrayMapResponseException; @@ -589,10 +588,8 @@ private ApiCall, ApiException> prepareListComponentsRequ .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) @@ -731,12 +728,12 @@ private ApiCall, ApiException> prepareListComponentsForP .path("/product_families/{product_family_id}/components.json") .queryParam(param -> param.key("include_archived") .value(input.getIncludeArchived()).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("page") .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("date_field") .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("end_date") @@ -747,8 +744,6 @@ private ApiCall, ApiException> prepareListComponentsForP .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") .value(input.getStartDatetime()).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) @@ -1183,30 +1178,16 @@ private ApiCall prepareListAllC .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/components_price_points.json") - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[end_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterEndDatetime())).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("page") .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[start_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[type]") - .value(PricePointType.toValue(input.getFilterType())).isRequired(false)) .queryParam(param -> param.key("direction") .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) - .queryParam(param -> param.key("filter[archived_at]") - .value((input.getFilterArchivedAt() != null) ? input.getFilterArchivedAt().value() : null).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java index 99633ce9..c832430c 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; @@ -132,24 +131,10 @@ private ApiCall, ApiException> prepareListCouponsForProduct .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[end_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterEndDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[start_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) - .queryParam(param -> param.key("filter[codes]") - .value(input.getFilterCodes()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("currency_prices") .value(input.getCurrencyPrices()).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) @@ -394,34 +379,10 @@ private ApiCall, ApiException> prepareListCouponsRequest( .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("date_field") - .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("start_date") - .value(DateTimeHelper.toSimpleDate(input.getStartDate())).isRequired(false)) - .queryParam(param -> param.key("end_date") - .value(DateTimeHelper.toSimpleDate(input.getEndDate())).isRequired(false)) - .queryParam(param -> param.key("start_datetime") - .value(DateTimeHelper.toRfc8601DateTime(input.getStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("end_datetime") - .value(DateTimeHelper.toRfc8601DateTime(input.getEndDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) - .queryParam(param -> param.key("filter[codes]") - .value(input.getFilterCodes()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("currency_prices") .value(input.getCurrencyPrices()).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[end_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterEndDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[start_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java index df7ae1dc..04f08463 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java @@ -371,7 +371,7 @@ private ApiCall prepareListMetadataRequest( .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN)) + .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } @@ -472,7 +472,7 @@ private ApiCall prepareDeleteMetadataRequest( .path("/{resource_type}/{resource_id}/metadata.json") .queryParam(param -> param.key("name") .value(name).isRequired(false)) - .queryParam(param -> param.key("names[]") + .queryParam(param -> param.key("names") .value(names).isRequired(false)) .templateParam(param -> param.key("resource_type").value((resourceType != null) ? resourceType.value() : null) .shouldEncode(true)) @@ -488,7 +488,7 @@ private ApiCall prepareDeleteMetadataRequest( (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -535,7 +535,7 @@ private ApiCall prepareListMetadataForResourceT .value(DateTimeHelper.toRfc8601DateTime(input.getEndDatetime())).isRequired(false)) .queryParam(param -> param.key("with_deleted") .value(input.getWithDeleted()).isRequired(false)) - .queryParam(param -> param.key("resource_ids[]") + .queryParam(param -> param.key("resource_ids") .value(input.getResourceIds()).isRequired(false)) .queryParam(param -> param.key("direction") .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) @@ -551,7 +551,7 @@ private ApiCall prepareListMetadataForResourceT .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .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 1dfce3c8..b8370588 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java @@ -130,14 +130,8 @@ private ApiCall prepareListSegmentsForPriceP .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("filter[segment_property_1_value]") - .value(input.getFilterSegmentProperty1Value()).isRequired(false)) - .queryParam(param -> param.key("filter[segment_property_2_value]") - .value(input.getFilterSegmentProperty2Value()).isRequired(false)) - .queryParam(param -> param.key("filter[segment_property_3_value]") - .value(input.getFilterSegmentProperty3Value()).isRequired(false)) - .queryParam(param -> param.key("filter[segment_property_4_value]") - .value(input.getFilterSegmentProperty4Value()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .templateParam(param -> param.key("component_id").value(input.getComponentId()) .shouldEncode(true)) .templateParam(param -> param.key("price_point_id").value(input.getPricePointId()) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java index 27cebbc6..f0a5f39b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java @@ -208,8 +208,8 @@ private ApiCall prepareListMrrPerSubscrip .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions_mrr.json") - .queryParam(param -> param.key("filter[subscription_ids]") - .value(input.getFilterSubscriptionIds()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("at_time") .value(input.getAtTime()).isRequired(false)) .queryParam(param -> param.key("page") diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java index 05295682..1e873a06 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java @@ -65,6 +65,8 @@ private ApiCall, ApiException> prepareListProductsForProdu .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("start_date") .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") @@ -77,10 +79,6 @@ private ApiCall, ApiException> prepareListProductsForProdu .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[prepaid_product_price_point][product_price_point_id]") - .value((input.getFilterPrepaidProductPricePointProductPricePointId() != null) ? input.getFilterPrepaidProductPricePointProductPricePointId().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .templateParam(param -> param.key("product_family_id").value(input.getProductFamilyId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java index 002f706b..a60c1751 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorArrayMapResponseException; @@ -573,22 +572,8 @@ private ApiCall prepareListAllProd .path("/products_price_points.json") .queryParam(param -> param.key("direction") .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[archived_at]") - .value((input.getFilterArchivedAt() != null) ? input.getFilterArchivedAt().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[end_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterEndDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[ids]") - .value(input.getFilterIds()).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[start_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[type]") - .value(PricePointType.toValue(input.getFilterType())).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("page") diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java index 67cec11e..d2b25b8a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java @@ -285,6 +285,8 @@ private ApiCall, ApiException> prepareListProductsRequest( .path("/products.json") .queryParam(param -> param.key("date_field") .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("end_date") .value(DateTimeHelper.toSimpleDate(input.getEndDate())).isRequired(false)) .queryParam(param -> param.key("end_datetime") @@ -301,10 +303,6 @@ private ApiCall, ApiException> prepareListProductsRequest( .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[prepaid_product_price_point][product_price_point_id]") - .value((input.getFilterPrepaidProductPricePointProductPricePointId() != null) ? input.getFilterPrepaidProductPricePointProductPricePointId().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 75fc32a7..10c0d546 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -31,7 +31,6 @@ import com.maxio.advancedbilling.models.PreviewAllocationsRequest; import com.maxio.advancedbilling.models.SubscriptionComponentResponse; import com.maxio.advancedbilling.models.SubscriptionResponse; -import com.maxio.advancedbilling.models.SubscriptionStateFilter; import com.maxio.advancedbilling.models.UpdateAllocationExpirationDate; import com.maxio.advancedbilling.models.UsageResponse; import com.maxio.advancedbilling.models.containers.CreateUsageComponentId; @@ -130,6 +129,8 @@ private ApiCall, ApiException> prepareListSu .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("direction") .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("end_date") .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("end_datetime") @@ -146,10 +147,6 @@ private ApiCall, ApiException> prepareListSu .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) - .queryParam(param -> param.key("filter[currencies]") - .value(input.getFilterCurrencies()).isRequired(false)) .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) @@ -1050,6 +1047,8 @@ private ApiCall prepareListSub .value((input.getSort() != null) ? input.getSort().value() : null).isRequired(false)) .queryParam(param -> param.key("direction") .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .queryParam(param -> param.key("date_field") .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") @@ -1068,22 +1067,6 @@ private ApiCall prepareListSub .value(input.getProductFamilyIds()).isRequired(false)) .queryParam(param -> param.key("include") .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) - .queryParam(param -> param.key("filter[currencies]") - .value(input.getFilterCurrencies()).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][states]") - .value(SubscriptionStateFilter.toValue(input.getFilterSubscriptionStates())).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][date_field]") - .value((input.getFilterSubscriptionDateField() != null) ? input.getFilterSubscriptionDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterSubscriptionStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][start_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterSubscriptionStartDatetime())).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterSubscriptionEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[subscription][end_datetime]") - .value(DateTimeHelper.toRfc8601DateTime(input.getFilterSubscriptionEndDatetime())).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth .add("BasicAuth")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java index 718a1477..2ec379f8 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; @@ -112,16 +111,12 @@ private ApiCall prepareLi .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscription_groups/{uid}/prepayments.json") - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) .queryParam(param -> param.key("page") .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .templateParam(param -> param.key("uid").value(input.getUid()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index 63d0a278..bef74d75 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -170,7 +170,7 @@ private ApiCall prepareListSubscri .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("include[]") + .queryParam(param -> param.key("include") .value(SubscriptionGroupsListInclude.toValue(input.getInclude())).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth @@ -182,7 +182,7 @@ private ApiCall prepareListSubscri .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -215,7 +215,7 @@ private ApiCall prepareReadSubscrip .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscription_groups/{uid}.json") - .queryParam(param -> param.key("include[]") + .queryParam(param -> param.key("include") .value(SubscriptionGroupInclude.toValue(include)).isRequired(false)) .templateParam(param -> param.key("uid").value(uid) .shouldEncode(true)) @@ -229,12 +229,12 @@ private ApiCall prepareReadSubscrip .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } /** - * Use this endpoint to update subscription group members. `"member_ids": []` should contain an + * Use this endpoint to update subscription group members. `"member_ids"` should contain an * array of both subscription IDs to set as group members and subscription IDs already present * in the groups. Not including them will result in removing them from subscription group. To * clean up members, just leave the array empty. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index 95296cfe..b854c443 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; @@ -161,12 +160,8 @@ private ApiCall prepareListPrepaymentsRequest .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") .value(input.getPerPage()).isRequired(false)) - .queryParam(param -> param.key("filter[date_field]") - .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) - .queryParam(param -> param.key("filter[start_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterStartDate())).isRequired(false)) - .queryParam(param -> param.key("filter[end_date]") - .value(DateTimeHelper.toSimpleDate(input.getFilterEndDate())).isRequired(false)) + .queryParam(param -> param.key("filter") + .value(input.getFilter()).isRequired(false)) .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java index 845c4b3f..f76e348c 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -509,7 +509,7 @@ private ApiCall, ApiException> prepareListSubscriptio .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("sort") .value((input.getSort() != null) ? input.getSort().value() : "signup_date").isRequired(false)) - .queryParam(param -> param.key("include[]") + .queryParam(param -> param.key("include") .value(SubscriptionListInclude.toValue(input.getInclude())).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .withAuth(auth -> auth @@ -522,7 +522,7 @@ private ApiCall, ApiException> prepareListSubscriptio .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.CSV)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -641,7 +641,7 @@ private ApiCall prepareReadSubscriptionReque .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}.json") - .queryParam(param -> param.key("include[]") + .queryParam(param -> param.key("include") .value(SubscriptionInclude.toValue(include)).isRequired(false)) .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) .shouldEncode(true)) @@ -655,7 +655,7 @@ private ApiCall prepareReadSubscriptionReque .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN)) + .arraySerializationFormat(ArraySerializationFormat.UNINDEXED)) .build(); } @@ -797,7 +797,7 @@ private ApiCall preparePurgeSubscriptionRequest( .path("/subscriptions/{subscription_id}/purge.json") .queryParam(param -> param.key("ack") .value(ack).isRequired(false)) - .queryParam(param -> param.key("cascade[]") + .queryParam(param -> param.key("cascade") .value(SubscriptionPurgeType.toValue(cascade)).isRequired(false)) .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) .shouldEncode(true)) @@ -808,7 +808,7 @@ private ApiCall preparePurgeSubscriptionRequest( .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .endpointConfiguration(param -> param - .arraySerializationFormat(ArraySerializationFormat.PLAIN)) + .arraySerializationFormat(ArraySerializationFormat.CSV)) .build(); } diff --git a/src/main/java/com/maxio/advancedbilling/models/AddressChange.java b/src/main/java/com/maxio/advancedbilling/models/AddressChange.java index 329d0b49..850b0e46 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AddressChange.java +++ b/src/main/java/com/maxio/advancedbilling/models/AddressChange.java @@ -6,9 +6,7 @@ package com.maxio.advancedbilling.models; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import io.apimatic.core.types.BaseModel; @@ -31,10 +29,9 @@ public AddressChange() { * @param before InvoiceAddress value for before. * @param after InvoiceAddress value for after. */ - @JsonCreator public AddressChange( - @JsonProperty("before") InvoiceAddress before, - @JsonProperty("after") InvoiceAddress after) { + InvoiceAddress before, + InvoiceAddress after) { this.before = before; this.after = after; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Allocation.java b/src/main/java/com/maxio/advancedbilling/models/Allocation.java index 89523471..6b97d798 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Allocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/Allocation.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.AllocationPayment; import com.maxio.advancedbilling.models.containers.AllocationPreviousQuantity; import com.maxio.advancedbilling.models.containers.AllocationQuantity; import io.apimatic.core.types.BaseModel; @@ -45,7 +44,7 @@ public class Allocation private Boolean initiateDunning; private OptionalNullable upgradeCharge; private OptionalNullable downgradeCredit; - private OptionalNullable payment; + private OptionalNullable payment; private ZonedDateTime expiresAt; private Long usedQuantity; private Long chargeId; @@ -79,7 +78,7 @@ public Allocation() { * @param initiateDunning Boolean value for initiateDunning. * @param upgradeCharge CreditType value for upgradeCharge. * @param downgradeCredit CreditType value for downgradeCredit. - * @param payment AllocationPayment value for payment. + * @param payment PaymentForAllocation value for payment. * @param expiresAt ZonedDateTime value for expiresAt. * @param usedQuantity Long value for usedQuantity. * @param chargeId Long value for chargeId. @@ -106,7 +105,7 @@ public Allocation( Boolean initiateDunning, CreditType upgradeCharge, CreditType downgradeCredit, - AllocationPayment payment, + PaymentForAllocation payment, ZonedDateTime expiresAt, Long usedQuantity, Long chargeId) { @@ -160,7 +159,7 @@ public Allocation( * @param initiateDunning Boolean value for initiateDunning. * @param upgradeCharge CreditType value for upgradeCharge. * @param downgradeCredit CreditType value for downgradeCredit. - * @param payment AllocationPayment value for payment. + * @param payment PaymentForAllocation value for payment. * @param expiresAt ZonedDateTime value for expiresAt. * @param usedQuantity Long value for usedQuantity. * @param chargeId Long value for chargeId. @@ -175,8 +174,8 @@ protected Allocation(Integer allocationId, Integer componentId, IntervalUnit intervalUnit, Integer previousPricePointId, Boolean accrueCharge, Boolean initiateDunning, OptionalNullable upgradeCharge, OptionalNullable downgradeCredit, - OptionalNullable payment, ZonedDateTime expiresAt, Long usedQuantity, - Long chargeId) { + OptionalNullable payment, ZonedDateTime expiresAt, + Long usedQuantity, Long chargeId) { this.allocationId = allocationId; this.componentId = componentId; this.componentHandle = componentHandle; @@ -751,29 +750,29 @@ public void unsetDowngradeCredit() { /** * Internal Getter for Payment. - * @return Returns the Internal AllocationPayment + * @return Returns the Internal PaymentForAllocation */ @JsonGetter("payment") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetPayment() { + protected OptionalNullable internalGetPayment() { return this.payment; } /** * Getter for Payment. - * @return Returns the AllocationPayment + * @return Returns the PaymentForAllocation */ - public AllocationPayment getPayment() { + public PaymentForAllocation getPayment() { return OptionalNullable.getFrom(payment); } /** * Setter for Payment. - * @param payment Value for AllocationPayment + * @param payment Value for PaymentForAllocation */ @JsonSetter("payment") - public void setPayment(AllocationPayment payment) { + public void setPayment(PaymentForAllocation payment) { this.payment = OptionalNullable.of(payment); } @@ -924,7 +923,7 @@ public static class Builder { private Boolean initiateDunning; private OptionalNullable upgradeCharge; private OptionalNullable downgradeCredit; - private OptionalNullable payment; + private OptionalNullable payment; private ZonedDateTime expiresAt; private Long usedQuantity; private Long chargeId; @@ -1179,10 +1178,10 @@ public Builder unsetDowngradeCredit() { /** * Setter for payment. - * @param payment AllocationPayment value for payment. + * @param payment PaymentForAllocation value for payment. * @return Builder */ - public Builder payment(AllocationPayment payment) { + public Builder payment(PaymentForAllocation payment) { this.payment = OptionalNullable.of(payment); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewDirection.java b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewDirection.java index ca5b1c1f..958d43d3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewDirection.java @@ -42,8 +42,7 @@ public enum AllocationPreviewDirection { @JsonCreator public static AllocationPreviewDirection constructFromString(String toConvert) throws IOException { AllocationPreviewDirection enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewLineItemKind.java b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewLineItemKind.java index a309225c..2237ebd7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewLineItemKind.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewLineItemKind.java @@ -50,8 +50,7 @@ public enum AllocationPreviewLineItemKind { @JsonCreator public static AllocationPreviewLineItemKind constructFromString(String toConvert) throws IOException { AllocationPreviewLineItemKind enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/AutoInvite.java b/src/main/java/com/maxio/advancedbilling/models/AutoInvite.java index dbd4454e..1b41e7b3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AutoInvite.java +++ b/src/main/java/com/maxio/advancedbilling/models/AutoInvite.java @@ -48,8 +48,7 @@ public enum AutoInvite { @JsonCreator public static AutoInvite constructFromInteger(Integer toConvert) throws IOException { AutoInvite enumValue = fromInteger(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountHolderType.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountHolderType.java index ed9398fa..74816cf1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountHolderType.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountHolderType.java @@ -42,8 +42,7 @@ public enum BankAccountHolderType { @JsonCreator public static BankAccountHolderType constructFromString(String toConvert) throws IOException { BankAccountHolderType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountType.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountType.java index a795561b..d5535e95 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountType.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountType.java @@ -42,8 +42,7 @@ public enum BankAccountType { @JsonCreator public static BankAccountType constructFromString(String toConvert) throws IOException { BankAccountType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountVault.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountVault.java index 59e57968..ef7d581d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountVault.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountVault.java @@ -54,8 +54,7 @@ public enum BankAccountVault { @JsonCreator public static BankAccountVault constructFromString(String toConvert) throws IOException { BankAccountVault enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/BasicDateField.java b/src/main/java/com/maxio/advancedbilling/models/BasicDateField.java index 465b9b23..eeb79967 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BasicDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/BasicDateField.java @@ -42,8 +42,7 @@ public enum BasicDateField { @JsonCreator public static BasicDateField constructFromString(String toConvert) throws IOException { BasicDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/BillingManifestLineItemKind.java b/src/main/java/com/maxio/advancedbilling/models/BillingManifestLineItemKind.java index 1b5272dc..946b8a45 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BillingManifestLineItemKind.java +++ b/src/main/java/com/maxio/advancedbilling/models/BillingManifestLineItemKind.java @@ -58,8 +58,7 @@ public enum BillingManifestLineItemKind { @JsonCreator public static BillingManifestLineItemKind constructFromString(String toConvert) throws IOException { BillingManifestLineItemKind enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CancellationMethod.java b/src/main/java/com/maxio/advancedbilling/models/CancellationMethod.java index d83d1c6c..4ee09118 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CancellationMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/CancellationMethod.java @@ -54,8 +54,7 @@ public enum CancellationMethod { @JsonCreator public static CancellationMethod constructFromString(String toConvert) throws IOException { CancellationMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CardType.java b/src/main/java/com/maxio/advancedbilling/models/CardType.java index 2b90a7e2..7882ab6e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CardType.java +++ b/src/main/java/com/maxio/advancedbilling/models/CardType.java @@ -178,8 +178,7 @@ public enum CardType { @JsonCreator public static CardType constructFromString(String toConvert) throws IOException { CardType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CleanupScope.java b/src/main/java/com/maxio/advancedbilling/models/CleanupScope.java index e2be07f6..f3999e98 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CleanupScope.java +++ b/src/main/java/com/maxio/advancedbilling/models/CleanupScope.java @@ -42,8 +42,7 @@ public enum CleanupScope { @JsonCreator public static CleanupScope constructFromString(String toConvert) throws IOException { CleanupScope enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CollectionMethod.java b/src/main/java/com/maxio/advancedbilling/models/CollectionMethod.java index f5390d56..fb0674bd 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CollectionMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/CollectionMethod.java @@ -50,8 +50,7 @@ public enum CollectionMethod { @JsonCreator public static CollectionMethod constructFromString(String toConvert) throws IOException { CollectionMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java index 741ae3d2..42039769 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Component.java +++ b/src/main/java/com/maxio/advancedbilling/models/Component.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.ComponentPricingScheme; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -26,7 +25,7 @@ public class Component private Integer id; private String name; private OptionalNullable handle; - private OptionalNullable pricingScheme; + private OptionalNullable pricingScheme; private String unitName; private OptionalNullable unitPrice; private Integer productFamilyId; @@ -69,7 +68,7 @@ public Component() { * @param id Integer value for id. * @param name String value for name. * @param handle String value for handle. - * @param pricingScheme ComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @param unitName String value for unitName. * @param unitPrice String value for unitPrice. * @param productFamilyId Integer value for productFamilyId. @@ -105,7 +104,7 @@ public Component( Integer id, String name, String handle, - ComponentPricingScheme pricingScheme, + PricingScheme pricingScheme, String unitName, String unitPrice, Integer productFamilyId, @@ -177,7 +176,7 @@ public Component( * @param id Integer value for id. * @param name String value for name. * @param handle String value for handle. - * @param pricingScheme ComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @param unitName String value for unitName. * @param unitPrice String value for unitPrice. * @param productFamilyId Integer value for productFamilyId. @@ -211,7 +210,7 @@ public Component( */ protected Component(Integer id, String name, OptionalNullable handle, - OptionalNullable pricingScheme, String unitName, + OptionalNullable pricingScheme, String unitName, OptionalNullable unitPrice, Integer productFamilyId, String productFamilyName, OptionalNullable pricePerUnitInCents, ComponentKind kind, Boolean archived, Boolean taxable, OptionalNullable description, @@ -347,29 +346,29 @@ public void unsetHandle() { /** * Internal Getter for PricingScheme. - * @return Returns the Internal ComponentPricingScheme + * @return Returns the Internal PricingScheme */ @JsonGetter("pricing_scheme") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetPricingScheme() { + protected OptionalNullable internalGetPricingScheme() { return this.pricingScheme; } /** * Getter for PricingScheme. - * @return Returns the ComponentPricingScheme + * @return Returns the PricingScheme */ - public ComponentPricingScheme getPricingScheme() { + public PricingScheme getPricingScheme() { return OptionalNullable.getFrom(pricingScheme); } /** * Setter for PricingScheme. - * @param pricingScheme Value for ComponentPricingScheme + * @param pricingScheme Value for PricingScheme */ @JsonSetter("pricing_scheme") - public void setPricingScheme(ComponentPricingScheme pricingScheme) { + public void setPricingScheme(PricingScheme pricingScheme) { this.pricingScheme = OptionalNullable.of(pricingScheme); } @@ -1353,7 +1352,7 @@ public static class Builder { private Integer id; private String name; private OptionalNullable handle; - private OptionalNullable pricingScheme; + private OptionalNullable pricingScheme; private String unitName; private OptionalNullable unitPrice; private Integer productFamilyId; @@ -1428,10 +1427,10 @@ public Builder unsetHandle() { /** * Setter for pricingScheme. - * @param pricingScheme ComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @return Builder */ - public Builder pricingScheme(ComponentPricingScheme pricingScheme) { + public Builder pricingScheme(PricingScheme pricingScheme) { this.pricingScheme = OptionalNullable.of(pricingScheme); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentKind.java b/src/main/java/com/maxio/advancedbilling/models/ComponentKind.java index 4b27133b..7d83abe1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentKind.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentKind.java @@ -54,8 +54,7 @@ public enum ComponentKind { @JsonCreator public static ComponentKind constructFromString(String toConvert) throws IOException { ComponentKind enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java index f36dedde..05eccae8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.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.ComponentPricePointIntervalUnit; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -38,7 +37,7 @@ public class ComponentPricePoint private Integer subscriptionId; private Boolean taxIncluded; private OptionalNullable interval; - private OptionalNullable intervalUnit; + private OptionalNullable intervalUnit; private List currencyPrices; /** @@ -64,7 +63,7 @@ public ComponentPricePoint() { * @param subscriptionId Integer value for subscriptionId. * @param taxIncluded Boolean value for taxIncluded. * @param interval Integer value for interval. - * @param intervalUnit ComponentPricePointIntervalUnit value for intervalUnit. + * @param intervalUnit IntervalUnit value for intervalUnit. * @param currencyPrices List of ComponentCurrencyPrice value for currencyPrices. */ public ComponentPricePoint( @@ -83,7 +82,7 @@ public ComponentPricePoint( Integer subscriptionId, Boolean taxIncluded, Integer interval, - ComponentPricePointIntervalUnit intervalUnit, + IntervalUnit intervalUnit, List currencyPrices) { this.id = id; this.type = type; @@ -121,7 +120,7 @@ public ComponentPricePoint( * @param subscriptionId Integer value for subscriptionId. * @param taxIncluded Boolean value for taxIncluded. * @param interval Integer value for interval. - * @param intervalUnit ComponentPricePointIntervalUnit value for intervalUnit. + * @param intervalUnit IntervalUnit value for intervalUnit. * @param currencyPrices List of ComponentCurrencyPrice value for currencyPrices. */ @@ -130,7 +129,7 @@ protected ComponentPricePoint(Integer id, PricePointType type, Boolean mDefault, OptionalNullable archivedAt, ZonedDateTime createdAt, ZonedDateTime updatedAt, List prices, Boolean useSiteExchangeRate, Integer subscriptionId, Boolean taxIncluded, OptionalNullable interval, - OptionalNullable intervalUnit, + OptionalNullable intervalUnit, List currencyPrices) { this.id = id; this.type = type; @@ -513,12 +512,12 @@ public void unsetInterval() { * Internal Getter for IntervalUnit. * 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. - * @return Returns the Internal ComponentPricePointIntervalUnit + * @return Returns the Internal IntervalUnit */ @JsonGetter("interval_unit") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetIntervalUnit() { + protected OptionalNullable internalGetIntervalUnit() { return this.intervalUnit; } @@ -526,9 +525,9 @@ protected OptionalNullable internalGetIntervalU * Getter for IntervalUnit. * 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. - * @return Returns the ComponentPricePointIntervalUnit + * @return Returns the IntervalUnit */ - public ComponentPricePointIntervalUnit getIntervalUnit() { + public IntervalUnit getIntervalUnit() { return OptionalNullable.getFrom(intervalUnit); } @@ -536,10 +535,10 @@ public ComponentPricePointIntervalUnit getIntervalUnit() { * Setter for IntervalUnit. * 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. - * @param intervalUnit Value for ComponentPricePointIntervalUnit + * @param intervalUnit Value for IntervalUnit */ @JsonSetter("interval_unit") - public void setIntervalUnit(ComponentPricePointIntervalUnit intervalUnit) { + public void setIntervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = OptionalNullable.of(intervalUnit); } @@ -641,7 +640,7 @@ public static class Builder { private Integer subscriptionId; private Boolean taxIncluded; private OptionalNullable interval; - private OptionalNullable intervalUnit; + private OptionalNullable intervalUnit; private List currencyPrices; @@ -816,10 +815,10 @@ public Builder unsetInterval() { /** * Setter for intervalUnit. - * @param intervalUnit ComponentPricePointIntervalUnit value for intervalUnit. + * @param intervalUnit IntervalUnit value for intervalUnit. * @return Builder */ - public Builder intervalUnit(ComponentPricePointIntervalUnit intervalUnit) { + public Builder intervalUnit(IntervalUnit intervalUnit) { this.intervalUnit = OptionalNullable.of(intervalUnit); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/CompoundingStrategy.java b/src/main/java/com/maxio/advancedbilling/models/CompoundingStrategy.java index e03124a3..72deeac9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CompoundingStrategy.java +++ b/src/main/java/com/maxio/advancedbilling/models/CompoundingStrategy.java @@ -42,8 +42,7 @@ public enum CompoundingStrategy { @JsonCreator public static CompoundingStrategy constructFromString(String toConvert) throws IOException { CompoundingStrategy enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceStatus.java b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceStatus.java index 4db48c05..ed0c595e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceStatus.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateInvoiceStatus.java @@ -42,8 +42,7 @@ public enum CreateInvoiceStatus { @JsonCreator public static CreateInvoiceStatus constructFromString(String toConvert) throws IOException { CreateInvoiceStatus enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreatePrepaymentMethod.java b/src/main/java/com/maxio/advancedbilling/models/CreatePrepaymentMethod.java index 19533d8e..0af18dd6 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreatePrepaymentMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreatePrepaymentMethod.java @@ -66,8 +66,7 @@ public enum CreatePrepaymentMethod { @JsonCreator public static CreatePrepaymentMethod constructFromString(String toConvert) throws IOException { CreatePrepaymentMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateSignupProformaPreviewInclude.java b/src/main/java/com/maxio/advancedbilling/models/CreateSignupProformaPreviewInclude.java index 6530985e..e56d9b9f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateSignupProformaPreviewInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateSignupProformaPreviewInclude.java @@ -38,8 +38,7 @@ public enum CreateSignupProformaPreviewInclude { @JsonCreator public static CreateSignupProformaPreviewInclude constructFromString(String toConvert) throws IOException { CreateSignupProformaPreviewInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditNoteStatus.java b/src/main/java/com/maxio/advancedbilling/models/CreditNoteStatus.java index 8a047b3e..0822002b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditNoteStatus.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditNoteStatus.java @@ -42,8 +42,7 @@ public enum CreditNoteStatus { @JsonCreator public static CreditNoteStatus constructFromString(String toConvert) throws IOException { CreditNoteStatus enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditScheme.java b/src/main/java/com/maxio/advancedbilling/models/CreditScheme.java index 40ef7448..254fe861 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditScheme.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditScheme.java @@ -46,8 +46,7 @@ public enum CreditScheme { @JsonCreator public static CreditScheme constructFromString(String toConvert) throws IOException { CreditScheme enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditType.java b/src/main/java/com/maxio/advancedbilling/models/CreditType.java index 84937db8..8ec789ae 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditType.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditType.java @@ -46,8 +46,7 @@ public enum CreditType { @JsonCreator public static CreditType constructFromString(String toConvert) throws IOException { CreditType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CurrencyPriceRole.java b/src/main/java/com/maxio/advancedbilling/models/CurrencyPriceRole.java index 8f175ff1..9640e13d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CurrencyPriceRole.java +++ b/src/main/java/com/maxio/advancedbilling/models/CurrencyPriceRole.java @@ -46,8 +46,7 @@ public enum CurrencyPriceRole { @JsonCreator public static CurrencyPriceRole constructFromString(String toConvert) throws IOException { CurrencyPriceRole enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CurrentVault.java b/src/main/java/com/maxio/advancedbilling/models/CurrentVault.java index c1df7e9f..fdeca0ee 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CurrentVault.java +++ b/src/main/java/com/maxio/advancedbilling/models/CurrentVault.java @@ -142,8 +142,7 @@ public enum CurrentVault { @JsonCreator public static CurrentVault constructFromString(String toConvert) throws IOException { CurrentVault enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CustomFieldOwner.java b/src/main/java/com/maxio/advancedbilling/models/CustomFieldOwner.java index 9f11afa6..6e2c6be4 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CustomFieldOwner.java +++ b/src/main/java/com/maxio/advancedbilling/models/CustomFieldOwner.java @@ -42,8 +42,7 @@ public enum CustomFieldOwner { @JsonCreator public static CustomFieldOwner constructFromString(String toConvert) throws IOException { CustomFieldOwner enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/CustomerChange.java b/src/main/java/com/maxio/advancedbilling/models/CustomerChange.java index 6451be32..08d01688 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CustomerChange.java +++ b/src/main/java/com/maxio/advancedbilling/models/CustomerChange.java @@ -10,10 +10,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.maxio.advancedbilling.models.containers.CustomerChangeBillingAddress; -import com.maxio.advancedbilling.models.containers.CustomerChangeCustomFields; -import com.maxio.advancedbilling.models.containers.CustomerChangePayer; -import com.maxio.advancedbilling.models.containers.CustomerChangeShippingAddress; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; @@ -22,10 +18,10 @@ */ public class CustomerChange extends BaseModel { - private OptionalNullable payer; - private OptionalNullable shippingAddress; - private OptionalNullable billingAddress; - private OptionalNullable customFields; + private OptionalNullable payer; + private OptionalNullable shippingAddress; + private OptionalNullable billingAddress; + private OptionalNullable customFields; /** * Default constructor. @@ -35,16 +31,16 @@ public CustomerChange() { /** * Initialization constructor. - * @param payer CustomerChangePayer value for payer. - * @param shippingAddress CustomerChangeShippingAddress value for shippingAddress. - * @param billingAddress CustomerChangeBillingAddress value for billingAddress. - * @param customFields CustomerChangeCustomFields value for customFields. + * @param payer CustomerPayerChange value for payer. + * @param shippingAddress AddressChange value for shippingAddress. + * @param billingAddress AddressChange value for billingAddress. + * @param customFields CustomerCustomFieldsChange value for customFields. */ public CustomerChange( - CustomerChangePayer payer, - CustomerChangeShippingAddress shippingAddress, - CustomerChangeBillingAddress billingAddress, - CustomerChangeCustomFields customFields) { + CustomerPayerChange payer, + AddressChange shippingAddress, + AddressChange billingAddress, + CustomerCustomFieldsChange customFields) { this.payer = OptionalNullable.of(payer); this.shippingAddress = OptionalNullable.of(shippingAddress); this.billingAddress = OptionalNullable.of(billingAddress); @@ -53,16 +49,16 @@ public CustomerChange( /** * Initialization constructor. - * @param payer CustomerChangePayer value for payer. - * @param shippingAddress CustomerChangeShippingAddress value for shippingAddress. - * @param billingAddress CustomerChangeBillingAddress value for billingAddress. - * @param customFields CustomerChangeCustomFields value for customFields. + * @param payer CustomerPayerChange value for payer. + * @param shippingAddress AddressChange value for shippingAddress. + * @param billingAddress AddressChange value for billingAddress. + * @param customFields CustomerCustomFieldsChange value for customFields. */ - protected CustomerChange(OptionalNullable payer, - OptionalNullable shippingAddress, - OptionalNullable billingAddress, - OptionalNullable customFields) { + protected CustomerChange(OptionalNullable payer, + OptionalNullable shippingAddress, + OptionalNullable billingAddress, + OptionalNullable customFields) { this.payer = payer; this.shippingAddress = shippingAddress; this.billingAddress = billingAddress; @@ -71,29 +67,29 @@ protected CustomerChange(OptionalNullable payer, /** * Internal Getter for Payer. - * @return Returns the Internal CustomerChangePayer + * @return Returns the Internal CustomerPayerChange */ @JsonGetter("payer") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetPayer() { + protected OptionalNullable internalGetPayer() { return this.payer; } /** * Getter for Payer. - * @return Returns the CustomerChangePayer + * @return Returns the CustomerPayerChange */ - public CustomerChangePayer getPayer() { + public CustomerPayerChange getPayer() { return OptionalNullable.getFrom(payer); } /** * Setter for Payer. - * @param payer Value for CustomerChangePayer + * @param payer Value for CustomerPayerChange */ @JsonSetter("payer") - public void setPayer(CustomerChangePayer payer) { + public void setPayer(CustomerPayerChange payer) { this.payer = OptionalNullable.of(payer); } @@ -106,29 +102,29 @@ public void unsetPayer() { /** * Internal Getter for ShippingAddress. - * @return Returns the Internal CustomerChangeShippingAddress + * @return Returns the Internal AddressChange */ @JsonGetter("shipping_address") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetShippingAddress() { + protected OptionalNullable internalGetShippingAddress() { return this.shippingAddress; } /** * Getter for ShippingAddress. - * @return Returns the CustomerChangeShippingAddress + * @return Returns the AddressChange */ - public CustomerChangeShippingAddress getShippingAddress() { + public AddressChange getShippingAddress() { return OptionalNullable.getFrom(shippingAddress); } /** * Setter for ShippingAddress. - * @param shippingAddress Value for CustomerChangeShippingAddress + * @param shippingAddress Value for AddressChange */ @JsonSetter("shipping_address") - public void setShippingAddress(CustomerChangeShippingAddress shippingAddress) { + public void setShippingAddress(AddressChange shippingAddress) { this.shippingAddress = OptionalNullable.of(shippingAddress); } @@ -141,29 +137,29 @@ public void unsetShippingAddress() { /** * Internal Getter for BillingAddress. - * @return Returns the Internal CustomerChangeBillingAddress + * @return Returns the Internal AddressChange */ @JsonGetter("billing_address") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetBillingAddress() { + protected OptionalNullable internalGetBillingAddress() { return this.billingAddress; } /** * Getter for BillingAddress. - * @return Returns the CustomerChangeBillingAddress + * @return Returns the AddressChange */ - public CustomerChangeBillingAddress getBillingAddress() { + public AddressChange getBillingAddress() { return OptionalNullable.getFrom(billingAddress); } /** * Setter for BillingAddress. - * @param billingAddress Value for CustomerChangeBillingAddress + * @param billingAddress Value for AddressChange */ @JsonSetter("billing_address") - public void setBillingAddress(CustomerChangeBillingAddress billingAddress) { + public void setBillingAddress(AddressChange billingAddress) { this.billingAddress = OptionalNullable.of(billingAddress); } @@ -176,29 +172,29 @@ public void unsetBillingAddress() { /** * Internal Getter for CustomFields. - * @return Returns the Internal CustomerChangeCustomFields + * @return Returns the Internal CustomerCustomFieldsChange */ @JsonGetter("custom_fields") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetCustomFields() { + protected OptionalNullable internalGetCustomFields() { return this.customFields; } /** * Getter for CustomFields. - * @return Returns the CustomerChangeCustomFields + * @return Returns the CustomerCustomFieldsChange */ - public CustomerChangeCustomFields getCustomFields() { + public CustomerCustomFieldsChange getCustomFields() { return OptionalNullable.getFrom(customFields); } /** * Setter for CustomFields. - * @param customFields Value for CustomerChangeCustomFields + * @param customFields Value for CustomerCustomFieldsChange */ @JsonSetter("custom_fields") - public void setCustomFields(CustomerChangeCustomFields customFields) { + public void setCustomFields(CustomerCustomFieldsChange customFields) { this.customFields = OptionalNullable.of(customFields); } @@ -238,19 +234,19 @@ public Builder toBuilder() { * Class to build instances of {@link CustomerChange}. */ public static class Builder { - private OptionalNullable payer; - private OptionalNullable shippingAddress; - private OptionalNullable billingAddress; - private OptionalNullable customFields; + private OptionalNullable payer; + private OptionalNullable shippingAddress; + private OptionalNullable billingAddress; + private OptionalNullable customFields; /** * Setter for payer. - * @param payer CustomerChangePayer value for payer. + * @param payer CustomerPayerChange value for payer. * @return Builder */ - public Builder payer(CustomerChangePayer payer) { + public Builder payer(CustomerPayerChange payer) { this.payer = OptionalNullable.of(payer); return this; } @@ -266,10 +262,10 @@ public Builder unsetPayer() { /** * Setter for shippingAddress. - * @param shippingAddress CustomerChangeShippingAddress value for shippingAddress. + * @param shippingAddress AddressChange value for shippingAddress. * @return Builder */ - public Builder shippingAddress(CustomerChangeShippingAddress shippingAddress) { + public Builder shippingAddress(AddressChange shippingAddress) { this.shippingAddress = OptionalNullable.of(shippingAddress); return this; } @@ -285,10 +281,10 @@ public Builder unsetShippingAddress() { /** * Setter for billingAddress. - * @param billingAddress CustomerChangeBillingAddress value for billingAddress. + * @param billingAddress AddressChange value for billingAddress. * @return Builder */ - public Builder billingAddress(CustomerChangeBillingAddress billingAddress) { + public Builder billingAddress(AddressChange billingAddress) { this.billingAddress = OptionalNullable.of(billingAddress); return this; } @@ -304,10 +300,10 @@ public Builder unsetBillingAddress() { /** * Setter for customFields. - * @param customFields CustomerChangeCustomFields value for customFields. + * @param customFields CustomerCustomFieldsChange value for customFields. * @return Builder */ - public Builder customFields(CustomerChangeCustomFields customFields) { + public Builder customFields(CustomerCustomFieldsChange customFields) { this.customFields = OptionalNullable.of(customFields); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/CustomerCustomFieldsChange.java b/src/main/java/com/maxio/advancedbilling/models/CustomerCustomFieldsChange.java index d2f16d1a..ee0c1f49 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CustomerCustomFieldsChange.java +++ b/src/main/java/com/maxio/advancedbilling/models/CustomerCustomFieldsChange.java @@ -6,9 +6,7 @@ package com.maxio.advancedbilling.models; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import io.apimatic.core.types.BaseModel; import java.util.List; @@ -32,10 +30,9 @@ public CustomerCustomFieldsChange() { * @param before List of InvoiceCustomField value for before. * @param after List of InvoiceCustomField value for after. */ - @JsonCreator public CustomerCustomFieldsChange( - @JsonProperty("before") List before, - @JsonProperty("after") List after) { + List before, + List after) { this.before = before; this.after = after; } diff --git a/src/main/java/com/maxio/advancedbilling/models/CustomerPayerChange.java b/src/main/java/com/maxio/advancedbilling/models/CustomerPayerChange.java index dfac23ae..c439c917 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CustomerPayerChange.java +++ b/src/main/java/com/maxio/advancedbilling/models/CustomerPayerChange.java @@ -6,9 +6,7 @@ package com.maxio.advancedbilling.models; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonGetter; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import io.apimatic.core.types.BaseModel; @@ -31,10 +29,9 @@ public CustomerPayerChange() { * @param before InvoicePayerChange value for before. * @param after InvoicePayerChange value for after. */ - @JsonCreator public CustomerPayerChange( - @JsonProperty("before") InvoicePayerChange before, - @JsonProperty("after") InvoicePayerChange after) { + InvoicePayerChange before, + InvoicePayerChange after) { this.before = before; this.after = after; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Direction.java b/src/main/java/com/maxio/advancedbilling/models/Direction.java index 790312fc..66b6288c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Direction.java +++ b/src/main/java/com/maxio/advancedbilling/models/Direction.java @@ -42,8 +42,7 @@ public enum Direction { @JsonCreator public static Direction constructFromString(String toConvert) throws IOException { Direction enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/DiscountType.java b/src/main/java/com/maxio/advancedbilling/models/DiscountType.java index 3fe7f4f6..54b52024 100644 --- a/src/main/java/com/maxio/advancedbilling/models/DiscountType.java +++ b/src/main/java/com/maxio/advancedbilling/models/DiscountType.java @@ -42,8 +42,7 @@ public enum DiscountType { @JsonCreator public static DiscountType constructFromString(String toConvert) throws IOException { DiscountType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/EventType.java b/src/main/java/com/maxio/advancedbilling/models/EventType.java index ff775e3e..afbecd0b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/EventType.java +++ b/src/main/java/com/maxio/advancedbilling/models/EventType.java @@ -170,8 +170,7 @@ public enum EventType { @JsonCreator public static EventType constructFromString(String toConvert) throws IOException { EventType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ExtendedIntervalUnit.java b/src/main/java/com/maxio/advancedbilling/models/ExtendedIntervalUnit.java index 2cd61f7e..2b6fe51f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ExtendedIntervalUnit.java +++ b/src/main/java/com/maxio/advancedbilling/models/ExtendedIntervalUnit.java @@ -46,8 +46,7 @@ public enum ExtendedIntervalUnit { @JsonCreator public static ExtendedIntervalUnit constructFromString(String toConvert) throws IOException { ExtendedIntervalUnit enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/FailedPaymentAction.java b/src/main/java/com/maxio/advancedbilling/models/FailedPaymentAction.java index 76b2b7e7..7c978619 100644 --- a/src/main/java/com/maxio/advancedbilling/models/FailedPaymentAction.java +++ b/src/main/java/com/maxio/advancedbilling/models/FailedPaymentAction.java @@ -46,8 +46,7 @@ public enum FailedPaymentAction { @JsonCreator public static FailedPaymentAction constructFromString(String toConvert) throws IOException { FailedPaymentAction enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/FirstChargeType.java b/src/main/java/com/maxio/advancedbilling/models/FirstChargeType.java index 11fd8307..2f2b98c7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/FirstChargeType.java +++ b/src/main/java/com/maxio/advancedbilling/models/FirstChargeType.java @@ -46,8 +46,7 @@ public enum FirstChargeType { @JsonCreator public static FirstChargeType constructFromString(String toConvert) throws IOException { FirstChargeType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/GroupTargetType.java b/src/main/java/com/maxio/advancedbilling/models/GroupTargetType.java index 37d013f9..da808ba8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/GroupTargetType.java +++ b/src/main/java/com/maxio/advancedbilling/models/GroupTargetType.java @@ -54,8 +54,7 @@ public enum GroupTargetType { @JsonCreator public static GroupTargetType constructFromString(String toConvert) throws IOException { GroupTargetType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/GroupType.java b/src/main/java/com/maxio/advancedbilling/models/GroupType.java index 38e52353..0fa4808d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/GroupType.java +++ b/src/main/java/com/maxio/advancedbilling/models/GroupType.java @@ -42,8 +42,7 @@ public enum GroupType { @JsonCreator public static GroupType constructFromString(String toConvert) throws IOException { GroupType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/IncludeNotNull.java b/src/main/java/com/maxio/advancedbilling/models/IncludeNotNull.java index b85d3219..5c699e16 100644 --- a/src/main/java/com/maxio/advancedbilling/models/IncludeNotNull.java +++ b/src/main/java/com/maxio/advancedbilling/models/IncludeNotNull.java @@ -38,8 +38,7 @@ public enum IncludeNotNull { @JsonCreator public static IncludeNotNull constructFromString(String toConvert) throws IOException { IncludeNotNull enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/IncludeOption.java b/src/main/java/com/maxio/advancedbilling/models/IncludeOption.java index 79f596e9..2b873a04 100644 --- a/src/main/java/com/maxio/advancedbilling/models/IncludeOption.java +++ b/src/main/java/com/maxio/advancedbilling/models/IncludeOption.java @@ -42,8 +42,7 @@ public enum IncludeOption { @JsonCreator public static IncludeOption constructFromString(String toConvert) throws IOException { IncludeOption enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/IntervalUnit.java b/src/main/java/com/maxio/advancedbilling/models/IntervalUnit.java index ce69970e..d2c1d304 100644 --- a/src/main/java/com/maxio/advancedbilling/models/IntervalUnit.java +++ b/src/main/java/com/maxio/advancedbilling/models/IntervalUnit.java @@ -42,8 +42,7 @@ public enum IntervalUnit { @JsonCreator public static IntervalUnit constructFromString(String toConvert) throws IOException { IntervalUnit enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceConsolidationLevel.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceConsolidationLevel.java index b6d4e420..46b7dccd 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceConsolidationLevel.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceConsolidationLevel.java @@ -46,8 +46,7 @@ public enum InvoiceConsolidationLevel { @JsonCreator public static InvoiceConsolidationLevel constructFromString(String toConvert) throws IOException { InvoiceConsolidationLevel enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceDateField.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceDateField.java index ff3aa997..0c1aa9de 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceDateField.java @@ -54,8 +54,7 @@ public enum InvoiceDateField { @JsonCreator public static InvoiceDateField constructFromString(String toConvert) throws IOException { InvoiceDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountSourceType.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountSourceType.java index 07373395..eb5f6382 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountSourceType.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountSourceType.java @@ -46,8 +46,7 @@ public enum InvoiceDiscountSourceType { @JsonCreator public static InvoiceDiscountSourceType constructFromString(String toConvert) throws IOException { InvoiceDiscountSourceType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountType.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountType.java index 45781d49..7d08bbc6 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountType.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscountType.java @@ -46,8 +46,7 @@ public enum InvoiceDiscountType { @JsonCreator public static InvoiceDiscountType constructFromString(String toConvert) throws IOException { InvoiceDiscountType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceEventPaymentMethod.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceEventPaymentMethod.java index cb9b8c4b..ba5f5128 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceEventPaymentMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceEventPaymentMethod.java @@ -54,8 +54,7 @@ public enum InvoiceEventPaymentMethod { @JsonCreator public static InvoiceEventPaymentMethod constructFromString(String toConvert) throws IOException { InvoiceEventPaymentMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceEventType.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceEventType.java index de215f5b..3ff4774f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceEventType.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceEventType.java @@ -90,8 +90,7 @@ public enum InvoiceEventType { @JsonCreator public static InvoiceEventType constructFromString(String toConvert) throws IOException { InvoiceEventType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java index a671b52d..a886d39f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.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.InvoiceLineItemComponentCostData2; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.LocalDate; @@ -40,7 +39,7 @@ public class InvoiceLineItem private OptionalNullable componentId; private OptionalNullable pricePointId; private Boolean hide; - private OptionalNullable componentCostData; + private OptionalNullable componentCostData; private OptionalNullable productPricePointId; private Boolean customItem; private String kind; @@ -71,7 +70,7 @@ public InvoiceLineItem() { * @param componentId Integer value for componentId. * @param pricePointId Integer value for pricePointId. * @param hide Boolean value for hide. - * @param componentCostData InvoiceLineItemComponentCostData2 value for componentCostData. + * @param componentCostData InvoiceLineItemComponentCostData value for componentCostData. * @param productPricePointId Integer value for productPricePointId. * @param customItem Boolean value for customItem. * @param kind String value for kind. @@ -95,7 +94,7 @@ public InvoiceLineItem( Integer componentId, Integer pricePointId, Boolean hide, - InvoiceLineItemComponentCostData2 componentCostData, + InvoiceLineItemComponentCostData componentCostData, Integer productPricePointId, Boolean customItem, String kind) { @@ -143,7 +142,7 @@ public InvoiceLineItem( * @param componentId Integer value for componentId. * @param pricePointId Integer value for pricePointId. * @param hide Boolean value for hide. - * @param componentCostData InvoiceLineItemComponentCostData2 value for componentCostData. + * @param componentCostData InvoiceLineItemComponentCostData value for componentCostData. * @param productPricePointId Integer value for productPricePointId. * @param customItem Boolean value for customItem. * @param kind String value for kind. @@ -155,7 +154,7 @@ protected InvoiceLineItem(String uid, String title, String description, String q LocalDate periodRangeEnd, Integer transactionId, OptionalNullable productId, OptionalNullable productVersion, OptionalNullable componentId, OptionalNullable pricePointId, Boolean hide, - OptionalNullable componentCostData, + OptionalNullable componentCostData, OptionalNullable productPricePointId, Boolean customItem, String kind) { this.uid = uid; this.title = title; @@ -693,29 +692,29 @@ public void setHide(Boolean hide) { /** * Internal Getter for ComponentCostData. - * @return Returns the Internal InvoiceLineItemComponentCostData2 + * @return Returns the Internal InvoiceLineItemComponentCostData */ @JsonGetter("component_cost_data") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetComponentCostData() { + protected OptionalNullable internalGetComponentCostData() { return this.componentCostData; } /** * Getter for ComponentCostData. - * @return Returns the InvoiceLineItemComponentCostData2 + * @return Returns the InvoiceLineItemComponentCostData */ - public InvoiceLineItemComponentCostData2 getComponentCostData() { + public InvoiceLineItemComponentCostData getComponentCostData() { return OptionalNullable.getFrom(componentCostData); } /** * Setter for ComponentCostData. - * @param componentCostData Value for InvoiceLineItemComponentCostData2 + * @param componentCostData Value for InvoiceLineItemComponentCostData */ @JsonSetter("component_cost_data") - public void setComponentCostData(InvoiceLineItemComponentCostData2 componentCostData) { + public void setComponentCostData(InvoiceLineItemComponentCostData componentCostData) { this.componentCostData = OptionalNullable.of(componentCostData); } @@ -876,7 +875,7 @@ public static class Builder { private OptionalNullable componentId; private OptionalNullable pricePointId; private Boolean hide; - private OptionalNullable componentCostData; + private OptionalNullable componentCostData; private OptionalNullable productPricePointId; private Boolean customItem; private String kind; @@ -1101,10 +1100,10 @@ public Builder hide(Boolean hide) { /** * Setter for componentCostData. - * @param componentCostData InvoiceLineItemComponentCostData2 value for componentCostData. + * @param componentCostData InvoiceLineItemComponentCostData value for componentCostData. * @return Builder */ - public Builder componentCostData(InvoiceLineItemComponentCostData2 componentCostData) { + public Builder componentCostData(InvoiceLineItemComponentCostData componentCostData) { this.componentCostData = OptionalNullable.of(componentCostData); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethodType.java b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethodType.java index 812139a9..b7dfd716 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethodType.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethodType.java @@ -58,8 +58,7 @@ public enum InvoicePaymentMethodType { @JsonCreator public static InvoicePaymentMethodType constructFromString(String toConvert) throws IOException { InvoicePaymentMethodType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentType.java b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentType.java index 6748f015..122cb7eb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentType.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentType.java @@ -50,8 +50,7 @@ public enum InvoicePaymentType { @JsonCreator public static InvoicePaymentType constructFromString(String toConvert) throws IOException { InvoicePaymentType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceRole.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceRole.java index 28911e2e..7d6b3cbb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceRole.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceRole.java @@ -74,8 +74,7 @@ public enum InvoiceRole { @JsonCreator public static InvoiceRole constructFromString(String toConvert) throws IOException { InvoiceRole enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceSortField.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceSortField.java index a6719905..31449b38 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceSortField.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceSortField.java @@ -66,8 +66,7 @@ public enum InvoiceSortField { @JsonCreator public static InvoiceSortField constructFromString(String toConvert) throws IOException { InvoiceSortField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceStatus.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceStatus.java index 84a88897..eb20f08e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceStatus.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceStatus.java @@ -58,8 +58,7 @@ public enum InvoiceStatus { @JsonCreator public static InvoiceStatus constructFromString(String toConvert) throws IOException { InvoiceStatus enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ItemCategory.java b/src/main/java/com/maxio/advancedbilling/models/ItemCategory.java index 46cd4205..4c1138a3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ItemCategory.java +++ b/src/main/java/com/maxio/advancedbilling/models/ItemCategory.java @@ -54,8 +54,7 @@ public enum ItemCategory { @JsonCreator public static ItemCategory constructFromString(String toConvert) throws IOException { ItemCategory enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/LineItemKind.java b/src/main/java/com/maxio/advancedbilling/models/LineItemKind.java index d7eaf96b..6988ba34 100644 --- a/src/main/java/com/maxio/advancedbilling/models/LineItemKind.java +++ b/src/main/java/com/maxio/advancedbilling/models/LineItemKind.java @@ -74,8 +74,7 @@ public enum LineItemKind { @JsonCreator public static LineItemKind constructFromString(String toConvert) throws IOException { LineItemKind enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/LineItemTransactionType.java b/src/main/java/com/maxio/advancedbilling/models/LineItemTransactionType.java index c7e24787..30ac2294 100644 --- a/src/main/java/com/maxio/advancedbilling/models/LineItemTransactionType.java +++ b/src/main/java/com/maxio/advancedbilling/models/LineItemTransactionType.java @@ -62,8 +62,7 @@ public enum LineItemTransactionType { @JsonCreator public static LineItemTransactionType constructFromString(String toConvert) throws IOException { LineItemTransactionType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java index 9555c73b..488e352d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java @@ -9,29 +9,16 @@ 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 java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.List; /** * This is a model class for ListAllComponentPricePointsInput type. */ public class ListAllComponentPricePointsInput { - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; private ListComponentsPricePointsInclude include; private Integer page; private Integer perPage; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterType; private SortingDirection direction; - private List filterIds; - private IncludeNotNull filterArchivedAt; + private ListPricePointsFilter filter; /** * Default constructor. @@ -43,123 +30,23 @@ public ListAllComponentPricePointsInput() { /** * Initialization constructor. - * @param filterDateField BasicDateField value for filterDateField. - * @param filterEndDate LocalDate value for filterEndDate. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. * @param include ListComponentsPricePointsInclude value for include. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param filterStartDate LocalDate value for filterStartDate. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @param filterType List of PricePointType value for filterType. * @param direction SortingDirection value for direction. - * @param filterIds List of Integer value for filterIds. - * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. + * @param filter ListPricePointsFilter value for filter. */ public ListAllComponentPricePointsInput( - BasicDateField filterDateField, - LocalDate filterEndDate, - ZonedDateTime filterEndDatetime, ListComponentsPricePointsInclude include, Integer page, Integer perPage, - LocalDate filterStartDate, - ZonedDateTime filterStartDatetime, - List filterType, SortingDirection direction, - List filterIds, - IncludeNotNull filterArchivedAt) { - this.filterDateField = filterDateField; - this.filterEndDate = filterEndDate; - this.filterEndDatetime = filterEndDatetime; + ListPricePointsFilter filter) { this.include = include; this.page = page; this.perPage = perPage; - this.filterStartDate = filterStartDate; - this.filterStartDatetime = filterStartDatetime; - this.filterType = filterType; this.direction = direction; - this.filterIds = filterIds; - this.filterArchivedAt = filterArchivedAt; - } - - /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @return Returns the BasicDateField - */ - @JsonGetter("filter[date_field]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getFilterDateField() { - return filterDateField; - } - - /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @param filterDateField Value for BasicDateField - */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - } - - /** - * Getter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points with a timestamp at or before 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 end_date. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[end_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterEndDatetime() { - return filterEndDatetime; - } - - /** - * Setter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points with a timestamp at or before 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 end_date. - * @param filterEndDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[end_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; + this.filter = filter; } /** @@ -237,83 +124,6 @@ public void setPerPage(Integer perPage) { this.perPage = perPage; } - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - - /** - * Getter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points 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. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[start_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterStartDatetime() { - return filterStartDatetime; - } - - /** - * Setter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points 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. - * @param filterStartDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[start_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - } - - /** - * Getter for FilterType. - * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. - * @return Returns the List of PricePointType - */ - @JsonGetter("filter[type]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterType() { - return filterType; - } - - /** - * Setter for FilterType. - * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. - * @param filterType Value for List of PricePointType - */ - @JsonSetter("filter[type]") - public void setFilterType(List filterType) { - this.filterType = filterType; - } - /** * Getter for Direction. * Controls the order in which results are returned. Use in query `direction=asc`. @@ -336,49 +146,24 @@ public void setDirection(SortingDirection direction) { } /** - * Getter for FilterIds. - * Allows fetching price points with matching id based on provided values. Use in query: - * `filter[ids]=1,2,3`. - * @return Returns the List of Integer + * Getter for Filter. + * Filter to use for List PricePoints operations + * @return Returns the ListPricePointsFilter */ - @JsonGetter("filter[ids]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; + public ListPricePointsFilter getFilter() { + return filter; } /** - * Setter for FilterIds. - * Allows fetching price points with matching id based on provided values. Use in query: - * `filter[ids]=1,2,3`. - * @param filterIds Value for List of Integer + * Setter for Filter. + * Filter to use for List PricePoints operations + * @param filter Value for ListPricePointsFilter */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - /** - * Getter for FilterArchivedAt. - * Allows fetching price points only if archived_at is present or not. Use in query: - * `filter[archived_at]=not_null`. - * @return Returns the IncludeNotNull - */ - @JsonGetter("filter[archived_at]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public IncludeNotNull getFilterArchivedAt() { - return filterArchivedAt; - } - - /** - * Setter for FilterArchivedAt. - * Allows fetching price points only if archived_at is present or not. Use in query: - * `filter[archived_at]=not_null`. - * @param filterArchivedAt Value for IncludeNotNull - */ - @JsonSetter("filter[archived_at]") - public void setFilterArchivedAt(IncludeNotNull filterArchivedAt) { - this.filterArchivedAt = filterArchivedAt; + @JsonSetter("filter") + public void setFilter(ListPricePointsFilter filter) { + this.filter = filter; } /** @@ -387,12 +172,8 @@ public void setFilterArchivedAt(IncludeNotNull filterArchivedAt) { */ @Override public String toString() { - return "ListAllComponentPricePointsInput [" + "filterDateField=" + filterDateField - + ", filterEndDate=" + filterEndDate + ", filterEndDatetime=" + filterEndDatetime - + ", include=" + include + ", page=" + page + ", perPage=" + perPage - + ", filterStartDate=" + filterStartDate + ", filterStartDatetime=" - + filterStartDatetime + ", filterType=" + filterType + ", direction=" + direction - + ", filterIds=" + filterIds + ", filterArchivedAt=" + filterArchivedAt + "]"; + return "ListAllComponentPricePointsInput [" + "include=" + include + ", page=" + page + + ", perPage=" + perPage + ", direction=" + direction + ", filter=" + filter + "]"; } /** @@ -402,18 +183,11 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder() - .filterDateField(getFilterDateField()) - .filterEndDate(getFilterEndDate()) - .filterEndDatetime(getFilterEndDatetime()) .include(getInclude()) .page(getPage()) .perPage(getPerPage()) - .filterStartDate(getFilterStartDate()) - .filterStartDatetime(getFilterStartDatetime()) - .filterType(getFilterType()) .direction(getDirection()) - .filterIds(getFilterIds()) - .filterArchivedAt(getFilterArchivedAt()); + .filter(getFilter()); return builder; } @@ -421,50 +195,13 @@ public Builder toBuilder() { * Class to build instances of {@link ListAllComponentPricePointsInput}. */ public static class Builder { - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; private ListComponentsPricePointsInclude include; private Integer page = 1; private Integer perPage = 20; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterType; private SortingDirection direction; - private List filterIds; - private IncludeNotNull filterArchivedAt; - - - - /** - * Setter for filterDateField. - * @param filterDateField BasicDateField value for filterDateField. - * @return Builder - */ - public Builder filterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } + private ListPricePointsFilter filter; - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. - * @return Builder - */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - return this; - } - /** - * Setter for filterEndDatetime. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @return Builder - */ - public Builder filterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - return this; - } /** * Setter for include. @@ -496,36 +233,6 @@ public Builder perPage(Integer perPage) { return this; } - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - - /** - * Setter for filterStartDatetime. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @return Builder - */ - public Builder filterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - return this; - } - - /** - * Setter for filterType. - * @param filterType List of PricePointType value for filterType. - * @return Builder - */ - public Builder filterType(List filterType) { - this.filterType = filterType; - return this; - } - /** * Setter for direction. * @param direction SortingDirection value for direction. @@ -537,22 +244,12 @@ public Builder direction(SortingDirection direction) { } /** - * Setter for filterIds. - * @param filterIds List of Integer value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - - /** - * Setter for filterArchivedAt. - * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. + * Setter for filter. + * @param filter ListPricePointsFilter value for filter. * @return Builder */ - public Builder filterArchivedAt(IncludeNotNull filterArchivedAt) { - this.filterArchivedAt = filterArchivedAt; + public Builder filter(ListPricePointsFilter filter) { + this.filter = filter; return this; } @@ -561,9 +258,7 @@ public Builder filterArchivedAt(IncludeNotNull filterArchivedAt) { * @return {@link ListAllComponentPricePointsInput} */ public ListAllComponentPricePointsInput build() { - return new ListAllComponentPricePointsInput(filterDateField, filterEndDate, - filterEndDatetime, include, page, perPage, filterStartDate, filterStartDatetime, - filterType, direction, filterIds, filterArchivedAt); + return new ListAllComponentPricePointsInput(include, page, perPage, direction, filter); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java index 0d308bc6..4cf006fa 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java @@ -9,26 +9,13 @@ 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 java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.List; /** * This is a model class for ListAllProductPricePointsInput type. */ public class ListAllProductPricePointsInput { private SortingDirection direction; - private IncludeNotNull filterArchivedAt; - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private List filterIds; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterType; + private ListPricePointsFilter filter; private ListProductsPricePointsInclude include; private Integer page; private Integer perPage; @@ -44,40 +31,19 @@ public ListAllProductPricePointsInput() { /** * Initialization constructor. * @param direction SortingDirection value for direction. - * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. - * @param filterDateField BasicDateField value for filterDateField. - * @param filterEndDate LocalDate value for filterEndDate. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @param filterIds List of Integer value for filterIds. - * @param filterStartDate LocalDate value for filterStartDate. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @param filterType List of PricePointType value for filterType. + * @param filter ListPricePointsFilter value for filter. * @param include ListProductsPricePointsInclude value for include. * @param page Integer value for page. * @param perPage Integer value for perPage. */ public ListAllProductPricePointsInput( SortingDirection direction, - IncludeNotNull filterArchivedAt, - BasicDateField filterDateField, - LocalDate filterEndDate, - ZonedDateTime filterEndDatetime, - List filterIds, - LocalDate filterStartDate, - ZonedDateTime filterStartDatetime, - List filterType, + ListPricePointsFilter filter, ListProductsPricePointsInclude include, Integer page, Integer perPage) { this.direction = direction; - this.filterArchivedAt = filterArchivedAt; - this.filterDateField = filterDateField; - this.filterEndDate = filterEndDate; - this.filterEndDatetime = filterEndDatetime; - this.filterIds = filterIds; - this.filterStartDate = filterStartDate; - this.filterStartDatetime = filterStartDatetime; - this.filterType = filterType; + this.filter = filter; this.include = include; this.page = page; this.perPage = perPage; @@ -105,205 +71,24 @@ public void setDirection(SortingDirection direction) { } /** - * Getter for FilterArchivedAt. - * Allows fetching price points only if archived_at is present or not. Use in query: - * `filter[archived_at]=not_null`. - * @return Returns the IncludeNotNull + * Getter for Filter. + * Filter to use for List PricePoints operations + * @return Returns the ListPricePointsFilter */ - @JsonGetter("filter[archived_at]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public IncludeNotNull getFilterArchivedAt() { - return filterArchivedAt; + public ListPricePointsFilter getFilter() { + return filter; } /** - * Setter for FilterArchivedAt. - * Allows fetching price points only if archived_at is present or not. Use in query: - * `filter[archived_at]=not_null`. - * @param filterArchivedAt Value for IncludeNotNull + * Setter for Filter. + * Filter to use for List PricePoints operations + * @param filter Value for ListPricePointsFilter */ - @JsonSetter("filter[archived_at]") - public void setFilterArchivedAt(IncludeNotNull filterArchivedAt) { - this.filterArchivedAt = filterArchivedAt; - } - - /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @return Returns the BasicDateField - */ - @JsonGetter("filter[date_field]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getFilterDateField() { - return filterDateField; - } - - /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @param filterDateField Value for BasicDateField - */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - } - - /** - * Getter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points with a timestamp at or before 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 end_date. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[end_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterEndDatetime() { - return filterEndDatetime; - } - - /** - * Setter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points with a timestamp at or before 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 end_date. - * @param filterEndDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[end_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - } - - /** - * Getter for FilterIds. - * Allows fetching price points with matching id based on provided values. Use in query: - * `filter[ids]=1,2,3`. - * @return Returns the List of Integer - */ - @JsonGetter("filter[ids]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; - } - - /** - * Setter for FilterIds. - * Allows fetching price points with matching id based on provided values. Use in query: - * `filter[ids]=1,2,3`. - * @param filterIds Value for List of Integer - */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - - /** - * Getter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points 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. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[start_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterStartDatetime() { - return filterStartDatetime; - } - - /** - * Setter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns price points 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. - * @param filterStartDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[start_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - } - - /** - * Getter for FilterType. - * Allows fetching price points with matching type. Use in query: `filter[type]=catalog,custom`. - * @return Returns the List of PricePointType - */ - @JsonGetter("filter[type]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterType() { - return filterType; - } - - /** - * Setter for FilterType. - * Allows fetching price points with matching type. Use in query: `filter[type]=catalog,custom`. - * @param filterType Value for List of PricePointType - */ - @JsonSetter("filter[type]") - public void setFilterType(List filterType) { - this.filterType = filterType; + @JsonSetter("filter") + public void setFilter(ListPricePointsFilter filter) { + this.filter = filter; } /** @@ -387,12 +172,8 @@ public void setPerPage(Integer perPage) { */ @Override public String toString() { - return "ListAllProductPricePointsInput [" + "direction=" + direction + ", filterArchivedAt=" - + filterArchivedAt + ", filterDateField=" + filterDateField + ", filterEndDate=" - + filterEndDate + ", filterEndDatetime=" + filterEndDatetime + ", filterIds=" - + filterIds + ", filterStartDate=" + filterStartDate + ", filterStartDatetime=" - + filterStartDatetime + ", filterType=" + filterType + ", include=" + include - + ", page=" + page + ", perPage=" + perPage + "]"; + return "ListAllProductPricePointsInput [" + "direction=" + direction + ", filter=" + filter + + ", include=" + include + ", page=" + page + ", perPage=" + perPage + "]"; } /** @@ -403,14 +184,7 @@ public String toString() { public Builder toBuilder() { Builder builder = new Builder() .direction(getDirection()) - .filterArchivedAt(getFilterArchivedAt()) - .filterDateField(getFilterDateField()) - .filterEndDate(getFilterEndDate()) - .filterEndDatetime(getFilterEndDatetime()) - .filterIds(getFilterIds()) - .filterStartDate(getFilterStartDate()) - .filterStartDatetime(getFilterStartDatetime()) - .filterType(getFilterType()) + .filter(getFilter()) .include(getInclude()) .page(getPage()) .perPage(getPerPage()); @@ -422,14 +196,7 @@ public Builder toBuilder() { */ public static class Builder { private SortingDirection direction; - private IncludeNotNull filterArchivedAt; - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private List filterIds; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterType; + private ListPricePointsFilter filter; private ListProductsPricePointsInclude include; private Integer page = 1; private Integer perPage = 20; @@ -447,82 +214,12 @@ public Builder direction(SortingDirection direction) { } /** - * Setter for filterArchivedAt. - * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. - * @return Builder - */ - public Builder filterArchivedAt(IncludeNotNull filterArchivedAt) { - this.filterArchivedAt = filterArchivedAt; - return this; - } - - /** - * Setter for filterDateField. - * @param filterDateField BasicDateField value for filterDateField. - * @return Builder - */ - public Builder filterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } - - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. - * @return Builder - */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - return this; - } - - /** - * Setter for filterEndDatetime. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @return Builder - */ - public Builder filterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - return this; - } - - /** - * Setter for filterIds. - * @param filterIds List of Integer value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - - /** - * Setter for filterStartDatetime. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @return Builder - */ - public Builder filterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - return this; - } - - /** - * Setter for filterType. - * @param filterType List of PricePointType value for filterType. + * Setter for filter. + * @param filter ListPricePointsFilter value for filter. * @return Builder */ - public Builder filterType(List filterType) { - this.filterType = filterType; + public Builder filter(ListPricePointsFilter filter) { + this.filter = filter; return this; } @@ -561,9 +258,7 @@ public Builder perPage(Integer perPage) { * @return {@link ListAllProductPricePointsInput} */ public ListAllProductPricePointsInput build() { - return new ListAllProductPricePointsInput(direction, filterArchivedAt, filterDateField, - filterEndDate, filterEndDatetime, filterIds, filterStartDate, - filterStartDatetime, filterType, include, page, perPage); + return new ListAllProductPricePointsInput(direction, filter, include, page, perPage); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsFilter.java new file mode 100644 index 00000000..db0e0c3c --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsFilter.java @@ -0,0 +1,146 @@ +/* + * 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 io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ListComponentsFilter type. + */ +public class ListComponentsFilter + extends BaseModel { + private List ids; + private Boolean useSiteExchangeRate; + + /** + * Default constructor. + */ + public ListComponentsFilter() { + } + + /** + * Initialization constructor. + * @param ids List of Integer value for ids. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + */ + public ListComponentsFilter( + List ids, + Boolean useSiteExchangeRate) { + this.ids = ids; + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for Ids. + * Allows fetching components with matching id based on provided value. Use in query + * `filter[ids]=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getIds() { + return ids; + } + + /** + * Setter for Ids. + * Allows fetching components with matching id based on provided value. Use in query + * `filter[ids]=1,2,3`. + * @param ids Value for List of Integer + */ + @JsonSetter("ids") + public void setIds(List ids) { + this.ids = ids; + } + + /** + * Getter for UseSiteExchangeRate. + * Allows fetching components with matching use_site_exchange_rate based on provided value + * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Allows fetching components with matching use_site_exchange_rate based on provided value + * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Converts this ListComponentsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListComponentsFilter [" + "ids=" + ids + ", useSiteExchangeRate=" + + useSiteExchangeRate + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListComponentsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListComponentsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .ids(getIds()) + .useSiteExchangeRate(getUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListComponentsFilter}. + */ + public static class Builder { + private List ids; + private Boolean useSiteExchangeRate; + + + + /** + * Setter for ids. + * @param ids List of Integer value for ids. + * @return Builder + */ + public Builder ids(List ids) { + this.ids = ids; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Builds a new {@link ListComponentsFilter} object using the set fields. + * @return {@link ListComponentsFilter} + */ + public ListComponentsFilter build() { + return new ListComponentsFilter(ids, useSiteExchangeRate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java index d3f3db7a..a204f9b9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java @@ -9,7 +9,6 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; -import java.util.List; /** * This is a model class for ListComponentsForProductFamilyInput type. @@ -17,15 +16,14 @@ public class ListComponentsForProductFamilyInput { private int productFamilyId; private Boolean includeArchived; - private List filterIds; private Integer page; private Integer perPage; + private ListComponentsFilter filter; private BasicDateField dateField; private String endDate; private String endDatetime; private String startDate; private String startDatetime; - private Boolean filterUseSiteExchangeRate; /** * Default constructor. @@ -39,39 +37,36 @@ public ListComponentsForProductFamilyInput() { * Initialization constructor. * @param productFamilyId int value for productFamilyId. * @param includeArchived Boolean value for includeArchived. - * @param filterIds List of Integer value for filterIds. * @param page Integer value for page. * @param perPage Integer value for perPage. + * @param filter ListComponentsFilter value for filter. * @param dateField BasicDateField value for dateField. * @param endDate String value for endDate. * @param endDatetime String value for endDatetime. * @param startDate String value for startDate. * @param startDatetime String value for startDatetime. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. */ public ListComponentsForProductFamilyInput( int productFamilyId, Boolean includeArchived, - List filterIds, Integer page, Integer perPage, + ListComponentsFilter filter, BasicDateField dateField, String endDate, String endDatetime, String startDate, - String startDatetime, - Boolean filterUseSiteExchangeRate) { + String startDatetime) { this.productFamilyId = productFamilyId; this.includeArchived = includeArchived; - this.filterIds = filterIds; this.page = page; this.perPage = perPage; + this.filter = filter; this.dateField = dateField; this.endDate = endDate; this.endDatetime = endDatetime; this.startDate = startDate; this.startDatetime = startDatetime; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; } /** @@ -115,29 +110,6 @@ public void setIncludeArchived(Boolean includeArchived) { this.includeArchived = includeArchived; } - /** - * Getter for FilterIds. - * Allows fetching components with matching id based on provided value. Use in query - * `filter[ids]=1,2`. - * @return Returns the List of Integer - */ - @JsonGetter("filter[ids]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; - } - - /** - * Setter for FilterIds. - * Allows fetching components with matching id based on provided value. Use in query - * `filter[ids]=1,2`. - * @param filterIds Value for List of Integer - */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - /** * Getter for Page. * Result records are organized in pages. By default, the first page of results is displayed. @@ -192,6 +164,27 @@ public void setPerPage(Integer perPage) { this.perPage = perPage; } + /** + * Getter for Filter. + * Filter to use for List Components operations + * @return Returns the ListComponentsFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListComponentsFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Components operations + * @param filter Value for ListComponentsFilter + */ + @JsonSetter("filter") + public void setFilter(ListComponentsFilter filter) { + this.filter = filter; + } + /** * Getter for DateField. * The type of filter you would like to apply to your search. Use in query @@ -317,29 +310,6 @@ public void setStartDatetime(String startDatetime) { this.startDatetime = startDatetime; } - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching components with matching use_site_exchange_rate based on provided value - * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching components with matching use_site_exchange_rate based on provided value - * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - /** * Converts this ListComponentsForProductFamilyInput into string format. * @return String representation of this class @@ -347,11 +317,10 @@ public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { @Override public String toString() { return "ListComponentsForProductFamilyInput [" + "productFamilyId=" + productFamilyId - + ", includeArchived=" + includeArchived + ", filterIds=" + filterIds + ", page=" - + page + ", perPage=" + perPage + ", dateField=" + dateField + ", endDate=" - + endDate + ", endDatetime=" + endDatetime + ", startDate=" + startDate - + ", startDatetime=" + startDatetime + ", filterUseSiteExchangeRate=" - + filterUseSiteExchangeRate + "]"; + + ", includeArchived=" + includeArchived + ", page=" + page + ", perPage=" + perPage + + ", filter=" + filter + ", dateField=" + dateField + ", endDate=" + endDate + + ", endDatetime=" + endDatetime + ", startDate=" + startDate + ", startDatetime=" + + startDatetime + "]"; } /** @@ -362,15 +331,14 @@ public String toString() { public Builder toBuilder() { Builder builder = new Builder(productFamilyId) .includeArchived(getIncludeArchived()) - .filterIds(getFilterIds()) .page(getPage()) .perPage(getPerPage()) + .filter(getFilter()) .dateField(getDateField()) .endDate(getEndDate()) .endDatetime(getEndDatetime()) .startDate(getStartDate()) - .startDatetime(getStartDatetime()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .startDatetime(getStartDatetime()); return builder; } @@ -380,15 +348,14 @@ public Builder toBuilder() { public static class Builder { private int productFamilyId; private Boolean includeArchived; - private List filterIds; private Integer page = 1; private Integer perPage = 20; + private ListComponentsFilter filter; private BasicDateField dateField; private String endDate; private String endDatetime; private String startDate; private String startDatetime; - private Boolean filterUseSiteExchangeRate; /** * Initialization constructor. @@ -424,16 +391,6 @@ public Builder includeArchived(Boolean includeArchived) { return this; } - /** - * Setter for filterIds. - * @param filterIds List of Integer value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - /** * Setter for page. * @param page Integer value for page. @@ -454,6 +411,16 @@ public Builder perPage(Integer perPage) { return this; } + /** + * Setter for filter. + * @param filter ListComponentsFilter value for filter. + * @return Builder + */ + public Builder filter(ListComponentsFilter filter) { + this.filter = filter; + return this; + } + /** * Setter for dateField. * @param dateField BasicDateField value for dateField. @@ -504,24 +471,13 @@ public Builder startDatetime(String startDatetime) { return this; } - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - /** * Builds a new {@link ListComponentsForProductFamilyInput} object using the set fields. * @return {@link ListComponentsForProductFamilyInput} */ public ListComponentsForProductFamilyInput build() { - return new ListComponentsForProductFamilyInput(productFamilyId, includeArchived, - filterIds, page, perPage, dateField, endDate, endDatetime, startDate, - startDatetime, filterUseSiteExchangeRate); + return new ListComponentsForProductFamilyInput(productFamilyId, includeArchived, page, + perPage, filter, dateField, endDate, endDatetime, startDate, startDatetime); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java index 5a834aea..0c1c9647 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java @@ -9,7 +9,6 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; -import java.util.List; /** * This is a model class for ListComponentsInput type. @@ -23,8 +22,7 @@ public class ListComponentsInput { private Boolean includeArchived; private Integer page; private Integer perPage; - private List filterIds; - private Boolean filterUseSiteExchangeRate; + private ListComponentsFilter filter; /** * Default constructor. @@ -44,8 +42,7 @@ public ListComponentsInput() { * @param includeArchived Boolean value for includeArchived. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param filterIds List of String value for filterIds. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. + * @param filter ListComponentsFilter value for filter. */ public ListComponentsInput( BasicDateField dateField, @@ -56,8 +53,7 @@ public ListComponentsInput( Boolean includeArchived, Integer page, Integer perPage, - List filterIds, - Boolean filterUseSiteExchangeRate) { + ListComponentsFilter filter) { this.dateField = dateField; this.startDate = startDate; this.endDate = endDate; @@ -66,8 +62,7 @@ public ListComponentsInput( this.includeArchived = includeArchived; this.page = page; this.perPage = perPage; - this.filterIds = filterIds; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + this.filter = filter; } /** @@ -269,49 +264,24 @@ public void setPerPage(Integer perPage) { } /** - * Getter for FilterIds. - * Allows fetching components with matching id based on provided value. Use in query - * `filter[ids]=1,2,3`. - * @return Returns the List of String + * Getter for Filter. + * Filter to use for List Components operations + * @return Returns the ListComponentsFilter */ - @JsonGetter("filter[ids]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; + public ListComponentsFilter getFilter() { + return filter; } /** - * Setter for FilterIds. - * Allows fetching components with matching id based on provided value. Use in query - * `filter[ids]=1,2,3`. - * @param filterIds Value for List of String + * Setter for Filter. + * Filter to use for List Components operations + * @param filter Value for ListComponentsFilter */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching components with matching use_site_exchange_rate based on provided value - * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching components with matching use_site_exchange_rate based on provided value - * (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + @JsonSetter("filter") + public void setFilter(ListComponentsFilter filter) { + this.filter = filter; } /** @@ -323,8 +293,7 @@ public String toString() { return "ListComponentsInput [" + "dateField=" + dateField + ", startDate=" + startDate + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + ", includeArchived=" + includeArchived + ", page=" + page - + ", perPage=" + perPage + ", filterIds=" + filterIds - + ", filterUseSiteExchangeRate=" + filterUseSiteExchangeRate + "]"; + + ", perPage=" + perPage + ", filter=" + filter + "]"; } /** @@ -342,8 +311,7 @@ public Builder toBuilder() { .includeArchived(getIncludeArchived()) .page(getPage()) .perPage(getPerPage()) - .filterIds(getFilterIds()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .filter(getFilter()); return builder; } @@ -359,8 +327,7 @@ public static class Builder { private Boolean includeArchived; private Integer page = 1; private Integer perPage = 20; - private List filterIds; - private Boolean filterUseSiteExchangeRate; + private ListComponentsFilter filter; @@ -445,22 +412,12 @@ public Builder perPage(Integer perPage) { } /** - * Setter for filterIds. - * @param filterIds List of String value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. + * Setter for filter. + * @param filter ListComponentsFilter value for filter. * @return Builder */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + public Builder filter(ListComponentsFilter filter) { + this.filter = filter; return this; } @@ -470,8 +427,7 @@ public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { */ public ListComponentsInput build() { return new ListComponentsInput(dateField, startDate, endDate, startDatetime, - endDatetime, includeArchived, page, perPage, filterIds, - filterUseSiteExchangeRate); + endDatetime, includeArchived, page, perPage, filter); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsPricePointsInclude.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsPricePointsInclude.java index c692a033..27383982 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListComponentsPricePointsInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsPricePointsInclude.java @@ -38,8 +38,7 @@ public enum ListComponentsPricePointsInclude { @JsonCreator public static ListComponentsPricePointsInclude constructFromString(String toConvert) throws IOException { ListComponentsPricePointsInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java new file mode 100644 index 00000000..fbc5b756 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsFilter.java @@ -0,0 +1,412 @@ +/* + * 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.LocalDate; +import java.time.ZonedDateTime; +import java.util.List; + +/** + * This is a model class for ListCouponsFilter type. + */ +public class ListCouponsFilter + extends BaseModel { + private BasicDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + private List ids; + private List codes; + private Boolean useSiteExchangeRate; + + /** + * Default constructor. + */ + public ListCouponsFilter() { + } + + /** + * Initialization constructor. + * @param dateField BasicDateField value for dateField. + * @param startDate LocalDate value for startDate. + * @param endDate LocalDate value for endDate. + * @param startDatetime ZonedDateTime value for startDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + * @param ids List of Integer value for ids. + * @param codes List of String value for codes. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + */ + public ListCouponsFilter( + BasicDateField dateField, + LocalDate startDate, + LocalDate endDate, + ZonedDateTime startDatetime, + ZonedDateTime endDatetime, + List ids, + List codes, + Boolean useSiteExchangeRate) { + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.ids = ids; + this.codes = codes; + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query + * `filter[date_field]=created_at`. + * @return Returns the BasicDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public BasicDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you would like to apply to your search. Use in query + * `filter[date_field]=created_at`. + * @param dateField Value for BasicDateField + */ + @JsonSetter("date_field") + public void setDateField(BasicDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. Use in query `filter[start_date]=2011-12-17`. + * @return Returns the LocalDate + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. Use in query `filter[start_date]=2011-12-17`. + * @param startDate Value for LocalDate + */ + @JsonSetter("start_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use + * in query `filter[end_date]=2011-12-15`. + * @return Returns the LocalDate + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use + * in query `filter[end_date]=2011-12-15`. + * @param endDate Value for LocalDate + */ + @JsonSetter("end_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + /** + * Getter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns coupons 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. Use in query + * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. + * @return Returns the ZonedDateTime + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getStartDatetime() { + return startDatetime; + } + + /** + * Setter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns coupons 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. Use in query + * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. + * @param startDatetime Value for ZonedDateTime + */ + @JsonSetter("start_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setStartDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns coupons with a timestamp at or before 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 end_date. Use in query + * `filter[end_datetime]=2011-12-1T10:15:30+01:00`. + * @return Returns the ZonedDateTime + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getEndDatetime() { + return endDatetime; + } + + /** + * Setter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns coupons with a timestamp at or before 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 end_date. Use in query + * `filter[end_datetime]=2011-12-1T10:15:30+01:00`. + * @param endDatetime Value for ZonedDateTime + */ + @JsonSetter("end_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setEndDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for Ids. + * Allows fetching coupons with matching id based on provided values. Use in query + * `filter[ids]=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getIds() { + return ids; + } + + /** + * Setter for Ids. + * Allows fetching coupons with matching id based on provided values. Use in query + * `filter[ids]=1,2,3`. + * @param ids Value for List of Integer + */ + @JsonSetter("ids") + public void setIds(List ids) { + this.ids = ids; + } + + /** + * Getter for Codes. + * Allows fetching coupons with matching codes based on provided values. Use in query + * `filter[codes]=free,free_trial`. + * @return Returns the List of String + */ + @JsonGetter("codes") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCodes() { + return codes; + } + + /** + * Setter for Codes. + * Allows fetching coupons with matching codes based on provided values. Use in query + * `filter[codes]=free,free_trial`. + * @param codes Value for List of String + */ + @JsonSetter("codes") + public void setCodes(List codes) { + this.codes = codes; + } + + /** + * Getter for UseSiteExchangeRate. + * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in + * query `filter[use_site_exchange_rate]=true`. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in + * query `filter[use_site_exchange_rate]=true`. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Converts this ListCouponsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListCouponsFilter [" + "dateField=" + dateField + ", startDate=" + startDate + + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + + endDatetime + ", ids=" + ids + ", codes=" + codes + ", useSiteExchangeRate=" + + useSiteExchangeRate + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListCouponsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCouponsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .ids(getIds()) + .codes(getCodes()) + .useSiteExchangeRate(getUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListCouponsFilter}. + */ + public static class Builder { + private BasicDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + private List ids; + private List codes; + private Boolean useSiteExchangeRate; + + + + /** + * Setter for dateField. + * @param dateField BasicDateField value for dateField. + * @return Builder + */ + public Builder dateField(BasicDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDate. + * @param startDate LocalDate value for startDate. + * @return Builder + */ + public Builder startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate LocalDate value for endDate. + * @return Builder + */ + public Builder endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime ZonedDateTime value for startDatetime. + * @return Builder + */ + public Builder startDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + * @return Builder + */ + public Builder endDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for ids. + * @param ids List of Integer value for ids. + * @return Builder + */ + public Builder ids(List ids) { + this.ids = ids; + return this; + } + + /** + * Setter for codes. + * @param codes List of String value for codes. + * @return Builder + */ + public Builder codes(List codes) { + this.codes = codes; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Builds a new {@link ListCouponsFilter} object using the set fields. + * @return {@link ListCouponsFilter} + */ + public ListCouponsFilter build() { + return new ListCouponsFilter(dateField, startDate, endDate, startDatetime, endDatetime, + ids, codes, useSiteExchangeRate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java index 1147034b..347319d1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java @@ -9,12 +9,6 @@ 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 java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.List; /** * This is a model class for ListCouponsForProductFamilyInput type. @@ -23,15 +17,8 @@ public class ListCouponsForProductFamilyInput { private int productFamilyId; private Integer page; private Integer perPage; - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterIds; - private List filterCodes; + private ListCouponsFilter filter; private Boolean currencyPrices; - private Boolean filterUseSiteExchangeRate; /** * Default constructor. @@ -46,41 +33,20 @@ public ListCouponsForProductFamilyInput() { * @param productFamilyId int value for productFamilyId. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param filterDateField BasicDateField value for filterDateField. - * @param filterEndDate LocalDate value for filterEndDate. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @param filterStartDate LocalDate value for filterStartDate. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @param filterIds List of Integer value for filterIds. - * @param filterCodes List of String value for filterCodes. + * @param filter ListCouponsFilter value for filter. * @param currencyPrices Boolean value for currencyPrices. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. */ public ListCouponsForProductFamilyInput( int productFamilyId, Integer page, Integer perPage, - BasicDateField filterDateField, - LocalDate filterEndDate, - ZonedDateTime filterEndDatetime, - LocalDate filterStartDate, - ZonedDateTime filterStartDatetime, - List filterIds, - List filterCodes, - Boolean currencyPrices, - Boolean filterUseSiteExchangeRate) { + ListCouponsFilter filter, + Boolean currencyPrices) { this.productFamilyId = productFamilyId; this.page = page; this.perPage = perPage; - this.filterDateField = filterDateField; - this.filterEndDate = filterEndDate; - this.filterEndDatetime = filterEndDatetime; - this.filterStartDate = filterStartDate; - this.filterStartDatetime = filterStartDatetime; - this.filterIds = filterIds; - this.filterCodes = filterCodes; + this.filter = filter; this.currencyPrices = currencyPrices; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; } /** @@ -158,188 +124,24 @@ public void setPerPage(Integer perPage) { } /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query - * `filter[date_field]=created_at`. - * @return Returns the BasicDateField + * Getter for Filter. + * Filter to use for List Coupons operations + * @return Returns the ListCouponsFilter */ - @JsonGetter("filter[date_field]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getFilterDateField() { - return filterDateField; + public ListCouponsFilter getFilter() { + return filter; } /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query - * `filter[date_field]=created_at`. - * @param filterDateField Value for BasicDateField + * Setter for Filter. + * Filter to use for List Coupons operations + * @param filter Value for ListCouponsFilter */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a - * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use - * in query `filter[date_field]=2011-12-15`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a - * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use - * in query `filter[date_field]=2011-12-15`. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - } - - /** - * Getter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons with a timestamp at or before 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 end_date. Use in query - * `?filter[end_datetime]=2011-12-1T10:15:30+01:00`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[end_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterEndDatetime() { - return filterEndDatetime; - } - - /** - * Setter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons with a timestamp at or before 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 end_date. Use in query - * `?filter[end_datetime]=2011-12-1T10:15:30+01:00`. - * @param filterEndDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[end_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - } - - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with - * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-17`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with - * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-17`. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - - /** - * Getter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons 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. Use in query - * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[start_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterStartDatetime() { - return filterStartDatetime; - } - - /** - * Setter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons 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. Use in query - * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. - * @param filterStartDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[start_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - } - - /** - * Getter for FilterIds. - * Allows fetching coupons with matching id based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @return Returns the List of Integer - */ - @JsonGetter("filter[ids]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; - } - - /** - * Setter for FilterIds. - * Allows fetching coupons with matching id based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @param filterIds Value for List of Integer - */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - /** - * Getter for FilterCodes. - * Allows fetching coupons with matching codes based on provided values. Use in query - * `filter[codes]=free,free_trial`. - * @return Returns the List of String - */ - @JsonGetter("filter[codes]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterCodes() { - return filterCodes; - } - - /** - * Setter for FilterCodes. - * Allows fetching coupons with matching codes based on provided values. Use in query - * `filter[codes]=free,free_trial`. - * @param filterCodes Value for List of String - */ - @JsonSetter("filter[codes]") - public void setFilterCodes(List filterCodes) { - this.filterCodes = filterCodes; + @JsonSetter("filter") + public void setFilter(ListCouponsFilter filter) { + this.filter = filter; } /** @@ -367,29 +169,6 @@ public void setCurrencyPrices(Boolean currencyPrices) { this.currencyPrices = currencyPrices; } - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in - * query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in - * query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - /** * Converts this ListCouponsForProductFamilyInput into string format. * @return String representation of this class @@ -397,12 +176,8 @@ public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { @Override public String toString() { return "ListCouponsForProductFamilyInput [" + "productFamilyId=" + productFamilyId - + ", page=" + page + ", perPage=" + perPage + ", filterDateField=" + filterDateField - + ", filterEndDate=" + filterEndDate + ", filterEndDatetime=" + filterEndDatetime - + ", filterStartDate=" + filterStartDate + ", filterStartDatetime=" - + filterStartDatetime + ", filterIds=" + filterIds + ", filterCodes=" + filterCodes - + ", currencyPrices=" + currencyPrices + ", filterUseSiteExchangeRate=" - + filterUseSiteExchangeRate + "]"; + + ", page=" + page + ", perPage=" + perPage + ", filter=" + filter + + ", currencyPrices=" + currencyPrices + "]"; } /** @@ -414,15 +189,8 @@ public Builder toBuilder() { Builder builder = new Builder(productFamilyId) .page(getPage()) .perPage(getPerPage()) - .filterDateField(getFilterDateField()) - .filterEndDate(getFilterEndDate()) - .filterEndDatetime(getFilterEndDatetime()) - .filterStartDate(getFilterStartDate()) - .filterStartDatetime(getFilterStartDatetime()) - .filterIds(getFilterIds()) - .filterCodes(getFilterCodes()) - .currencyPrices(getCurrencyPrices()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .filter(getFilter()) + .currencyPrices(getCurrencyPrices()); return builder; } @@ -433,15 +201,8 @@ public static class Builder { private int productFamilyId; private Integer page = 1; private Integer perPage = 30; - private BasicDateField filterDateField; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private List filterIds; - private List filterCodes; + private ListCouponsFilter filter; private Boolean currencyPrices; - private Boolean filterUseSiteExchangeRate; /** * Initialization constructor. @@ -488,72 +249,12 @@ public Builder perPage(Integer perPage) { } /** - * Setter for filterDateField. - * @param filterDateField BasicDateField value for filterDateField. + * Setter for filter. + * @param filter ListCouponsFilter value for filter. * @return Builder */ - public Builder filterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } - - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. - * @return Builder - */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - return this; - } - - /** - * Setter for filterEndDatetime. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @return Builder - */ - public Builder filterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - return this; - } - - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - - /** - * Setter for filterStartDatetime. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @return Builder - */ - public Builder filterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - return this; - } - - /** - * Setter for filterIds. - * @param filterIds List of Integer value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - - /** - * Setter for filterCodes. - * @param filterCodes List of String value for filterCodes. - * @return Builder - */ - public Builder filterCodes(List filterCodes) { - this.filterCodes = filterCodes; + public Builder filter(ListCouponsFilter filter) { + this.filter = filter; return this; } @@ -567,25 +268,13 @@ public Builder currencyPrices(Boolean currencyPrices) { return this; } - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - /** * Builds a new {@link ListCouponsForProductFamilyInput} object using the set fields. * @return {@link ListCouponsForProductFamilyInput} */ public ListCouponsForProductFamilyInput build() { - return new ListCouponsForProductFamilyInput(productFamilyId, page, perPage, - filterDateField, filterEndDate, filterEndDatetime, filterStartDate, - filterStartDatetime, filterIds, filterCodes, currencyPrices, - filterUseSiteExchangeRate); + return new ListCouponsForProductFamilyInput(productFamilyId, page, perPage, filter, + currencyPrices); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java index 240d29b0..4489da45 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java @@ -9,12 +9,6 @@ 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 java.time.LocalDate; -import java.time.ZonedDateTime; -import java.util.List; /** * This is a model class for ListCouponsInput type. @@ -22,20 +16,8 @@ public class ListCouponsInput { private Integer page; private Integer perPage; - private BasicDateField dateField; - private LocalDate startDate; - private LocalDate endDate; - private ZonedDateTime startDatetime; - private ZonedDateTime endDatetime; - private List filterIds; - private List filterCodes; + private ListCouponsFilter filter; private Boolean currencyPrices; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private BasicDateField filterDateField; - private Boolean filterUseSiteExchangeRate; /** * Default constructor. @@ -49,54 +31,18 @@ public ListCouponsInput() { * Initialization constructor. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param dateField BasicDateField value for dateField. - * @param startDate LocalDate value for startDate. - * @param endDate LocalDate value for endDate. - * @param startDatetime ZonedDateTime value for startDatetime. - * @param endDatetime ZonedDateTime value for endDatetime. - * @param filterIds List of Integer value for filterIds. - * @param filterCodes List of String value for filterCodes. + * @param filter ListCouponsFilter value for filter. * @param currencyPrices Boolean value for currencyPrices. - * @param filterEndDate LocalDate value for filterEndDate. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @param filterStartDate LocalDate value for filterStartDate. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @param filterDateField BasicDateField value for filterDateField. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. */ public ListCouponsInput( Integer page, Integer perPage, - BasicDateField dateField, - LocalDate startDate, - LocalDate endDate, - ZonedDateTime startDatetime, - ZonedDateTime endDatetime, - List filterIds, - List filterCodes, - Boolean currencyPrices, - LocalDate filterEndDate, - ZonedDateTime filterEndDatetime, - LocalDate filterStartDate, - ZonedDateTime filterStartDatetime, - BasicDateField filterDateField, - Boolean filterUseSiteExchangeRate) { + ListCouponsFilter filter, + Boolean currencyPrices) { this.page = page; this.perPage = perPage; - this.dateField = dateField; - this.startDate = startDate; - this.endDate = endDate; - this.startDatetime = startDatetime; - this.endDatetime = endDatetime; - this.filterIds = filterIds; - this.filterCodes = filterCodes; + this.filter = filter; this.currencyPrices = currencyPrices; - this.filterEndDate = filterEndDate; - this.filterEndDatetime = filterEndDatetime; - this.filterStartDate = filterStartDate; - this.filterStartDatetime = filterStartDatetime; - this.filterDateField = filterDateField; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; } /** @@ -154,192 +100,24 @@ public void setPerPage(Integer perPage) { } /** - * Getter for DateField. - * The field was deprecated: on January 20, 2022. We recommend using filter[date_field] instead - * to achieve the same result. The type of filter you would like to apply to your search. - * @return Returns the BasicDateField + * Getter for Filter. + * Filter to use for List Coupons operations + * @return Returns the ListCouponsFilter */ - @JsonGetter("date_field") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getDateField() { - return dateField; + public ListCouponsFilter getFilter() { + return filter; } /** - * Setter for DateField. - * The field was deprecated: on January 20, 2022. We recommend using filter[date_field] instead - * to achieve the same result. The type of filter you would like to apply to your search. - * @param dateField Value for BasicDateField + * Setter for Filter. + * Filter to use for List Coupons operations + * @param filter Value for ListCouponsFilter */ - @JsonSetter("date_field") - public void setDateField(BasicDateField dateField) { - this.dateField = dateField; - } - - /** - * Getter for StartDate. - * The field was deprecated: on January 20, 2022. We recommend using filter[start_date] instead - * to achieve the same result. The start date (format YYYY-MM-DD) with which to filter the - * date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your - * site’s time zone on the date specified. - * @return Returns the LocalDate - */ - @JsonGetter("start_date") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getStartDate() { - return startDate; - } - - /** - * Setter for StartDate. - * The field was deprecated: on January 20, 2022. We recommend using filter[start_date] instead - * to achieve the same result. The start date (format YYYY-MM-DD) with which to filter the - * date_field. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your - * site’s time zone on the date specified. - * @param startDate Value for LocalDate - */ - @JsonSetter("start_date") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setStartDate(LocalDate startDate) { - this.startDate = startDate; - } - - /** - * Getter for EndDate. - * The field was deprecated: on January 20, 2022. We recommend using filter[end_date] instead to - * achieve the same result. The end date (format YYYY-MM-DD) with which to filter the - * date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s - * time zone on the date specified. - * @return Returns the LocalDate - */ - @JsonGetter("end_date") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getEndDate() { - return endDate; - } - - /** - * Setter for EndDate. - * The field was deprecated: on January 20, 2022. We recommend using filter[end_date] instead to - * achieve the same result. The end date (format YYYY-MM-DD) with which to filter the - * date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s - * time zone on the date specified. - * @param endDate Value for LocalDate - */ - @JsonSetter("end_date") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setEndDate(LocalDate endDate) { - this.endDate = endDate; - } - - /** - * Getter for StartDatetime. - * The field was deprecated: on January 20, 2022. We recommend using filter[start_datetime] - * instead to achieve the same result. The start date and time (format YYYY-MM-DD HH:MM:SS) with - * which to filter the date_field. Returns coupons 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. - * @return Returns the ZonedDateTime - */ - @JsonGetter("start_datetime") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getStartDatetime() { - return startDatetime; - } - - /** - * Setter for StartDatetime. - * The field was deprecated: on January 20, 2022. We recommend using filter[start_datetime] - * instead to achieve the same result. The start date and time (format YYYY-MM-DD HH:MM:SS) with - * which to filter the date_field. Returns coupons 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. - * @param startDatetime Value for ZonedDateTime - */ - @JsonSetter("start_datetime") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setStartDatetime(ZonedDateTime startDatetime) { - this.startDatetime = startDatetime; - } - - /** - * Getter for EndDatetime. - * The field was deprecated: on January 20, 2022. We recommend using filter[end_datetime] - * instead to achieve the same result. The end date and time (format YYYY-MM-DD HH:MM:SS) with - * which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. - * @return Returns the ZonedDateTime - */ - @JsonGetter("end_datetime") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getEndDatetime() { - return endDatetime; - } - - /** - * Setter for EndDatetime. - * The field was deprecated: on January 20, 2022. We recommend using filter[end_datetime] - * instead to achieve the same result. The end date and time (format YYYY-MM-DD HH:MM:SS) with - * which to filter the date_field. Returns coupons with a timestamp at or before 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 end_date. - * @param endDatetime Value for ZonedDateTime - */ - @JsonSetter("end_datetime") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setEndDatetime(ZonedDateTime endDatetime) { - this.endDatetime = endDatetime; - } - - /** - * Getter for FilterIds. - * Allows fetching coupons with matching id based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @return Returns the List of Integer - */ - @JsonGetter("filter[ids]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterIds() { - return filterIds; - } - - /** - * Setter for FilterIds. - * Allows fetching coupons with matching id based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @param filterIds Value for List of Integer - */ - @JsonSetter("filter[ids]") - public void setFilterIds(List filterIds) { - this.filterIds = filterIds; - } - - /** - * Getter for FilterCodes. - * Allows fetching coupons with matching code based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @return Returns the List of String - */ - @JsonGetter("filter[codes]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterCodes() { - return filterCodes; - } - - /** - * Setter for FilterCodes. - * Allows fetching coupons with matching code based on provided values. Use in query - * `filter[ids]=1,2,3`. - * @param filterCodes Value for List of String - */ - @JsonSetter("filter[codes]") - public void setFilterCodes(List filterCodes) { - this.filterCodes = filterCodes; + @JsonSetter("filter") + public void setFilter(ListCouponsFilter filter) { + this.filter = filter; } /** @@ -367,183 +145,14 @@ public void setCurrencyPrices(Boolean currencyPrices) { this.currencyPrices = currencyPrices; } - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a - * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use - * in query `filter[end_date]=2011-12-17`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a - * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use - * in query `filter[end_date]=2011-12-17`. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - } - - /** - * Getter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons with a timestamp at or before 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 end_date. Use in query - * `filter[end_datetime]=2011-12-19T10:15:30+01:00`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[end_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterEndDatetime() { - return filterEndDatetime; - } - - /** - * Setter for FilterEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons with a timestamp at or before 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 end_date. Use in query - * `filter[end_datetime]=2011-12-19T10:15:30+01:00`. - * @param filterEndDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[end_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - } - - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with - * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-19`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with - * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-19`. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - - /** - * Getter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons 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. Use in query - * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[start_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterStartDatetime() { - return filterStartDatetime; - } - - /** - * Setter for FilterStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns coupons 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. Use in query - * `filter[start_datetime]=2011-12-19T10:15:30+01:00`. - * @param filterStartDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[start_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - } - - /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query - * `filter[date_field]=updated_at`. - * @return Returns the BasicDateField - */ - @JsonGetter("filter[date_field]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getFilterDateField() { - return filterDateField; - } - - /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query - * `filter[date_field]=updated_at`. - * @param filterDateField Value for BasicDateField - */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in - * query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in - * query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - /** * Converts this ListCouponsInput into string format. * @return String representation of this class */ @Override public String toString() { - return "ListCouponsInput [" + "page=" + page + ", perPage=" + perPage + ", dateField=" - + dateField + ", startDate=" + startDate + ", endDate=" + endDate - + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime - + ", filterIds=" + filterIds + ", filterCodes=" + filterCodes + ", currencyPrices=" - + currencyPrices + ", filterEndDate=" + filterEndDate + ", filterEndDatetime=" - + filterEndDatetime + ", filterStartDate=" + filterStartDate - + ", filterStartDatetime=" + filterStartDatetime + ", filterDateField=" - + filterDateField + ", filterUseSiteExchangeRate=" + filterUseSiteExchangeRate - + "]"; + return "ListCouponsInput [" + "page=" + page + ", perPage=" + perPage + ", filter=" + filter + + ", currencyPrices=" + currencyPrices + "]"; } /** @@ -555,20 +164,8 @@ public Builder toBuilder() { Builder builder = new Builder() .page(getPage()) .perPage(getPerPage()) - .dateField(getDateField()) - .startDate(getStartDate()) - .endDate(getEndDate()) - .startDatetime(getStartDatetime()) - .endDatetime(getEndDatetime()) - .filterIds(getFilterIds()) - .filterCodes(getFilterCodes()) - .currencyPrices(getCurrencyPrices()) - .filterEndDate(getFilterEndDate()) - .filterEndDatetime(getFilterEndDatetime()) - .filterStartDate(getFilterStartDate()) - .filterStartDatetime(getFilterStartDatetime()) - .filterDateField(getFilterDateField()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .filter(getFilter()) + .currencyPrices(getCurrencyPrices()); return builder; } @@ -578,20 +175,8 @@ public Builder toBuilder() { public static class Builder { private Integer page = 1; private Integer perPage = 30; - private BasicDateField dateField; - private LocalDate startDate; - private LocalDate endDate; - private ZonedDateTime startDatetime; - private ZonedDateTime endDatetime; - private List filterIds; - private List filterCodes; + private ListCouponsFilter filter; private Boolean currencyPrices; - private LocalDate filterEndDate; - private ZonedDateTime filterEndDatetime; - private LocalDate filterStartDate; - private ZonedDateTime filterStartDatetime; - private BasicDateField filterDateField; - private Boolean filterUseSiteExchangeRate; @@ -616,72 +201,12 @@ public Builder perPage(Integer perPage) { } /** - * Setter for dateField. - * @param dateField BasicDateField value for dateField. - * @return Builder - */ - public Builder dateField(BasicDateField dateField) { - this.dateField = dateField; - return this; - } - - /** - * Setter for startDate. - * @param startDate LocalDate value for startDate. - * @return Builder - */ - public Builder startDate(LocalDate startDate) { - this.startDate = startDate; - return this; - } - - /** - * Setter for endDate. - * @param endDate LocalDate value for endDate. - * @return Builder - */ - public Builder endDate(LocalDate endDate) { - this.endDate = endDate; - return this; - } - - /** - * Setter for startDatetime. - * @param startDatetime ZonedDateTime value for startDatetime. - * @return Builder - */ - public Builder startDatetime(ZonedDateTime startDatetime) { - this.startDatetime = startDatetime; - return this; - } - - /** - * Setter for endDatetime. - * @param endDatetime ZonedDateTime value for endDatetime. - * @return Builder - */ - public Builder endDatetime(ZonedDateTime endDatetime) { - this.endDatetime = endDatetime; - return this; - } - - /** - * Setter for filterIds. - * @param filterIds List of Integer value for filterIds. - * @return Builder - */ - public Builder filterIds(List filterIds) { - this.filterIds = filterIds; - return this; - } - - /** - * Setter for filterCodes. - * @param filterCodes List of String value for filterCodes. + * Setter for filter. + * @param filter ListCouponsFilter value for filter. * @return Builder */ - public Builder filterCodes(List filterCodes) { - this.filterCodes = filterCodes; + public Builder filter(ListCouponsFilter filter) { + this.filter = filter; return this; } @@ -695,75 +220,12 @@ public Builder currencyPrices(Boolean currencyPrices) { return this; } - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. - * @return Builder - */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - return this; - } - - /** - * Setter for filterEndDatetime. - * @param filterEndDatetime ZonedDateTime value for filterEndDatetime. - * @return Builder - */ - public Builder filterEndDatetime(ZonedDateTime filterEndDatetime) { - this.filterEndDatetime = filterEndDatetime; - return this; - } - - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - - /** - * Setter for filterStartDatetime. - * @param filterStartDatetime ZonedDateTime value for filterStartDatetime. - * @return Builder - */ - public Builder filterStartDatetime(ZonedDateTime filterStartDatetime) { - this.filterStartDatetime = filterStartDatetime; - return this; - } - - /** - * Setter for filterDateField. - * @param filterDateField BasicDateField value for filterDateField. - * @return Builder - */ - public Builder filterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } - - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - /** * Builds a new {@link ListCouponsInput} object using the set fields. * @return {@link ListCouponsInput} */ public ListCouponsInput build() { - return new ListCouponsInput(page, perPage, dateField, startDate, endDate, startDatetime, - endDatetime, filterIds, filterCodes, currencyPrices, filterEndDate, - filterEndDatetime, filterStartDate, filterStartDatetime, filterDateField, - filterUseSiteExchangeRate); + return new ListCouponsInput(page, perPage, filter, currencyPrices); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListEventsDateField.java b/src/main/java/com/maxio/advancedbilling/models/ListEventsDateField.java index 92f196a5..deeecdc5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListEventsDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListEventsDateField.java @@ -38,8 +38,7 @@ public enum ListEventsDateField { @JsonCreator public static ListEventsDateField constructFromString(String toConvert) throws IOException { ListEventsDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java index f92c5013..031945f5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListMetadataForResourceTypeInput.java @@ -311,7 +311,7 @@ public void setWithDeleted(Boolean withDeleted) { * `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. * @return Returns the List of Integer */ - @JsonGetter("resource_ids[]") + @JsonGetter("resource_ids") @JsonInclude(JsonInclude.Include.NON_NULL) public List getResourceIds() { return resourceIds; @@ -323,7 +323,7 @@ public List getResourceIds() { * `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. * @param resourceIds Value for List of Integer */ - @JsonSetter("resource_ids[]") + @JsonSetter("resource_ids") public void setResourceIds(List resourceIds) { this.resourceIds = resourceIds; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMrrFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListMrrFilter.java new file mode 100644 index 00000000..42820994 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListMrrFilter.java @@ -0,0 +1,105 @@ +/* + * 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 io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ListMrrFilter type. + */ +public class ListMrrFilter + extends BaseModel { + private List subscriptionIds; + + /** + * Default constructor. + */ + public ListMrrFilter() { + } + + /** + * Initialization constructor. + * @param subscriptionIds List of Integer value for subscriptionIds. + */ + public ListMrrFilter( + List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + } + + /** + * Getter for SubscriptionIds. + * Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("subscription_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getSubscriptionIds() { + return subscriptionIds; + } + + /** + * Setter for SubscriptionIds. + * Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`. + * @param subscriptionIds Value for List of Integer + */ + @JsonSetter("subscription_ids") + public void setSubscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + } + + /** + * Converts this ListMrrFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListMrrFilter [" + "subscriptionIds=" + subscriptionIds + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListMrrFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListMrrFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .subscriptionIds(getSubscriptionIds()); + return builder; + } + + /** + * Class to build instances of {@link ListMrrFilter}. + */ + public static class Builder { + private List subscriptionIds; + + + + /** + * Setter for subscriptionIds. + * @param subscriptionIds List of Integer value for subscriptionIds. + * @return Builder + */ + public Builder subscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + return this; + } + + /** + * Builds a new {@link ListMrrFilter} object using the set fields. + * @return {@link ListMrrFilter} + */ + public ListMrrFilter build() { + return new ListMrrFilter(subscriptionIds); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java index e3da3a23..80d1040f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java @@ -9,13 +9,12 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; -import java.util.List; /** * This is a model class for ListMrrPerSubscriptionInput type. */ public class ListMrrPerSubscriptionInput { - private List filterSubscriptionIds; + private ListMrrFilter filter; private String atTime; private Integer page; private Integer perPage; @@ -31,19 +30,19 @@ public ListMrrPerSubscriptionInput() { /** * Initialization constructor. - * @param filterSubscriptionIds List of Integer value for filterSubscriptionIds. + * @param filter ListMrrFilter value for filter. * @param atTime String value for atTime. * @param page Integer value for page. * @param perPage Integer value for perPage. * @param direction Direction value for direction. */ public ListMrrPerSubscriptionInput( - List filterSubscriptionIds, + ListMrrFilter filter, String atTime, Integer page, Integer perPage, Direction direction) { - this.filterSubscriptionIds = filterSubscriptionIds; + this.filter = filter; this.atTime = atTime; this.page = page; this.perPage = perPage; @@ -51,24 +50,24 @@ public ListMrrPerSubscriptionInput( } /** - * Getter for FilterSubscriptionIds. - * Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`. - * @return Returns the List of Integer + * Getter for Filter. + * Filter to use for List MRR per subscription operation + * @return Returns the ListMrrFilter */ - @JsonGetter("filter[subscription_ids]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterSubscriptionIds() { - return filterSubscriptionIds; + public ListMrrFilter getFilter() { + return filter; } /** - * Setter for FilterSubscriptionIds. - * Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`. - * @param filterSubscriptionIds Value for List of Integer + * Setter for Filter. + * Filter to use for List MRR per subscription operation + * @param filter Value for ListMrrFilter */ - @JsonSetter("filter[subscription_ids]") - public void setFilterSubscriptionIds(List filterSubscriptionIds) { - this.filterSubscriptionIds = filterSubscriptionIds; + @JsonSetter("filter") + public void setFilter(ListMrrFilter filter) { + this.filter = filter; } /** @@ -177,9 +176,8 @@ public void setDirection(Direction direction) { */ @Override public String toString() { - return "ListMrrPerSubscriptionInput [" + "filterSubscriptionIds=" + filterSubscriptionIds - + ", atTime=" + atTime + ", page=" + page + ", perPage=" + perPage + ", direction=" - + direction + "]"; + return "ListMrrPerSubscriptionInput [" + "filter=" + filter + ", atTime=" + atTime + + ", page=" + page + ", perPage=" + perPage + ", direction=" + direction + "]"; } /** @@ -189,7 +187,7 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder() - .filterSubscriptionIds(getFilterSubscriptionIds()) + .filter(getFilter()) .atTime(getAtTime()) .page(getPage()) .perPage(getPerPage()) @@ -201,7 +199,7 @@ public Builder toBuilder() { * Class to build instances of {@link ListMrrPerSubscriptionInput}. */ public static class Builder { - private List filterSubscriptionIds; + private ListMrrFilter filter; private String atTime; private Integer page = 1; private Integer perPage = 20; @@ -210,12 +208,12 @@ public static class Builder { /** - * Setter for filterSubscriptionIds. - * @param filterSubscriptionIds List of Integer value for filterSubscriptionIds. + * Setter for filter. + * @param filter ListMrrFilter value for filter. * @return Builder */ - public Builder filterSubscriptionIds(List filterSubscriptionIds) { - this.filterSubscriptionIds = filterSubscriptionIds; + public Builder filter(ListMrrFilter filter) { + this.filter = filter; return this; } @@ -264,8 +262,7 @@ public Builder direction(Direction direction) { * @return {@link ListMrrPerSubscriptionInput} */ public ListMrrPerSubscriptionInput build() { - return new ListMrrPerSubscriptionInput(filterSubscriptionIds, atTime, page, perPage, - direction); + return new ListMrrPerSubscriptionInput(filter, atTime, page, perPage, direction); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupPrepaymentDateField.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentDateField.java similarity index 68% rename from src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupPrepaymentDateField.java rename to src/main/java/com/maxio/advancedbilling/models/ListPrepaymentDateField.java index ce0a3799..18271350 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupPrepaymentDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentDateField.java @@ -14,15 +14,15 @@ /** - * ListSubscriptionGroupPrepaymentDateField to be used. + * ListPrepaymentDateField to be used. */ -public enum ListSubscriptionGroupPrepaymentDateField { +public enum ListPrepaymentDateField { CREATED_AT, APPLICATION_AT; - private static TreeMap valueMap = new TreeMap<>(); + private static TreeMap valueMap = new TreeMap<>(); private String value; static { @@ -40,10 +40,9 @@ public enum ListSubscriptionGroupPrepaymentDateField { * @throws IOException when provided value is not mapped to any enum member. */ @JsonCreator - public static ListSubscriptionGroupPrepaymentDateField constructFromString(String toConvert) throws IOException { - ListSubscriptionGroupPrepaymentDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + public static ListPrepaymentDateField constructFromString(String toConvert) throws IOException { + ListPrepaymentDateField enumValue = fromString(toConvert); + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; @@ -54,7 +53,7 @@ public static ListSubscriptionGroupPrepaymentDateField constructFromString(Strin * @param toConvert String value to get enum member. * @return The enum member against the given string value. */ - public static ListSubscriptionGroupPrepaymentDateField fromString(String toConvert) { + public static ListPrepaymentDateField fromString(String toConvert) { return valueMap.get(toConvert); } @@ -76,16 +75,16 @@ public String toString() { } /** - * Convert list of ListSubscriptionGroupPrepaymentDateField values to list of string values. - * @param toConvert The list of ListSubscriptionGroupPrepaymentDateField values to convert. + * Convert list of ListPrepaymentDateField values to list of string values. + * @param toConvert The list of ListPrepaymentDateField values to convert. * @return List of representative string values. */ - public static List toValue(List toConvert) { + public static List toValue(List toConvert) { if (toConvert == null) { return null; } List convertedValues = new ArrayList<>(); - for (ListSubscriptionGroupPrepaymentDateField enumValue : toConvert) { + for (ListPrepaymentDateField enumValue : toConvert) { convertedValues.add(enumValue.value); } return convertedValues; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsFilter.java new file mode 100644 index 00000000..596806cf --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsFilter.java @@ -0,0 +1,199 @@ +/* + * 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.LocalDate; + +/** + * This is a model class for ListPrepaymentsFilter type. + */ +public class ListPrepaymentsFilter + extends BaseModel { + private ListPrepaymentDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + + /** + * Default constructor. + */ + public ListPrepaymentsFilter() { + } + + /** + * Initialization constructor. + * @param dateField ListPrepaymentDateField value for dateField. + * @param startDate LocalDate value for startDate. + * @param endDate LocalDate value for endDate. + */ + public ListPrepaymentsFilter( + ListPrepaymentDateField dateField, + LocalDate startDate, + LocalDate endDate) { + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. `created_at` - Time when + * prepayment was created. `application_at` - Time when prepayment was applied to invoice. Use + * in query `filter[date_field]=created_at`. + * @return Returns the ListPrepaymentDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListPrepaymentDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you would like to apply to your search. `created_at` - Time when + * prepayment was created. `application_at` - Time when prepayment was applied to invoice. Use + * in query `filter[date_field]=created_at`. + * @param dateField Value for ListPrepaymentDateField + */ + @JsonSetter("date_field") + public void setDateField(ListPrepaymentDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments + * with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date + * specified. Use in query: `filter[start_date]=2011-12-15`. + * @return Returns the LocalDate + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments + * with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date + * specified. Use in query: `filter[start_date]=2011-12-15`. + * @param startDate Value for LocalDate + */ + @JsonSetter("start_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments + * with a timestamp up to and including 11:59:59PM in your site's time zone on the date + * specified. Use in query: `filter[end_date]=2011-12-15`. + * @return Returns the LocalDate + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments + * with a timestamp up to and including 11:59:59PM in your site's time zone on the date + * specified. Use in query: `filter[end_date]=2011-12-15`. + * @param endDate Value for LocalDate + */ + @JsonSetter("end_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + /** + * Converts this ListPrepaymentsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListPrepaymentsFilter [" + "dateField=" + dateField + ", startDate=" + startDate + + ", endDate=" + endDate + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link ListPrepaymentsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListPrepaymentsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()); + return builder; + } + + /** + * Class to build instances of {@link ListPrepaymentsFilter}. + */ + public static class Builder { + private ListPrepaymentDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + + + + /** + * Setter for dateField. + * @param dateField ListPrepaymentDateField value for dateField. + * @return Builder + */ + public Builder dateField(ListPrepaymentDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDate. + * @param startDate LocalDate value for startDate. + * @return Builder + */ + public Builder startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate LocalDate value for endDate. + * @return Builder + */ + public Builder endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Builds a new {@link ListPrepaymentsFilter} object using the set fields. + * @return {@link ListPrepaymentsFilter} + */ + public ListPrepaymentsFilter build() { + return new ListPrepaymentsFilter(dateField, startDate, endDate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java index 2e45d894..649b1502 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java @@ -9,21 +9,15 @@ 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 java.time.LocalDate; /** * This is a model class for ListPrepaymentsForSubscriptionGroupInput type. */ public class ListPrepaymentsForSubscriptionGroupInput { private String uid; - private ListSubscriptionGroupPrepaymentDateField filterDateField; - private LocalDate filterEndDate; - private LocalDate filterStartDate; private Integer page; private Integer perPage; + private ListPrepaymentsFilter filter; /** * Default constructor. @@ -36,25 +30,19 @@ public ListPrepaymentsForSubscriptionGroupInput() { /** * Initialization constructor. * @param uid String value for uid. - * @param filterDateField ListSubscriptionGroupPrepaymentDateField value for filterDateField. - * @param filterEndDate LocalDate value for filterEndDate. - * @param filterStartDate LocalDate value for filterStartDate. * @param page Integer value for page. * @param perPage Integer value for perPage. + * @param filter ListPrepaymentsFilter value for filter. */ public ListPrepaymentsForSubscriptionGroupInput( String uid, - ListSubscriptionGroupPrepaymentDateField filterDateField, - LocalDate filterEndDate, - LocalDate filterStartDate, Integer page, - Integer perPage) { + Integer perPage, + ListPrepaymentsFilter filter) { this.uid = uid; - this.filterDateField = filterDateField; - this.filterEndDate = filterEndDate; - this.filterStartDate = filterStartDate; this.page = page; this.perPage = perPage; + this.filter = filter; } /** @@ -77,83 +65,6 @@ public void setUid(String uid) { this.uid = uid; } - /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @return Returns the ListSubscriptionGroupPrepaymentDateField - */ - @JsonGetter("filter[date_field]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public ListSubscriptionGroupPrepaymentDateField getFilterDateField() { - return filterDateField; - } - - /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. Use in query: - * `filter[date_field]=created_at`. - * @param filterDateField Value for ListSubscriptionGroupPrepaymentDateField - */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(ListSubscriptionGroupPrepaymentDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp up to and including 11:59:59PM in your site's time zone on the date - * specified. Use in query: `filter[end_date]=2011-12-15`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp up to and including 11:59:59PM in your site's time zone on the date - * specified. Use in query: `filter[end_date]=2011-12-15`. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - } - - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date - * specified. Use in query: `filter[start_date]=2011-12-15`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date - * specified. Use in query: `filter[start_date]=2011-12-15`. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - /** * Getter for Page. * Result records are organized in pages. By default, the first page of results is displayed. @@ -208,15 +119,35 @@ public void setPerPage(Integer perPage) { this.perPage = perPage; } + /** + * Getter for Filter. + * Filter to use for List Prepayments operations + * @return Returns the ListPrepaymentsFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListPrepaymentsFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Prepayments operations + * @param filter Value for ListPrepaymentsFilter + */ + @JsonSetter("filter") + public void setFilter(ListPrepaymentsFilter filter) { + this.filter = filter; + } + /** * Converts this ListPrepaymentsForSubscriptionGroupInput into string format. * @return String representation of this class */ @Override public String toString() { - return "ListPrepaymentsForSubscriptionGroupInput [" + "uid=" + uid + ", filterDateField=" - + filterDateField + ", filterEndDate=" + filterEndDate + ", filterStartDate=" - + filterStartDate + ", page=" + page + ", perPage=" + perPage + "]"; + return "ListPrepaymentsForSubscriptionGroupInput [" + "uid=" + uid + ", page=" + page + + ", perPage=" + perPage + ", filter=" + filter + "]"; } /** @@ -226,11 +157,9 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder(uid) - .filterDateField(getFilterDateField()) - .filterEndDate(getFilterEndDate()) - .filterStartDate(getFilterStartDate()) .page(getPage()) - .perPage(getPerPage()); + .perPage(getPerPage()) + .filter(getFilter()); return builder; } @@ -239,11 +168,9 @@ public Builder toBuilder() { */ public static class Builder { private String uid; - private ListSubscriptionGroupPrepaymentDateField filterDateField; - private LocalDate filterEndDate; - private LocalDate filterStartDate; private Integer page = 1; private Integer perPage = 20; + private ListPrepaymentsFilter filter; /** * Initialization constructor. @@ -269,37 +196,6 @@ public Builder uid(String uid) { return this; } - /** - * Setter for filterDateField. - * @param filterDateField ListSubscriptionGroupPrepaymentDateField value for - * filterDateField. - * @return Builder - */ - public Builder filterDateField(ListSubscriptionGroupPrepaymentDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } - - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. - * @return Builder - */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; - return this; - } - - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - /** * Setter for page. * @param page Integer value for page. @@ -320,14 +216,23 @@ public Builder perPage(Integer perPage) { return this; } + /** + * Setter for filter. + * @param filter ListPrepaymentsFilter value for filter. + * @return Builder + */ + public Builder filter(ListPrepaymentsFilter filter) { + this.filter = filter; + return this; + } + /** * Builds a new {@link ListPrepaymentsForSubscriptionGroupInput} object using the set * fields. * @return {@link ListPrepaymentsForSubscriptionGroupInput} */ public ListPrepaymentsForSubscriptionGroupInput build() { - return new ListPrepaymentsForSubscriptionGroupInput(uid, filterDateField, filterEndDate, - filterStartDate, page, perPage); + return new ListPrepaymentsForSubscriptionGroupInput(uid, page, perPage, filter); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java index 130513bf..e2eef81a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java @@ -9,10 +9,6 @@ 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 java.time.LocalDate; /** * This is a model class for ListPrepaymentsInput type. @@ -21,9 +17,7 @@ public class ListPrepaymentsInput { private int subscriptionId; private Integer page; private Integer perPage; - private BasicDateField filterDateField; - private LocalDate filterStartDate; - private LocalDate filterEndDate; + private ListPrepaymentsFilter filter; /** * Default constructor. @@ -38,23 +32,17 @@ public ListPrepaymentsInput() { * @param subscriptionId int value for subscriptionId. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param filterDateField BasicDateField value for filterDateField. - * @param filterStartDate LocalDate value for filterStartDate. - * @param filterEndDate LocalDate value for filterEndDate. + * @param filter ListPrepaymentsFilter value for filter. */ public ListPrepaymentsInput( int subscriptionId, Integer page, Integer perPage, - BasicDateField filterDateField, - LocalDate filterStartDate, - LocalDate filterEndDate) { + ListPrepaymentsFilter filter) { this.subscriptionId = subscriptionId; this.page = page; this.perPage = perPage; - this.filterDateField = filterDateField; - this.filterStartDate = filterStartDate; - this.filterEndDate = filterEndDate; + this.filter = filter; } /** @@ -132,82 +120,24 @@ public void setPerPage(Integer perPage) { } /** - * Getter for FilterDateField. - * The type of filter you would like to apply to your search. created_at - Time when prepayment - * was created. application_at - Time when prepayment was applied to invoice. Use in query - * `filter[date_field]=created_at`. - * @return Returns the BasicDateField + * Getter for Filter. + * Filter to use for List Prepayments operations + * @return Returns the ListPrepaymentsFilter */ - @JsonGetter("filter[date_field]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public BasicDateField getFilterDateField() { - return filterDateField; + public ListPrepaymentsFilter getFilter() { + return filter; } /** - * Setter for FilterDateField. - * The type of filter you would like to apply to your search. created_at - Time when prepayment - * was created. application_at - Time when prepayment was applied to invoice. Use in query - * `filter[date_field]=created_at`. - * @param filterDateField Value for BasicDateField + * Setter for Filter. + * Filter to use for List Prepayments operations + * @param filter Value for ListPrepaymentsFilter */ - @JsonSetter("filter[date_field]") - public void setFilterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - } - - /** - * Getter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-15`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterStartDate() { - return filterStartDate; - } - - /** - * Setter for FilterStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date - * specified. Use in query `filter[start_date]=2011-12-15`. - * @param filterStartDate Value for LocalDate - */ - @JsonSetter("filter[start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - } - - /** - * Getter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. Use in query `filter[end_date]=2011-12-15`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterEndDate() { - return filterEndDate; - } - - /** - * Setter for FilterEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments - * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date - * specified. Use in query `filter[end_date]=2011-12-15`. - * @param filterEndDate Value for LocalDate - */ - @JsonSetter("filter[end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; + @JsonSetter("filter") + public void setFilter(ListPrepaymentsFilter filter) { + this.filter = filter; } /** @@ -217,8 +147,7 @@ public void setFilterEndDate(LocalDate filterEndDate) { @Override public String toString() { return "ListPrepaymentsInput [" + "subscriptionId=" + subscriptionId + ", page=" + page - + ", perPage=" + perPage + ", filterDateField=" + filterDateField - + ", filterStartDate=" + filterStartDate + ", filterEndDate=" + filterEndDate + "]"; + + ", perPage=" + perPage + ", filter=" + filter + "]"; } /** @@ -230,9 +159,7 @@ public Builder toBuilder() { Builder builder = new Builder(subscriptionId) .page(getPage()) .perPage(getPerPage()) - .filterDateField(getFilterDateField()) - .filterStartDate(getFilterStartDate()) - .filterEndDate(getFilterEndDate()); + .filter(getFilter()); return builder; } @@ -243,9 +170,7 @@ public static class Builder { private int subscriptionId; private Integer page = 1; private Integer perPage = 20; - private BasicDateField filterDateField; - private LocalDate filterStartDate; - private LocalDate filterEndDate; + private ListPrepaymentsFilter filter; /** * Initialization constructor. @@ -292,32 +217,12 @@ public Builder perPage(Integer perPage) { } /** - * Setter for filterDateField. - * @param filterDateField BasicDateField value for filterDateField. - * @return Builder - */ - public Builder filterDateField(BasicDateField filterDateField) { - this.filterDateField = filterDateField; - return this; - } - - /** - * Setter for filterStartDate. - * @param filterStartDate LocalDate value for filterStartDate. - * @return Builder - */ - public Builder filterStartDate(LocalDate filterStartDate) { - this.filterStartDate = filterStartDate; - return this; - } - - /** - * Setter for filterEndDate. - * @param filterEndDate LocalDate value for filterEndDate. + * Setter for filter. + * @param filter ListPrepaymentsFilter value for filter. * @return Builder */ - public Builder filterEndDate(LocalDate filterEndDate) { - this.filterEndDate = filterEndDate; + public Builder filter(ListPrepaymentsFilter filter) { + this.filter = filter; return this; } @@ -326,8 +231,7 @@ public Builder filterEndDate(LocalDate filterEndDate) { * @return {@link ListPrepaymentsInput} */ public ListPrepaymentsInput build() { - return new ListPrepaymentsInput(subscriptionId, page, perPage, filterDateField, - filterStartDate, filterEndDate); + return new ListPrepaymentsInput(subscriptionId, page, perPage, filter); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPricePointsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListPricePointsFilter.java new file mode 100644 index 00000000..8e24b500 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListPricePointsFilter.java @@ -0,0 +1,406 @@ +/* + * 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.LocalDate; +import java.time.ZonedDateTime; +import java.util.List; + +/** + * This is a model class for ListPricePointsFilter type. + */ +public class ListPricePointsFilter + extends BaseModel { + private BasicDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + private List type; + private List ids; + private IncludeNotNull archivedAt; + + /** + * Default constructor. + */ + public ListPricePointsFilter() { + } + + /** + * Initialization constructor. + * @param dateField BasicDateField value for dateField. + * @param startDate LocalDate value for startDate. + * @param endDate LocalDate value for endDate. + * @param startDatetime ZonedDateTime value for startDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + * @param type List of PricePointType value for type. + * @param ids List of Integer value for ids. + * @param archivedAt IncludeNotNull value for archivedAt. + */ + public ListPricePointsFilter( + BasicDateField dateField, + LocalDate startDate, + LocalDate endDate, + ZonedDateTime startDatetime, + ZonedDateTime endDatetime, + List type, + List ids, + IncludeNotNull archivedAt) { + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.type = type; + this.ids = ids; + this.archivedAt = archivedAt; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `filter[date_field]=created_at`. + * @return Returns the BasicDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public BasicDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `filter[date_field]=created_at`. + * @param dateField Value for BasicDateField + */ + @JsonSetter("date_field") + public void setDateField(BasicDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points + * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the LocalDate + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns price points + * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @param startDate Value for LocalDate + */ + @JsonSetter("start_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points + * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date + * specified. + * @return Returns the LocalDate + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns price points + * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date + * specified. + * @param endDate Value for LocalDate + */ + @JsonSetter("end_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + /** + * Getter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns price points 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. + * @return Returns the ZonedDateTime + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getStartDatetime() { + return startDatetime; + } + + /** + * Setter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns price points 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. + * @param startDatetime Value for ZonedDateTime + */ + @JsonSetter("start_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setStartDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns price points with a timestamp at or before 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 end_date. + * @return Returns the ZonedDateTime + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getEndDatetime() { + return endDatetime; + } + + /** + * Setter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns price points with a timestamp at or before 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 end_date. + * @param endDatetime Value for ZonedDateTime + */ + @JsonSetter("end_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setEndDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for Type. + * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. + * @return Returns the List of PricePointType + */ + @JsonGetter("type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getType() { + return type; + } + + /** + * Setter for Type. + * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. + * @param type Value for List of PricePointType + */ + @JsonSetter("type") + public void setType(List type) { + this.type = type; + } + + /** + * Getter for Ids. + * Allows fetching price points with matching id based on provided values. Use in query: + * `filter[ids]=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getIds() { + return ids; + } + + /** + * Setter for Ids. + * Allows fetching price points with matching id based on provided values. Use in query: + * `filter[ids]=1,2,3`. + * @param ids Value for List of Integer + */ + @JsonSetter("ids") + public void setIds(List ids) { + this.ids = ids; + } + + /** + * Getter for ArchivedAt. + * Allows fetching price points only if archived_at is present or not. Use in query: + * `filter[archived_at]=not_null`. + * @return Returns the IncludeNotNull + */ + @JsonGetter("archived_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + public IncludeNotNull getArchivedAt() { + return archivedAt; + } + + /** + * Setter for ArchivedAt. + * Allows fetching price points only if archived_at is present or not. Use in query: + * `filter[archived_at]=not_null`. + * @param archivedAt Value for IncludeNotNull + */ + @JsonSetter("archived_at") + public void setArchivedAt(IncludeNotNull archivedAt) { + this.archivedAt = archivedAt; + } + + /** + * Converts this ListPricePointsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListPricePointsFilter [" + "dateField=" + dateField + ", startDate=" + startDate + + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + + endDatetime + ", type=" + type + ", ids=" + ids + ", archivedAt=" + archivedAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListPricePointsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListPricePointsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .type(getType()) + .ids(getIds()) + .archivedAt(getArchivedAt()); + return builder; + } + + /** + * Class to build instances of {@link ListPricePointsFilter}. + */ + public static class Builder { + private BasicDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + private List type; + private List ids; + private IncludeNotNull archivedAt; + + + + /** + * Setter for dateField. + * @param dateField BasicDateField value for dateField. + * @return Builder + */ + public Builder dateField(BasicDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDate. + * @param startDate LocalDate value for startDate. + * @return Builder + */ + public Builder startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate LocalDate value for endDate. + * @return Builder + */ + public Builder endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime ZonedDateTime value for startDatetime. + * @return Builder + */ + public Builder startDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + * @return Builder + */ + public Builder endDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for type. + * @param type List of PricePointType value for type. + * @return Builder + */ + public Builder type(List type) { + this.type = type; + return this; + } + + /** + * Setter for ids. + * @param ids List of Integer value for ids. + * @return Builder + */ + public Builder ids(List ids) { + this.ids = ids; + return this; + } + + /** + * Setter for archivedAt. + * @param archivedAt IncludeNotNull value for archivedAt. + * @return Builder + */ + public Builder archivedAt(IncludeNotNull archivedAt) { + this.archivedAt = archivedAt; + return this; + } + + /** + * Builds a new {@link ListPricePointsFilter} object using the set fields. + * @return {@link ListPricePointsFilter} + */ + public ListPricePointsFilter build() { + return new ListPricePointsFilter(dateField, startDate, endDate, startDatetime, + endDatetime, type, ids, archivedAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsFilter.java new file mode 100644 index 00000000..e2fa4379 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsFilter.java @@ -0,0 +1,153 @@ +/* + * 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 io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ListProductsFilter type. + */ +public class ListProductsFilter + extends BaseModel { + private PrepaidProductPricePointFilter prepaidProductPricePoint; + private Boolean useSiteExchangeRate; + + /** + * Default constructor. + */ + public ListProductsFilter() { + } + + /** + * Initialization constructor. + * @param prepaidProductPricePoint PrepaidProductPricePointFilter value for + * prepaidProductPricePoint. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + */ + public ListProductsFilter( + PrepaidProductPricePointFilter prepaidProductPricePoint, + Boolean useSiteExchangeRate) { + this.prepaidProductPricePoint = prepaidProductPricePoint; + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for PrepaidProductPricePoint. + * Allows fetching products only if a prepaid product price point is present or not. To use this + * filter you also have to include the following param in the request + * `include=prepaid_product_price_point`. Use in query + * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. + * @return Returns the PrepaidProductPricePointFilter + */ + @JsonGetter("prepaid_product_price_point") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PrepaidProductPricePointFilter getPrepaidProductPricePoint() { + return prepaidProductPricePoint; + } + + /** + * Setter for PrepaidProductPricePoint. + * Allows fetching products only if a prepaid product price point is present or not. To use this + * filter you also have to include the following param in the request + * `include=prepaid_product_price_point`. Use in query + * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. + * @param prepaidProductPricePoint Value for PrepaidProductPricePointFilter + */ + @JsonSetter("prepaid_product_price_point") + public void setPrepaidProductPricePoint(PrepaidProductPricePointFilter prepaidProductPricePoint) { + this.prepaidProductPricePoint = prepaidProductPricePoint; + } + + /** + * Getter for UseSiteExchangeRate. + * Allows fetching products with matching use_site_exchange_rate based on provided value (refers + * to default price point). Use in query `filter[use_site_exchange_rate]=true`. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Allows fetching products with matching use_site_exchange_rate based on provided value (refers + * to default price point). Use in query `filter[use_site_exchange_rate]=true`. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Converts this ListProductsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListProductsFilter [" + "prepaidProductPricePoint=" + prepaidProductPricePoint + + ", useSiteExchangeRate=" + useSiteExchangeRate + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListProductsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProductsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .prepaidProductPricePoint(getPrepaidProductPricePoint()) + .useSiteExchangeRate(getUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListProductsFilter}. + */ + public static class Builder { + private PrepaidProductPricePointFilter prepaidProductPricePoint; + private Boolean useSiteExchangeRate; + + + + /** + * Setter for prepaidProductPricePoint. + * @param prepaidProductPricePoint PrepaidProductPricePointFilter value for + * prepaidProductPricePoint. + * @return Builder + */ + public Builder prepaidProductPricePoint( + PrepaidProductPricePointFilter prepaidProductPricePoint) { + this.prepaidProductPricePoint = prepaidProductPricePoint; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Builds a new {@link ListProductsFilter} object using the set fields. + * @return {@link ListProductsFilter} + */ + public ListProductsFilter build() { + return new ListProductsFilter(prepaidProductPricePoint, useSiteExchangeRate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java index d9364d85..561c17d0 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java @@ -18,14 +18,13 @@ public class ListProductsForProductFamilyInput { private Integer page; private Integer perPage; private BasicDateField dateField; + private ListProductsFilter filter; private String startDate; private String endDate; private String startDatetime; private String endDatetime; private Boolean includeArchived; private ListProductsInclude include; - private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; - private Boolean filterUseSiteExchangeRate; /** * Default constructor. @@ -41,42 +40,37 @@ public ListProductsForProductFamilyInput() { * @param page Integer value for page. * @param perPage Integer value for perPage. * @param dateField BasicDateField value for dateField. + * @param filter ListProductsFilter value for filter. * @param startDate String value for startDate. * @param endDate String value for endDate. * @param startDatetime String value for startDatetime. * @param endDatetime String value for endDatetime. * @param includeArchived Boolean value for includeArchived. * @param include ListProductsInclude value for include. - * @param filterPrepaidProductPricePointProductPricePointId IncludeNotNull value for - * filterPrepaidProductPricePointProductPricePointId. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. */ public ListProductsForProductFamilyInput( int productFamilyId, Integer page, Integer perPage, BasicDateField dateField, + ListProductsFilter filter, String startDate, String endDate, String startDatetime, String endDatetime, Boolean includeArchived, - ListProductsInclude include, - IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - Boolean filterUseSiteExchangeRate) { + ListProductsInclude include) { this.productFamilyId = productFamilyId; this.page = page; this.perPage = perPage; this.dateField = dateField; + this.filter = filter; this.startDate = startDate; this.endDate = endDate; this.startDatetime = startDatetime; this.endDatetime = endDatetime; this.includeArchived = includeArchived; this.include = include; - this.filterPrepaidProductPricePointProductPricePointId = - filterPrepaidProductPricePointProductPricePointId; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; } /** @@ -176,6 +170,27 @@ public void setDateField(BasicDateField dateField) { this.dateField = dateField; } + /** + * Getter for Filter. + * Filter to use for List Products operations + * @return Returns the ListProductsFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListProductsFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Products operations + * @param filter Value for ListProductsFilter + */ + @JsonSetter("filter") + public void setFilter(ListProductsFilter filter) { + this.filter = filter; + } + /** * Getter for StartDate. * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with @@ -322,56 +337,6 @@ public void setInclude(ListProductsInclude include) { this.include = include; } - /** - * Getter for FilterPrepaidProductPricePointProductPricePointId. - * Allows fetching products only if a prepaid product price point is present or not. To use this - * filter you also have to include the following param in the request - * `include=prepaid_product_price_point`. Use in query - * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. - * @return Returns the IncludeNotNull - */ - @JsonGetter("filter[prepaid_product_price_point][product_price_point_id]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public IncludeNotNull getFilterPrepaidProductPricePointProductPricePointId() { - return filterPrepaidProductPricePointProductPricePointId; - } - - /** - * Setter for FilterPrepaidProductPricePointProductPricePointId. - * Allows fetching products only if a prepaid product price point is present or not. To use this - * filter you also have to include the following param in the request - * `include=prepaid_product_price_point`. Use in query - * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. - * @param filterPrepaidProductPricePointProductPricePointId Value for IncludeNotNull - */ - @JsonSetter("filter[prepaid_product_price_point][product_price_point_id]") - public void setFilterPrepaidProductPricePointProductPricePointId(IncludeNotNull filterPrepaidProductPricePointProductPricePointId) { - this.filterPrepaidProductPricePointProductPricePointId = filterPrepaidProductPricePointProductPricePointId; - } - - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching products with matching use_site_exchange_rate based on provided value (refers - * to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching products with matching use_site_exchange_rate based on provided value (refers - * to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - /** * Converts this ListProductsForProductFamilyInput into string format. * @return String representation of this class @@ -380,12 +345,9 @@ public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { public String toString() { return "ListProductsForProductFamilyInput [" + "productFamilyId=" + productFamilyId + ", page=" + page + ", perPage=" + perPage + ", dateField=" + dateField - + ", startDate=" + startDate + ", endDate=" + endDate + ", startDatetime=" - + startDatetime + ", endDatetime=" + endDatetime + ", includeArchived=" - + includeArchived + ", include=" + include - + ", filterPrepaidProductPricePointProductPricePointId=" - + filterPrepaidProductPricePointProductPricePointId + ", filterUseSiteExchangeRate=" - + filterUseSiteExchangeRate + "]"; + + ", filter=" + filter + ", startDate=" + startDate + ", endDate=" + endDate + + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + + ", includeArchived=" + includeArchived + ", include=" + include + "]"; } /** @@ -398,14 +360,13 @@ public Builder toBuilder() { .page(getPage()) .perPage(getPerPage()) .dateField(getDateField()) + .filter(getFilter()) .startDate(getStartDate()) .endDate(getEndDate()) .startDatetime(getStartDatetime()) .endDatetime(getEndDatetime()) .includeArchived(getIncludeArchived()) - .include(getInclude()) - .filterPrepaidProductPricePointProductPricePointId(getFilterPrepaidProductPricePointProductPricePointId()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .include(getInclude()); return builder; } @@ -417,14 +378,13 @@ public static class Builder { private Integer page = 1; private Integer perPage = 20; private BasicDateField dateField; + private ListProductsFilter filter; private String startDate; private String endDate; private String startDatetime; private String endDatetime; private Boolean includeArchived; private ListProductsInclude include; - private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; - private Boolean filterUseSiteExchangeRate; /** * Initialization constructor. @@ -480,6 +440,16 @@ public Builder dateField(BasicDateField dateField) { return this; } + /** + * Setter for filter. + * @param filter ListProductsFilter value for filter. + * @return Builder + */ + public Builder filter(ListProductsFilter filter) { + this.filter = filter; + return this; + } + /** * Setter for startDate. * @param startDate String value for startDate. @@ -540,37 +510,14 @@ public Builder include(ListProductsInclude include) { return this; } - /** - * Setter for filterPrepaidProductPricePointProductPricePointId. - * @param filterPrepaidProductPricePointProductPricePointId IncludeNotNull value for - * filterPrepaidProductPricePointProductPricePointId. - * @return Builder - */ - public Builder filterPrepaidProductPricePointProductPricePointId( - IncludeNotNull filterPrepaidProductPricePointProductPricePointId) { - this.filterPrepaidProductPricePointProductPricePointId = - filterPrepaidProductPricePointProductPricePointId; - return this; - } - - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - /** * Builds a new {@link ListProductsForProductFamilyInput} object using the set fields. * @return {@link ListProductsForProductFamilyInput} */ public ListProductsForProductFamilyInput build() { return new ListProductsForProductFamilyInput(productFamilyId, page, perPage, dateField, - startDate, endDate, startDatetime, endDatetime, includeArchived, include, - filterPrepaidProductPricePointProductPricePointId, filterUseSiteExchangeRate); + filter, startDate, endDate, startDatetime, endDatetime, includeArchived, + include); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsInclude.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsInclude.java index 9cdf5a0c..32ef1395 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListProductsInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsInclude.java @@ -38,8 +38,7 @@ public enum ListProductsInclude { @JsonCreator public static ListProductsInclude constructFromString(String toConvert) throws IOException { ListProductsInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java index e660f71c..ba1c2847 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java @@ -20,6 +20,7 @@ */ public class ListProductsInput { private BasicDateField dateField; + private ListProductsFilter filter; private LocalDate endDate; private ZonedDateTime endDatetime; private LocalDate startDate; @@ -28,8 +29,6 @@ public class ListProductsInput { private Integer perPage; private Boolean includeArchived; private ListProductsInclude include; - private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; - private Boolean filterUseSiteExchangeRate; /** * Default constructor. @@ -42,6 +41,7 @@ public ListProductsInput() { /** * Initialization constructor. * @param dateField BasicDateField value for dateField. + * @param filter ListProductsFilter value for filter. * @param endDate LocalDate value for endDate. * @param endDatetime ZonedDateTime value for endDatetime. * @param startDate LocalDate value for startDate. @@ -50,12 +50,10 @@ public ListProductsInput() { * @param perPage Integer value for perPage. * @param includeArchived Boolean value for includeArchived. * @param include ListProductsInclude value for include. - * @param filterPrepaidProductPricePointProductPricePointId IncludeNotNull value for - * filterPrepaidProductPricePointProductPricePointId. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. */ public ListProductsInput( BasicDateField dateField, + ListProductsFilter filter, LocalDate endDate, ZonedDateTime endDatetime, LocalDate startDate, @@ -63,10 +61,9 @@ public ListProductsInput( Integer page, Integer perPage, Boolean includeArchived, - ListProductsInclude include, - IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - Boolean filterUseSiteExchangeRate) { + ListProductsInclude include) { this.dateField = dateField; + this.filter = filter; this.endDate = endDate; this.endDatetime = endDatetime; this.startDate = startDate; @@ -75,9 +72,6 @@ public ListProductsInput( this.perPage = perPage; this.includeArchived = includeArchived; this.include = include; - this.filterPrepaidProductPricePointProductPricePointId = - filterPrepaidProductPricePointProductPricePointId; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; } /** @@ -103,6 +97,27 @@ public void setDateField(BasicDateField dateField) { this.dateField = dateField; } + /** + * Getter for Filter. + * Filter to use for List Products operations + * @return Returns the ListProductsFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListProductsFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Products operations + * @param filter Value for ListProductsFilter + */ + @JsonSetter("filter") + public void setFilter(ListProductsFilter filter) { + this.filter = filter; + } + /** * Getter for EndDate. * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a @@ -311,69 +326,16 @@ public void setInclude(ListProductsInclude include) { this.include = include; } - /** - * Getter for FilterPrepaidProductPricePointProductPricePointId. - * Allows fetching products only if a prepaid product price point is present or not. To use this - * filter you also have to include the following param in the request - * `include=prepaid_product_price_point`. Use in query - * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. - * @return Returns the IncludeNotNull - */ - @JsonGetter("filter[prepaid_product_price_point][product_price_point_id]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public IncludeNotNull getFilterPrepaidProductPricePointProductPricePointId() { - return filterPrepaidProductPricePointProductPricePointId; - } - - /** - * Setter for FilterPrepaidProductPricePointProductPricePointId. - * Allows fetching products only if a prepaid product price point is present or not. To use this - * filter you also have to include the following param in the request - * `include=prepaid_product_price_point`. Use in query - * `filter[prepaid_product_price_point][product_price_point_id]=not_null`. - * @param filterPrepaidProductPricePointProductPricePointId Value for IncludeNotNull - */ - @JsonSetter("filter[prepaid_product_price_point][product_price_point_id]") - public void setFilterPrepaidProductPricePointProductPricePointId(IncludeNotNull filterPrepaidProductPricePointProductPricePointId) { - this.filterPrepaidProductPricePointProductPricePointId = filterPrepaidProductPricePointProductPricePointId; - } - - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching products with matching use_site_exchange_rate based on provided value (refers - * to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching products with matching use_site_exchange_rate based on provided value (refers - * to default price point). Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - /** * Converts this ListProductsInput into string format. * @return String representation of this class */ @Override public String toString() { - return "ListProductsInput [" + "dateField=" + dateField + ", endDate=" + endDate - + ", endDatetime=" + endDatetime + ", startDate=" + startDate + ", startDatetime=" - + startDatetime + ", page=" + page + ", perPage=" + perPage + ", includeArchived=" - + includeArchived + ", include=" + include - + ", filterPrepaidProductPricePointProductPricePointId=" - + filterPrepaidProductPricePointProductPricePointId + ", filterUseSiteExchangeRate=" - + filterUseSiteExchangeRate + "]"; + return "ListProductsInput [" + "dateField=" + dateField + ", filter=" + filter + + ", endDate=" + endDate + ", endDatetime=" + endDatetime + ", startDate=" + + startDate + ", startDatetime=" + startDatetime + ", page=" + page + ", perPage=" + + perPage + ", includeArchived=" + includeArchived + ", include=" + include + "]"; } /** @@ -384,6 +346,7 @@ public String toString() { public Builder toBuilder() { Builder builder = new Builder() .dateField(getDateField()) + .filter(getFilter()) .endDate(getEndDate()) .endDatetime(getEndDatetime()) .startDate(getStartDate()) @@ -391,9 +354,7 @@ public Builder toBuilder() { .page(getPage()) .perPage(getPerPage()) .includeArchived(getIncludeArchived()) - .include(getInclude()) - .filterPrepaidProductPricePointProductPricePointId(getFilterPrepaidProductPricePointProductPricePointId()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + .include(getInclude()); return builder; } @@ -402,6 +363,7 @@ public Builder toBuilder() { */ public static class Builder { private BasicDateField dateField; + private ListProductsFilter filter; private LocalDate endDate; private ZonedDateTime endDatetime; private LocalDate startDate; @@ -410,8 +372,6 @@ public static class Builder { private Integer perPage = 20; private Boolean includeArchived; private ListProductsInclude include; - private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; - private Boolean filterUseSiteExchangeRate; @@ -425,6 +385,16 @@ public Builder dateField(BasicDateField dateField) { return this; } + /** + * Setter for filter. + * @param filter ListProductsFilter value for filter. + * @return Builder + */ + public Builder filter(ListProductsFilter filter) { + this.filter = filter; + return this; + } + /** * Setter for endDate. * @param endDate LocalDate value for endDate. @@ -505,37 +475,13 @@ public Builder include(ListProductsInclude include) { return this; } - /** - * Setter for filterPrepaidProductPricePointProductPricePointId. - * @param filterPrepaidProductPricePointProductPricePointId IncludeNotNull value for - * filterPrepaidProductPricePointProductPricePointId. - * @return Builder - */ - public Builder filterPrepaidProductPricePointProductPricePointId( - IncludeNotNull filterPrepaidProductPricePointProductPricePointId) { - this.filterPrepaidProductPricePointProductPricePointId = - filterPrepaidProductPricePointProductPricePointId; - return this; - } - - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - /** * Builds a new {@link ListProductsInput} object using the set fields. * @return {@link ListProductsInput} */ public ListProductsInput build() { - return new ListProductsInput(dateField, endDate, endDatetime, startDate, startDatetime, - page, perPage, includeArchived, include, - filterPrepaidProductPricePointProductPricePointId, filterUseSiteExchangeRate); + return new ListProductsInput(dateField, filter, endDate, endDatetime, startDate, + startDatetime, page, perPage, includeArchived, include); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsPricePointsInclude.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsPricePointsInclude.java index e06936db..87f5e69d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListProductsPricePointsInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsPricePointsInclude.java @@ -38,8 +38,7 @@ public enum ListProductsPricePointsInclude { @JsonCreator public static ListProductsPricePointsInclude constructFromString(String toConvert) throws IOException { ListProductsPricePointsInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSegmentsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsFilter.java new file mode 100644 index 00000000..fd292547 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsFilter.java @@ -0,0 +1,234 @@ +/* + * 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 io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ListSegmentsFilter type. + */ +public class ListSegmentsFilter + extends BaseModel { + private String segmentProperty1Value; + private String segmentProperty2Value; + private String segmentProperty3Value; + private String segmentProperty4Value; + + /** + * Default constructor. + */ + public ListSegmentsFilter() { + } + + /** + * Initialization constructor. + * @param segmentProperty1Value String value for segmentProperty1Value. + * @param segmentProperty2Value String value for segmentProperty2Value. + * @param segmentProperty3Value String value for segmentProperty3Value. + * @param segmentProperty4Value String value for segmentProperty4Value. + */ + public ListSegmentsFilter( + String segmentProperty1Value, + String segmentProperty2Value, + String segmentProperty3Value, + String segmentProperty4Value) { + this.segmentProperty1Value = segmentProperty1Value; + this.segmentProperty2Value = segmentProperty2Value; + this.segmentProperty3Value = segmentProperty3Value; + this.segmentProperty4Value = segmentProperty4Value; + } + + /** + * Getter for SegmentProperty1Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_1` on attached Metric. If empty string is passed, this filter would be + * rejected. Use in query `filter[segment_property_1_value]=EU`. + * @return Returns the String + */ + @JsonGetter("segment_property_1_value") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSegmentProperty1Value() { + return segmentProperty1Value; + } + + /** + * Setter for SegmentProperty1Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_1` on attached Metric. If empty string is passed, this filter would be + * rejected. Use in query `filter[segment_property_1_value]=EU`. + * @param segmentProperty1Value Value for String + */ + @JsonSetter("segment_property_1_value") + public void setSegmentProperty1Value(String segmentProperty1Value) { + this.segmentProperty1Value = segmentProperty1Value; + } + + /** + * Getter for SegmentProperty2Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_2` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @return Returns the String + */ + @JsonGetter("segment_property_2_value") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSegmentProperty2Value() { + return segmentProperty2Value; + } + + /** + * Setter for SegmentProperty2Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_2` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @param segmentProperty2Value Value for String + */ + @JsonSetter("segment_property_2_value") + public void setSegmentProperty2Value(String segmentProperty2Value) { + this.segmentProperty2Value = segmentProperty2Value; + } + + /** + * Getter for SegmentProperty3Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_3` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @return Returns the String + */ + @JsonGetter("segment_property_3_value") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSegmentProperty3Value() { + return segmentProperty3Value; + } + + /** + * Setter for SegmentProperty3Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_3` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @param segmentProperty3Value Value for String + */ + @JsonSetter("segment_property_3_value") + public void setSegmentProperty3Value(String segmentProperty3Value) { + this.segmentProperty3Value = segmentProperty3Value; + } + + /** + * Getter for SegmentProperty4Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_4` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @return Returns the String + */ + @JsonGetter("segment_property_4_value") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSegmentProperty4Value() { + return segmentProperty4Value; + } + + /** + * Setter for SegmentProperty4Value. + * The value passed here would be used to filter segments. Pass a value related to + * `segment_property_4` on attached Metric. If empty string is passed, this filter would be + * rejected. + * @param segmentProperty4Value Value for String + */ + @JsonSetter("segment_property_4_value") + public void setSegmentProperty4Value(String segmentProperty4Value) { + this.segmentProperty4Value = segmentProperty4Value; + } + + /** + * Converts this ListSegmentsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSegmentsFilter [" + "segmentProperty1Value=" + segmentProperty1Value + + ", segmentProperty2Value=" + segmentProperty2Value + ", segmentProperty3Value=" + + segmentProperty3Value + ", segmentProperty4Value=" + segmentProperty4Value + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListSegmentsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSegmentsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .segmentProperty1Value(getSegmentProperty1Value()) + .segmentProperty2Value(getSegmentProperty2Value()) + .segmentProperty3Value(getSegmentProperty3Value()) + .segmentProperty4Value(getSegmentProperty4Value()); + return builder; + } + + /** + * Class to build instances of {@link ListSegmentsFilter}. + */ + public static class Builder { + private String segmentProperty1Value; + private String segmentProperty2Value; + private String segmentProperty3Value; + private String segmentProperty4Value; + + + + /** + * Setter for segmentProperty1Value. + * @param segmentProperty1Value String value for segmentProperty1Value. + * @return Builder + */ + public Builder segmentProperty1Value(String segmentProperty1Value) { + this.segmentProperty1Value = segmentProperty1Value; + return this; + } + + /** + * Setter for segmentProperty2Value. + * @param segmentProperty2Value String value for segmentProperty2Value. + * @return Builder + */ + public Builder segmentProperty2Value(String segmentProperty2Value) { + this.segmentProperty2Value = segmentProperty2Value; + return this; + } + + /** + * Setter for segmentProperty3Value. + * @param segmentProperty3Value String value for segmentProperty3Value. + * @return Builder + */ + public Builder segmentProperty3Value(String segmentProperty3Value) { + this.segmentProperty3Value = segmentProperty3Value; + return this; + } + + /** + * Setter for segmentProperty4Value. + * @param segmentProperty4Value String value for segmentProperty4Value. + * @return Builder + */ + public Builder segmentProperty4Value(String segmentProperty4Value) { + this.segmentProperty4Value = segmentProperty4Value; + return this; + } + + /** + * Builds a new {@link ListSegmentsFilter} object using the set fields. + * @return {@link ListSegmentsFilter} + */ + public ListSegmentsFilter build() { + return new ListSegmentsFilter(segmentProperty1Value, segmentProperty2Value, + segmentProperty3Value, segmentProperty4Value); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java index 9dc674e6..36087c14 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java @@ -18,10 +18,7 @@ public class ListSegmentsForPricePointInput { private String pricePointId; private Integer page; private Integer perPage; - private String filterSegmentProperty1Value; - private String filterSegmentProperty2Value; - private String filterSegmentProperty3Value; - private String filterSegmentProperty4Value; + private ListSegmentsFilter filter; /** * Default constructor. @@ -37,28 +34,19 @@ public ListSegmentsForPricePointInput() { * @param pricePointId String value for pricePointId. * @param page Integer value for page. * @param perPage Integer value for perPage. - * @param filterSegmentProperty1Value String value for filterSegmentProperty1Value. - * @param filterSegmentProperty2Value String value for filterSegmentProperty2Value. - * @param filterSegmentProperty3Value String value for filterSegmentProperty3Value. - * @param filterSegmentProperty4Value String value for filterSegmentProperty4Value. + * @param filter ListSegmentsFilter value for filter. */ public ListSegmentsForPricePointInput( String componentId, String pricePointId, Integer page, Integer perPage, - String filterSegmentProperty1Value, - String filterSegmentProperty2Value, - String filterSegmentProperty3Value, - String filterSegmentProperty4Value) { + ListSegmentsFilter filter) { this.componentId = componentId; this.pricePointId = pricePointId; this.page = page; this.perPage = perPage; - this.filterSegmentProperty1Value = filterSegmentProperty1Value; - this.filterSegmentProperty2Value = filterSegmentProperty2Value; - this.filterSegmentProperty3Value = filterSegmentProperty3Value; - this.filterSegmentProperty4Value = filterSegmentProperty4Value; + this.filter = filter; } /** @@ -156,103 +144,24 @@ public void setPerPage(Integer perPage) { } /** - * Getter for FilterSegmentProperty1Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_1` on attached Metric. If empty string is passed, this filter would be - * rejected. Use in query `filter[segment_property_1_value]=EU`. - * @return Returns the String + * Getter for Filter. + * Filter to use for List Segments for a Price Point operation + * @return Returns the ListSegmentsFilter */ - @JsonGetter("filter[segment_property_1_value]") + @JsonGetter("filter") @JsonInclude(JsonInclude.Include.NON_NULL) - public String getFilterSegmentProperty1Value() { - return filterSegmentProperty1Value; + public ListSegmentsFilter getFilter() { + return filter; } /** - * Setter for FilterSegmentProperty1Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_1` on attached Metric. If empty string is passed, this filter would be - * rejected. Use in query `filter[segment_property_1_value]=EU`. - * @param filterSegmentProperty1Value Value for String + * Setter for Filter. + * Filter to use for List Segments for a Price Point operation + * @param filter Value for ListSegmentsFilter */ - @JsonSetter("filter[segment_property_1_value]") - public void setFilterSegmentProperty1Value(String filterSegmentProperty1Value) { - this.filterSegmentProperty1Value = filterSegmentProperty1Value; - } - - /** - * Getter for FilterSegmentProperty2Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_2` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @return Returns the String - */ - @JsonGetter("filter[segment_property_2_value]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getFilterSegmentProperty2Value() { - return filterSegmentProperty2Value; - } - - /** - * Setter for FilterSegmentProperty2Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_2` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @param filterSegmentProperty2Value Value for String - */ - @JsonSetter("filter[segment_property_2_value]") - public void setFilterSegmentProperty2Value(String filterSegmentProperty2Value) { - this.filterSegmentProperty2Value = filterSegmentProperty2Value; - } - - /** - * Getter for FilterSegmentProperty3Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_3` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @return Returns the String - */ - @JsonGetter("filter[segment_property_3_value]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getFilterSegmentProperty3Value() { - return filterSegmentProperty3Value; - } - - /** - * Setter for FilterSegmentProperty3Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_3` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @param filterSegmentProperty3Value Value for String - */ - @JsonSetter("filter[segment_property_3_value]") - public void setFilterSegmentProperty3Value(String filterSegmentProperty3Value) { - this.filterSegmentProperty3Value = filterSegmentProperty3Value; - } - - /** - * Getter for FilterSegmentProperty4Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_4` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @return Returns the String - */ - @JsonGetter("filter[segment_property_4_value]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public String getFilterSegmentProperty4Value() { - return filterSegmentProperty4Value; - } - - /** - * Setter for FilterSegmentProperty4Value. - * The value passed here would be used to filter segments. Pass a value related to - * `segment_property_4` on attached Metric. If empty string is passed, this filter would be - * rejected. - * @param filterSegmentProperty4Value Value for String - */ - @JsonSetter("filter[segment_property_4_value]") - public void setFilterSegmentProperty4Value(String filterSegmentProperty4Value) { - this.filterSegmentProperty4Value = filterSegmentProperty4Value; + @JsonSetter("filter") + public void setFilter(ListSegmentsFilter filter) { + this.filter = filter; } /** @@ -262,11 +171,8 @@ public void setFilterSegmentProperty4Value(String filterSegmentProperty4Value) { @Override public String toString() { return "ListSegmentsForPricePointInput [" + "componentId=" + componentId + ", pricePointId=" - + pricePointId + ", page=" + page + ", perPage=" + perPage - + ", filterSegmentProperty1Value=" + filterSegmentProperty1Value - + ", filterSegmentProperty2Value=" + filterSegmentProperty2Value - + ", filterSegmentProperty3Value=" + filterSegmentProperty3Value - + ", filterSegmentProperty4Value=" + filterSegmentProperty4Value + "]"; + + pricePointId + ", page=" + page + ", perPage=" + perPage + ", filter=" + filter + + "]"; } /** @@ -278,10 +184,7 @@ public Builder toBuilder() { Builder builder = new Builder(componentId, pricePointId) .page(getPage()) .perPage(getPerPage()) - .filterSegmentProperty1Value(getFilterSegmentProperty1Value()) - .filterSegmentProperty2Value(getFilterSegmentProperty2Value()) - .filterSegmentProperty3Value(getFilterSegmentProperty3Value()) - .filterSegmentProperty4Value(getFilterSegmentProperty4Value()); + .filter(getFilter()); return builder; } @@ -293,10 +196,7 @@ public static class Builder { private String pricePointId; private Integer page = 1; private Integer perPage = 30; - private String filterSegmentProperty1Value; - private String filterSegmentProperty2Value; - private String filterSegmentProperty3Value; - private String filterSegmentProperty4Value; + private ListSegmentsFilter filter; /** * Initialization constructor. @@ -355,42 +255,12 @@ public Builder perPage(Integer perPage) { } /** - * Setter for filterSegmentProperty1Value. - * @param filterSegmentProperty1Value String value for filterSegmentProperty1Value. - * @return Builder - */ - public Builder filterSegmentProperty1Value(String filterSegmentProperty1Value) { - this.filterSegmentProperty1Value = filterSegmentProperty1Value; - return this; - } - - /** - * Setter for filterSegmentProperty2Value. - * @param filterSegmentProperty2Value String value for filterSegmentProperty2Value. - * @return Builder - */ - public Builder filterSegmentProperty2Value(String filterSegmentProperty2Value) { - this.filterSegmentProperty2Value = filterSegmentProperty2Value; - return this; - } - - /** - * Setter for filterSegmentProperty3Value. - * @param filterSegmentProperty3Value String value for filterSegmentProperty3Value. - * @return Builder - */ - public Builder filterSegmentProperty3Value(String filterSegmentProperty3Value) { - this.filterSegmentProperty3Value = filterSegmentProperty3Value; - return this; - } - - /** - * Setter for filterSegmentProperty4Value. - * @param filterSegmentProperty4Value String value for filterSegmentProperty4Value. + * Setter for filter. + * @param filter ListSegmentsFilter value for filter. * @return Builder */ - public Builder filterSegmentProperty4Value(String filterSegmentProperty4Value) { - this.filterSegmentProperty4Value = filterSegmentProperty4Value; + public Builder filter(ListSegmentsFilter filter) { + this.filter = filter; return this; } @@ -400,8 +270,7 @@ public Builder filterSegmentProperty4Value(String filterSegmentProperty4Value) { */ public ListSegmentsForPricePointInput build() { return new ListSegmentsForPricePointInput(componentId, pricePointId, page, perPage, - filterSegmentProperty1Value, filterSegmentProperty2Value, - filterSegmentProperty3Value, filterSegmentProperty4Value); + filter); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsFilter.java new file mode 100644 index 00000000..c4cc5766 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsFilter.java @@ -0,0 +1,147 @@ +/* + * 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 io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ListSubscriptionComponentsFilter type. + */ +public class ListSubscriptionComponentsFilter + extends BaseModel { + private List currencies; + private Boolean useSiteExchangeRate; + + /** + * Default constructor. + */ + public ListSubscriptionComponentsFilter() { + } + + /** + * Initialization constructor. + * @param currencies List of String value for currencies. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + */ + public ListSubscriptionComponentsFilter( + List currencies, + Boolean useSiteExchangeRate) { + this.currencies = currencies; + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for Currencies. + * Allows fetching components allocation with matching currency based on provided values. Use in + * query `filter[currencies]=EUR,USD`. + * @return Returns the List of String + */ + @JsonGetter("currencies") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCurrencies() { + return currencies; + } + + /** + * Setter for Currencies. + * Allows fetching components allocation with matching currency based on provided values. Use in + * query `filter[currencies]=EUR,USD`. + * @param currencies Value for List of String + */ + @JsonSetter("currencies") + public void setCurrencies(List currencies) { + this.currencies = currencies; + } + + /** + * Getter for UseSiteExchangeRate. + * Allows fetching components allocation with matching use_site_exchange_rate based on provided + * value. Use in query `filter[use_site_exchange_rate]=true`. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Allows fetching components allocation with matching use_site_exchange_rate based on provided + * value. Use in query `filter[use_site_exchange_rate]=true`. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Converts this ListSubscriptionComponentsFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSubscriptionComponentsFilter [" + "currencies=" + currencies + + ", useSiteExchangeRate=" + useSiteExchangeRate + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListSubscriptionComponentsFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionComponentsFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .currencies(getCurrencies()) + .useSiteExchangeRate(getUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionComponentsFilter}. + */ + public static class Builder { + private List currencies; + private Boolean useSiteExchangeRate; + + + + /** + * Setter for currencies. + * @param currencies List of String value for currencies. + * @return Builder + */ + public Builder currencies(List currencies) { + this.currencies = currencies; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Builds a new {@link ListSubscriptionComponentsFilter} object using the set fields. + * @return {@link ListSubscriptionComponentsFilter} + */ + public ListSubscriptionComponentsFilter build() { + return new ListSubscriptionComponentsFilter(currencies, useSiteExchangeRate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteFilter.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteFilter.java new file mode 100644 index 00000000..c0cabf08 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteFilter.java @@ -0,0 +1,185 @@ +/* + * 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 io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ListSubscriptionComponentsForSiteFilter type. + */ +public class ListSubscriptionComponentsForSiteFilter + extends BaseModel { + private List currencies; + private Boolean useSiteExchangeRate; + private SubscriptionFilter subscription; + + /** + * Default constructor. + */ + public ListSubscriptionComponentsForSiteFilter() { + } + + /** + * Initialization constructor. + * @param currencies List of String value for currencies. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param subscription SubscriptionFilter value for subscription. + */ + public ListSubscriptionComponentsForSiteFilter( + List currencies, + Boolean useSiteExchangeRate, + SubscriptionFilter subscription) { + this.currencies = currencies; + this.useSiteExchangeRate = useSiteExchangeRate; + this.subscription = subscription; + } + + /** + * Getter for Currencies. + * Allows fetching components allocation with matching currency based on provided values. Use in + * query `filter[currencies]=USD,EUR`. + * @return Returns the List of String + */ + @JsonGetter("currencies") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCurrencies() { + return currencies; + } + + /** + * Setter for Currencies. + * Allows fetching components allocation with matching currency based on provided values. Use in + * query `filter[currencies]=USD,EUR`. + * @param currencies Value for List of String + */ + @JsonSetter("currencies") + public void setCurrencies(List currencies) { + this.currencies = currencies; + } + + /** + * Getter for UseSiteExchangeRate. + * Allows fetching components allocation with matching use_site_exchange_rate based on provided + * value. Use in query `filter[use_site_exchange_rate]=true`. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Allows fetching components allocation with matching use_site_exchange_rate based on provided + * value. Use in query `filter[use_site_exchange_rate]=true`. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for Subscription. + * Nested filter used for List Subscription Components For Site Filter + * @return Returns the SubscriptionFilter + */ + @JsonGetter("subscription") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SubscriptionFilter getSubscription() { + return subscription; + } + + /** + * Setter for Subscription. + * Nested filter used for List Subscription Components For Site Filter + * @param subscription Value for SubscriptionFilter + */ + @JsonSetter("subscription") + public void setSubscription(SubscriptionFilter subscription) { + this.subscription = subscription; + } + + /** + * Converts this ListSubscriptionComponentsForSiteFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSubscriptionComponentsForSiteFilter [" + "currencies=" + currencies + + ", useSiteExchangeRate=" + useSiteExchangeRate + ", subscription=" + subscription + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListSubscriptionComponentsForSiteFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionComponentsForSiteFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .currencies(getCurrencies()) + .useSiteExchangeRate(getUseSiteExchangeRate()) + .subscription(getSubscription()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionComponentsForSiteFilter}. + */ + public static class Builder { + private List currencies; + private Boolean useSiteExchangeRate; + private SubscriptionFilter subscription; + + + + /** + * Setter for currencies. + * @param currencies List of String value for currencies. + * @return Builder + */ + public Builder currencies(List currencies) { + this.currencies = currencies; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Setter for subscription. + * @param subscription SubscriptionFilter value for subscription. + * @return Builder + */ + public Builder subscription(SubscriptionFilter subscription) { + this.subscription = subscription; + return this; + } + + /** + * Builds a new {@link ListSubscriptionComponentsForSiteFilter} object using the set fields. + * @return {@link ListSubscriptionComponentsForSiteFilter} + */ + public ListSubscriptionComponentsForSiteFilter build() { + return new ListSubscriptionComponentsForSiteFilter(currencies, useSiteExchangeRate, + subscription); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java index f53a044f..4f622f8e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java @@ -9,11 +9,6 @@ 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 java.time.LocalDate; -import java.time.ZonedDateTime; import java.util.List; /** @@ -24,6 +19,7 @@ public class ListSubscriptionComponentsForSiteInput { private Integer perPage; private ListSubscriptionComponentsSort sort; private SortingDirection direction; + private ListSubscriptionComponentsForSiteFilter filter; private SubscriptionListDateField dateField; private String startDate; private String startDatetime; @@ -33,14 +29,6 @@ public class ListSubscriptionComponentsForSiteInput { private IncludeNotNull pricePointIds; private List productFamilyIds; private ListSubscriptionComponentsInclude include; - private Boolean filterUseSiteExchangeRate; - private List filterCurrencies; - private List filterSubscriptionStates; - private SubscriptionListDateField filterSubscriptionDateField; - private LocalDate filterSubscriptionStartDate; - private ZonedDateTime filterSubscriptionStartDatetime; - private LocalDate filterSubscriptionEndDate; - private ZonedDateTime filterSubscriptionEndDatetime; /** * Default constructor. @@ -56,6 +44,7 @@ public ListSubscriptionComponentsForSiteInput() { * @param perPage Integer value for perPage. * @param sort ListSubscriptionComponentsSort value for sort. * @param direction SortingDirection value for direction. + * @param filter ListSubscriptionComponentsForSiteFilter value for filter. * @param dateField SubscriptionListDateField value for dateField. * @param startDate String value for startDate. * @param startDatetime String value for startDatetime. @@ -65,23 +54,13 @@ public ListSubscriptionComponentsForSiteInput() { * @param pricePointIds IncludeNotNull value for pricePointIds. * @param productFamilyIds List of Integer value for productFamilyIds. * @param include ListSubscriptionComponentsInclude value for include. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @param filterCurrencies List of String value for filterCurrencies. - * @param filterSubscriptionStates List of SubscriptionStateFilter value for - * filterSubscriptionStates. - * @param filterSubscriptionDateField SubscriptionListDateField value for - * filterSubscriptionDateField. - * @param filterSubscriptionStartDate LocalDate value for filterSubscriptionStartDate. - * @param filterSubscriptionStartDatetime ZonedDateTime value for - * filterSubscriptionStartDatetime. - * @param filterSubscriptionEndDate LocalDate value for filterSubscriptionEndDate. - * @param filterSubscriptionEndDatetime ZonedDateTime value for filterSubscriptionEndDatetime. */ public ListSubscriptionComponentsForSiteInput( Integer page, Integer perPage, ListSubscriptionComponentsSort sort, SortingDirection direction, + ListSubscriptionComponentsForSiteFilter filter, SubscriptionListDateField dateField, String startDate, String startDatetime, @@ -90,19 +69,12 @@ public ListSubscriptionComponentsForSiteInput( List subscriptionIds, IncludeNotNull pricePointIds, List productFamilyIds, - ListSubscriptionComponentsInclude include, - Boolean filterUseSiteExchangeRate, - List filterCurrencies, - List filterSubscriptionStates, - SubscriptionListDateField filterSubscriptionDateField, - LocalDate filterSubscriptionStartDate, - ZonedDateTime filterSubscriptionStartDatetime, - LocalDate filterSubscriptionEndDate, - ZonedDateTime filterSubscriptionEndDatetime) { + ListSubscriptionComponentsInclude include) { this.page = page; this.perPage = perPage; this.sort = sort; this.direction = direction; + this.filter = filter; this.dateField = dateField; this.startDate = startDate; this.startDatetime = startDatetime; @@ -112,14 +84,6 @@ public ListSubscriptionComponentsForSiteInput( this.pricePointIds = pricePointIds; this.productFamilyIds = productFamilyIds; this.include = include; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - this.filterCurrencies = filterCurrencies; - this.filterSubscriptionStates = filterSubscriptionStates; - this.filterSubscriptionDateField = filterSubscriptionDateField; - this.filterSubscriptionStartDate = filterSubscriptionStartDate; - this.filterSubscriptionStartDatetime = filterSubscriptionStartDatetime; - this.filterSubscriptionEndDate = filterSubscriptionEndDate; - this.filterSubscriptionEndDatetime = filterSubscriptionEndDatetime; } /** @@ -218,6 +182,27 @@ public void setDirection(SortingDirection direction) { this.direction = direction; } + /** + * Getter for Filter. + * Filter to use for List Subscription Components For Site operation + * @return Returns the ListSubscriptionComponentsForSiteFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsForSiteFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Subscription Components For Site operation + * @param filter Value for ListSubscriptionComponentsForSiteFilter + */ + @JsonSetter("filter") + public void setFilter(ListSubscriptionComponentsForSiteFilter filter) { + this.filter = filter; + } + /** * Getter for DateField. * The type of filter you'd like to apply to your search. Use in query: `date_field=updated_at`. @@ -435,222 +420,6 @@ public void setInclude(ListSubscriptionComponentsInclude include) { this.include = include; } - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching components allocation with matching use_site_exchange_rate based on provided - * value. Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching components allocation with matching use_site_exchange_rate based on provided - * value. Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - - /** - * Getter for FilterCurrencies. - * Allows fetching components allocation with matching currency based on provided values. Use in - * query `filter[currencies]=USD,EUR`. - * @return Returns the List of String - */ - @JsonGetter("filter[currencies]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterCurrencies() { - return filterCurrencies; - } - - /** - * Setter for FilterCurrencies. - * Allows fetching components allocation with matching currency based on provided values. Use in - * query `filter[currencies]=USD,EUR`. - * @param filterCurrencies Value for List of String - */ - @JsonSetter("filter[currencies]") - public void setFilterCurrencies(List filterCurrencies) { - this.filterCurrencies = filterCurrencies; - } - - /** - * Getter for FilterSubscriptionStates. - * Allows fetching components allocations that belong to the subscription with matching states - * based on provided values. To use this filter you also have to include the following param in - * the request `include=subscription`. Use in query - * `filter[subscription][states]=active,canceled&include=subscription`. - * @return Returns the List of SubscriptionStateFilter - */ - @JsonGetter("filter[subscription][states]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterSubscriptionStates() { - return filterSubscriptionStates; - } - - /** - * Setter for FilterSubscriptionStates. - * Allows fetching components allocations that belong to the subscription with matching states - * based on provided values. To use this filter you also have to include the following param in - * the request `include=subscription`. Use in query - * `filter[subscription][states]=active,canceled&include=subscription`. - * @param filterSubscriptionStates Value for List of SubscriptionStateFilter - */ - @JsonSetter("filter[subscription][states]") - public void setFilterSubscriptionStates(List filterSubscriptionStates) { - this.filterSubscriptionStates = filterSubscriptionStates; - } - - /** - * Getter for FilterSubscriptionDateField. - * The type of filter you'd like to apply to your search. To use this filter you also have to - * include the following param in the request `include=subscription`. - * @return Returns the SubscriptionListDateField - */ - @JsonGetter("filter[subscription][date_field]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SubscriptionListDateField getFilterSubscriptionDateField() { - return filterSubscriptionDateField; - } - - /** - * Setter for FilterSubscriptionDateField. - * The type of filter you'd like to apply to your search. To use this filter you also have to - * include the following param in the request `include=subscription`. - * @param filterSubscriptionDateField Value for SubscriptionListDateField - */ - @JsonSetter("filter[subscription][date_field]") - public void setFilterSubscriptionDateField(SubscriptionListDateField filterSubscriptionDateField) { - this.filterSubscriptionDateField = filterSubscriptionDateField; - } - - /** - * Getter for FilterSubscriptionStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components - * that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your - * site’s time zone on the date specified. To use this filter you also have to include the - * following param in the request `include=subscription`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[subscription][start_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterSubscriptionStartDate() { - return filterSubscriptionStartDate; - } - - /** - * Setter for FilterSubscriptionStartDate. - * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components - * that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your - * site’s time zone on the date specified. To use this filter you also have to include the - * following param in the request `include=subscription`. - * @param filterSubscriptionStartDate Value for LocalDate - */ - @JsonSetter("filter[subscription][start_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterSubscriptionStartDate(LocalDate filterSubscriptionStartDate) { - this.filterSubscriptionStartDate = filterSubscriptionStartDate; - } - - /** - * Getter for FilterSubscriptionStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns components that belong to the subscription 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. To use this filter - * you also have to include the following param in the request `include=subscription`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[subscription][start_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterSubscriptionStartDatetime() { - return filterSubscriptionStartDatetime; - } - - /** - * Setter for FilterSubscriptionStartDatetime. - * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns components that belong to the subscription 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. To use this filter - * you also have to include the following param in the request `include=subscription`. - * @param filterSubscriptionStartDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[subscription][start_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterSubscriptionStartDatetime(ZonedDateTime filterSubscriptionStartDatetime) { - this.filterSubscriptionStartDatetime = filterSubscriptionStartDatetime; - } - - /** - * Getter for FilterSubscriptionEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that - * belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s - * time zone on the date specified. To use this filter you also have to include the following - * param in the request `include=subscription`. - * @return Returns the LocalDate - */ - @JsonGetter("filter[subscription][end_date]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) - public LocalDate getFilterSubscriptionEndDate() { - return filterSubscriptionEndDate; - } - - /** - * Setter for FilterSubscriptionEndDate. - * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that - * belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s - * time zone on the date specified. To use this filter you also have to include the following - * param in the request `include=subscription`. - * @param filterSubscriptionEndDate Value for LocalDate - */ - @JsonSetter("filter[subscription][end_date]") - @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) - public void setFilterSubscriptionEndDate(LocalDate filterSubscriptionEndDate) { - this.filterSubscriptionEndDate = filterSubscriptionEndDate; - } - - /** - * Getter for FilterSubscriptionEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you - * also have to include the following param in the request `include=subscription`. - * @return Returns the ZonedDateTime - */ - @JsonGetter("filter[subscription][end_datetime]") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) - public ZonedDateTime getFilterSubscriptionEndDatetime() { - return filterSubscriptionEndDatetime; - } - - /** - * Setter for FilterSubscriptionEndDatetime. - * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. - * Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you - * also have to include the following param in the request `include=subscription`. - * @param filterSubscriptionEndDatetime Value for ZonedDateTime - */ - @JsonSetter("filter[subscription][end_datetime]") - @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) - public void setFilterSubscriptionEndDatetime(ZonedDateTime filterSubscriptionEndDatetime) { - this.filterSubscriptionEndDatetime = filterSubscriptionEndDatetime; - } - /** * Converts this ListSubscriptionComponentsForSiteInput into string format. * @return String representation of this class @@ -658,18 +427,11 @@ public void setFilterSubscriptionEndDatetime(ZonedDateTime filterSubscriptionEnd @Override public String toString() { return "ListSubscriptionComponentsForSiteInput [" + "page=" + page + ", perPage=" + perPage - + ", sort=" + sort + ", direction=" + direction + ", dateField=" + dateField - + ", startDate=" + startDate + ", startDatetime=" + startDatetime + ", endDate=" - + endDate + ", endDatetime=" + endDatetime + ", subscriptionIds=" + subscriptionIds - + ", pricePointIds=" + pricePointIds + ", productFamilyIds=" + productFamilyIds - + ", include=" + include + ", filterUseSiteExchangeRate=" - + filterUseSiteExchangeRate + ", filterCurrencies=" + filterCurrencies - + ", filterSubscriptionStates=" + filterSubscriptionStates - + ", filterSubscriptionDateField=" + filterSubscriptionDateField - + ", filterSubscriptionStartDate=" + filterSubscriptionStartDate - + ", filterSubscriptionStartDatetime=" + filterSubscriptionStartDatetime - + ", filterSubscriptionEndDate=" + filterSubscriptionEndDate - + ", filterSubscriptionEndDatetime=" + filterSubscriptionEndDatetime + "]"; + + ", sort=" + sort + ", direction=" + direction + ", filter=" + filter + + ", dateField=" + dateField + ", startDate=" + startDate + ", startDatetime=" + + startDatetime + ", endDate=" + endDate + ", endDatetime=" + endDatetime + + ", subscriptionIds=" + subscriptionIds + ", pricePointIds=" + pricePointIds + + ", productFamilyIds=" + productFamilyIds + ", include=" + include + "]"; } /** @@ -683,6 +445,7 @@ public Builder toBuilder() { .perPage(getPerPage()) .sort(getSort()) .direction(getDirection()) + .filter(getFilter()) .dateField(getDateField()) .startDate(getStartDate()) .startDatetime(getStartDatetime()) @@ -691,15 +454,7 @@ public Builder toBuilder() { .subscriptionIds(getSubscriptionIds()) .pricePointIds(getPricePointIds()) .productFamilyIds(getProductFamilyIds()) - .include(getInclude()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()) - .filterCurrencies(getFilterCurrencies()) - .filterSubscriptionStates(getFilterSubscriptionStates()) - .filterSubscriptionDateField(getFilterSubscriptionDateField()) - .filterSubscriptionStartDate(getFilterSubscriptionStartDate()) - .filterSubscriptionStartDatetime(getFilterSubscriptionStartDatetime()) - .filterSubscriptionEndDate(getFilterSubscriptionEndDate()) - .filterSubscriptionEndDatetime(getFilterSubscriptionEndDatetime()); + .include(getInclude()); return builder; } @@ -711,6 +466,7 @@ public static class Builder { private Integer perPage = 20; private ListSubscriptionComponentsSort sort; private SortingDirection direction; + private ListSubscriptionComponentsForSiteFilter filter; private SubscriptionListDateField dateField; private String startDate; private String startDatetime; @@ -720,14 +476,6 @@ public static class Builder { private IncludeNotNull pricePointIds; private List productFamilyIds; private ListSubscriptionComponentsInclude include; - private Boolean filterUseSiteExchangeRate; - private List filterCurrencies; - private List filterSubscriptionStates; - private SubscriptionListDateField filterSubscriptionDateField; - private LocalDate filterSubscriptionStartDate; - private ZonedDateTime filterSubscriptionStartDatetime; - private LocalDate filterSubscriptionEndDate; - private ZonedDateTime filterSubscriptionEndDatetime; @@ -771,6 +519,16 @@ public Builder direction(SortingDirection direction) { return this; } + /** + * Setter for filter. + * @param filter ListSubscriptionComponentsForSiteFilter value for filter. + * @return Builder + */ + public Builder filter(ListSubscriptionComponentsForSiteFilter filter) { + this.filter = filter; + return this; + } + /** * Setter for dateField. * @param dateField SubscriptionListDateField value for dateField. @@ -861,105 +619,14 @@ public Builder include(ListSubscriptionComponentsInclude include) { return this; } - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - - /** - * Setter for filterCurrencies. - * @param filterCurrencies List of String value for filterCurrencies. - * @return Builder - */ - public Builder filterCurrencies(List filterCurrencies) { - this.filterCurrencies = filterCurrencies; - return this; - } - - /** - * Setter for filterSubscriptionStates. - * @param filterSubscriptionStates List of SubscriptionStateFilter value for - * filterSubscriptionStates. - * @return Builder - */ - public Builder filterSubscriptionStates( - List filterSubscriptionStates) { - this.filterSubscriptionStates = filterSubscriptionStates; - return this; - } - - /** - * Setter for filterSubscriptionDateField. - * @param filterSubscriptionDateField SubscriptionListDateField value for - * filterSubscriptionDateField. - * @return Builder - */ - public Builder filterSubscriptionDateField( - SubscriptionListDateField filterSubscriptionDateField) { - this.filterSubscriptionDateField = filterSubscriptionDateField; - return this; - } - - /** - * Setter for filterSubscriptionStartDate. - * @param filterSubscriptionStartDate LocalDate value for filterSubscriptionStartDate. - * @return Builder - */ - public Builder filterSubscriptionStartDate(LocalDate filterSubscriptionStartDate) { - this.filterSubscriptionStartDate = filterSubscriptionStartDate; - return this; - } - - /** - * Setter for filterSubscriptionStartDatetime. - * @param filterSubscriptionStartDatetime ZonedDateTime value for - * filterSubscriptionStartDatetime. - * @return Builder - */ - public Builder filterSubscriptionStartDatetime( - ZonedDateTime filterSubscriptionStartDatetime) { - this.filterSubscriptionStartDatetime = filterSubscriptionStartDatetime; - return this; - } - - /** - * Setter for filterSubscriptionEndDate. - * @param filterSubscriptionEndDate LocalDate value for filterSubscriptionEndDate. - * @return Builder - */ - public Builder filterSubscriptionEndDate(LocalDate filterSubscriptionEndDate) { - this.filterSubscriptionEndDate = filterSubscriptionEndDate; - return this; - } - - /** - * Setter for filterSubscriptionEndDatetime. - * @param filterSubscriptionEndDatetime ZonedDateTime value for - * filterSubscriptionEndDatetime. - * @return Builder - */ - public Builder filterSubscriptionEndDatetime( - ZonedDateTime filterSubscriptionEndDatetime) { - this.filterSubscriptionEndDatetime = filterSubscriptionEndDatetime; - return this; - } - /** * Builds a new {@link ListSubscriptionComponentsForSiteInput} object using the set fields. * @return {@link ListSubscriptionComponentsForSiteInput} */ public ListSubscriptionComponentsForSiteInput build() { return new ListSubscriptionComponentsForSiteInput(page, perPage, sort, direction, - dateField, startDate, startDatetime, endDate, endDatetime, subscriptionIds, - pricePointIds, productFamilyIds, include, filterUseSiteExchangeRate, - filterCurrencies, filterSubscriptionStates, filterSubscriptionDateField, - filterSubscriptionStartDate, filterSubscriptionStartDatetime, - filterSubscriptionEndDate, filterSubscriptionEndDatetime); + filter, dateField, startDate, startDatetime, endDate, endDatetime, + subscriptionIds, pricePointIds, productFamilyIds, include); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java index 6f33848f..fefbf808 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInclude.java @@ -38,8 +38,7 @@ public enum ListSubscriptionComponentsInclude { @JsonCreator public static ListSubscriptionComponentsInclude constructFromString(String toConvert) throws IOException { ListSubscriptionComponentsInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java index 6bde6d8f..4150a8dc 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java @@ -18,6 +18,7 @@ public class ListSubscriptionComponentsInput { private int subscriptionId; private SubscriptionListDateField dateField; private SortingDirection direction; + private ListSubscriptionComponentsFilter filter; private String endDate; private String endDatetime; private IncludeNotNull pricePointIds; @@ -26,8 +27,6 @@ public class ListSubscriptionComponentsInput { private String startDate; private String startDatetime; private ListSubscriptionComponentsInclude include; - private Boolean filterUseSiteExchangeRate; - private List filterCurrencies; /** * Default constructor. @@ -40,6 +39,7 @@ public ListSubscriptionComponentsInput() { * @param subscriptionId int value for subscriptionId. * @param dateField SubscriptionListDateField value for dateField. * @param direction SortingDirection value for direction. + * @param filter ListSubscriptionComponentsFilter value for filter. * @param endDate String value for endDate. * @param endDatetime String value for endDatetime. * @param pricePointIds IncludeNotNull value for pricePointIds. @@ -48,13 +48,12 @@ public ListSubscriptionComponentsInput() { * @param startDate String value for startDate. * @param startDatetime String value for startDatetime. * @param include ListSubscriptionComponentsInclude value for include. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @param filterCurrencies List of String value for filterCurrencies. */ public ListSubscriptionComponentsInput( int subscriptionId, SubscriptionListDateField dateField, SortingDirection direction, + ListSubscriptionComponentsFilter filter, String endDate, String endDatetime, IncludeNotNull pricePointIds, @@ -62,12 +61,11 @@ public ListSubscriptionComponentsInput( ListSubscriptionComponentsSort sort, String startDate, String startDatetime, - ListSubscriptionComponentsInclude include, - Boolean filterUseSiteExchangeRate, - List filterCurrencies) { + ListSubscriptionComponentsInclude include) { this.subscriptionId = subscriptionId; this.dateField = dateField; this.direction = direction; + this.filter = filter; this.endDate = endDate; this.endDatetime = endDatetime; this.pricePointIds = pricePointIds; @@ -76,8 +74,6 @@ public ListSubscriptionComponentsInput( this.startDate = startDate; this.startDatetime = startDatetime; this.include = include; - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - this.filterCurrencies = filterCurrencies; } /** @@ -142,6 +138,27 @@ public void setDirection(SortingDirection direction) { this.direction = direction; } + /** + * Getter for Filter. + * Filter to use for List Subscription Components operation + * @return Returns the ListSubscriptionComponentsFilter + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsFilter getFilter() { + return filter; + } + + /** + * Setter for Filter. + * Filter to use for List Subscription Components operation + * @param filter Value for ListSubscriptionComponentsFilter + */ + @JsonSetter("filter") + public void setFilter(ListSubscriptionComponentsFilter filter) { + this.filter = filter; + } + /** * Getter for EndDate. * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with @@ -332,52 +349,6 @@ public void setInclude(ListSubscriptionComponentsInclude include) { this.include = include; } - /** - * Getter for FilterUseSiteExchangeRate. - * Allows fetching components allocation with matching use_site_exchange_rate based on provided - * value. Use in query `filter[use_site_exchange_rate]=true`. - * @return Returns the Boolean - */ - @JsonGetter("filter[use_site_exchange_rate]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getFilterUseSiteExchangeRate() { - return filterUseSiteExchangeRate; - } - - /** - * Setter for FilterUseSiteExchangeRate. - * Allows fetching components allocation with matching use_site_exchange_rate based on provided - * value. Use in query `filter[use_site_exchange_rate]=true`. - * @param filterUseSiteExchangeRate Value for Boolean - */ - @JsonSetter("filter[use_site_exchange_rate]") - public void setFilterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - } - - /** - * Getter for FilterCurrencies. - * Allows fetching components allocation with matching currency based on provided values. Use in - * query `filter[currencies]=EUR,USD`. - * @return Returns the List of String - */ - @JsonGetter("filter[currencies]") - @JsonInclude(JsonInclude.Include.NON_NULL) - public List getFilterCurrencies() { - return filterCurrencies; - } - - /** - * Setter for FilterCurrencies. - * Allows fetching components allocation with matching currency based on provided values. Use in - * query `filter[currencies]=EUR,USD`. - * @param filterCurrencies Value for List of String - */ - @JsonSetter("filter[currencies]") - public void setFilterCurrencies(List filterCurrencies) { - this.filterCurrencies = filterCurrencies; - } - /** * Converts this ListSubscriptionComponentsInput into string format. * @return String representation of this class @@ -385,12 +356,11 @@ public void setFilterCurrencies(List filterCurrencies) { @Override public String toString() { return "ListSubscriptionComponentsInput [" + "subscriptionId=" + subscriptionId - + ", dateField=" + dateField + ", direction=" + direction + ", endDate=" + endDate - + ", endDatetime=" + endDatetime + ", pricePointIds=" + pricePointIds - + ", productFamilyIds=" + productFamilyIds + ", sort=" + sort + ", startDate=" - + startDate + ", startDatetime=" + startDatetime + ", include=" + include - + ", filterUseSiteExchangeRate=" + filterUseSiteExchangeRate + ", filterCurrencies=" - + filterCurrencies + "]"; + + ", dateField=" + dateField + ", direction=" + direction + ", filter=" + filter + + ", endDate=" + endDate + ", endDatetime=" + endDatetime + ", pricePointIds=" + + pricePointIds + ", productFamilyIds=" + productFamilyIds + ", sort=" + sort + + ", startDate=" + startDate + ", startDatetime=" + startDatetime + ", include=" + + include + "]"; } /** @@ -402,6 +372,7 @@ public Builder toBuilder() { Builder builder = new Builder(subscriptionId) .dateField(getDateField()) .direction(getDirection()) + .filter(getFilter()) .endDate(getEndDate()) .endDatetime(getEndDatetime()) .pricePointIds(getPricePointIds()) @@ -409,9 +380,7 @@ public Builder toBuilder() { .sort(getSort()) .startDate(getStartDate()) .startDatetime(getStartDatetime()) - .include(getInclude()) - .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()) - .filterCurrencies(getFilterCurrencies()); + .include(getInclude()); return builder; } @@ -422,6 +391,7 @@ public static class Builder { private int subscriptionId; private SubscriptionListDateField dateField; private SortingDirection direction; + private ListSubscriptionComponentsFilter filter; private String endDate; private String endDatetime; private IncludeNotNull pricePointIds; @@ -430,8 +400,6 @@ public static class Builder { private String startDate; private String startDatetime; private ListSubscriptionComponentsInclude include; - private Boolean filterUseSiteExchangeRate; - private List filterCurrencies; /** * Initialization constructor. @@ -477,6 +445,16 @@ public Builder direction(SortingDirection direction) { return this; } + /** + * Setter for filter. + * @param filter ListSubscriptionComponentsFilter value for filter. + * @return Builder + */ + public Builder filter(ListSubscriptionComponentsFilter filter) { + this.filter = filter; + return this; + } + /** * Setter for endDate. * @param endDate String value for endDate. @@ -557,34 +535,14 @@ public Builder include(ListSubscriptionComponentsInclude include) { return this; } - /** - * Setter for filterUseSiteExchangeRate. - * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. - * @return Builder - */ - public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { - this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; - return this; - } - - /** - * Setter for filterCurrencies. - * @param filterCurrencies List of String value for filterCurrencies. - * @return Builder - */ - public Builder filterCurrencies(List filterCurrencies) { - this.filterCurrencies = filterCurrencies; - return this; - } - /** * Builds a new {@link ListSubscriptionComponentsInput} object using the set fields. * @return {@link ListSubscriptionComponentsInput} */ public ListSubscriptionComponentsInput build() { - return new ListSubscriptionComponentsInput(subscriptionId, dateField, direction, + return new ListSubscriptionComponentsInput(subscriptionId, dateField, direction, filter, endDate, endDatetime, pricePointIds, productFamilyIds, sort, startDate, - startDatetime, include, filterUseSiteExchangeRate, filterCurrencies); + startDatetime, include); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsSort.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsSort.java index 11fed415..c4b874d3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsSort.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsSort.java @@ -42,8 +42,7 @@ public enum ListSubscriptionComponentsSort { @JsonCreator public static ListSubscriptionComponentsSort constructFromString(String toConvert) throws IOException { ListSubscriptionComponentsSort enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java index b23a1f00..e4ebce24 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java @@ -103,7 +103,7 @@ public void setPerPage(Integer perPage) { * in query: `include[]=account_balances` * @return Returns the List of SubscriptionGroupsListInclude */ - @JsonGetter("include[]") + @JsonGetter("include") @JsonInclude(JsonInclude.Include.NON_NULL) public List getInclude() { return include; @@ -116,7 +116,7 @@ public List getInclude() { * in query: `include[]=account_balances` * @param include Value for List of SubscriptionGroupsListInclude */ - @JsonSetter("include[]") + @JsonSetter("include") public void setInclude(List include) { this.include = include; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java index 1d4dee35..b1ccaa6f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java @@ -447,7 +447,7 @@ public void setSort(SubscriptionSort sort) { * `include[]=self_service_page_token`. * @return Returns the List of SubscriptionListInclude */ - @JsonGetter("include[]") + @JsonGetter("include") @JsonInclude(JsonInclude.Include.NON_NULL) public List getInclude() { return include; @@ -459,7 +459,7 @@ public List getInclude() { * `include[]=self_service_page_token`. * @param include Value for List of SubscriptionListInclude */ - @JsonSetter("include[]") + @JsonSetter("include") public void setInclude(List include) { this.include = include; } diff --git a/src/main/java/com/maxio/advancedbilling/models/MetafieldInput.java b/src/main/java/com/maxio/advancedbilling/models/MetafieldInput.java index 974d3ce6..236beb9f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/MetafieldInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/MetafieldInput.java @@ -50,8 +50,7 @@ public enum MetafieldInput { @JsonCreator public static MetafieldInput constructFromString(String toConvert) throws IOException { MetafieldInput enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentType.java b/src/main/java/com/maxio/advancedbilling/models/PaymentType.java index cb29a8e9..0351aaa7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentType.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentType.java @@ -46,8 +46,7 @@ public enum PaymentType { @JsonCreator public static PaymentType constructFromString(String toConvert) throws IOException { PaymentType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/PrepaidProductPricePointFilter.java b/src/main/java/com/maxio/advancedbilling/models/PrepaidProductPricePointFilter.java new file mode 100644 index 00000000..6629a02f --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/PrepaidProductPricePointFilter.java @@ -0,0 +1,114 @@ +/* + * 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.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for PrepaidProductPricePointFilter type. + */ +public class PrepaidProductPricePointFilter + extends BaseModel { + private String productPricePointId; + + /** + * Default constructor. + */ + public PrepaidProductPricePointFilter() { + productPricePointId = "not_null"; + } + + /** + * Initialization constructor. + * @param productPricePointId String value for productPricePointId. + */ + public PrepaidProductPricePointFilter( + String productPricePointId) { + this.productPricePointId = productPricePointId; + } + + /** + * Getter for ProductPricePointId. + * Passed as a parameter to list methods to return only non null values. + * @return Returns the String + */ + @JsonGetter("product_price_point_id") + public String getProductPricePointId() { + return productPricePointId; + } + + /** + * Setter for ProductPricePointId. + * Passed as a parameter to list methods to return only non null values. + * @param productPricePointId Value for String + */ + @JsonSetter("product_price_point_id") + private void setProductPricePointId(String productPricePointId) { + this.productPricePointId = productPricePointId; + } + + /** + * Converts this PrepaidProductPricePointFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "PrepaidProductPricePointFilter [" + "productPricePointId=" + productPricePointId + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link PrepaidProductPricePointFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link PrepaidProductPricePointFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(productPricePointId); + return builder; + } + + /** + * Class to build instances of {@link PrepaidProductPricePointFilter}. + */ + public static class Builder { + private String productPricePointId = "not_null"; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param productPricePointId String value for productPricePointId. + */ + public Builder(String productPricePointId) { + this.productPricePointId = productPricePointId; + } + + /** + * Setter for productPricePointId. + * @param productPricePointId String value for productPricePointId. + * @return Builder + */ + public Builder productPricePointId(String productPricePointId) { + this.productPricePointId = productPricePointId; + return this; + } + + /** + * Builds a new {@link PrepaidProductPricePointFilter} object using the set fields. + * @return {@link PrepaidProductPricePointFilter} + */ + public PrepaidProductPricePointFilter build() { + return new PrepaidProductPricePointFilter(productPricePointId); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/PrepaymentMethod.java b/src/main/java/com/maxio/advancedbilling/models/PrepaymentMethod.java index f3160906..4d20d5a9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PrepaymentMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/PrepaymentMethod.java @@ -62,8 +62,7 @@ public enum PrepaymentMethod { @JsonCreator public static PrepaymentMethod constructFromString(String toConvert) throws IOException { PrepaymentMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/PricePointType.java b/src/main/java/com/maxio/advancedbilling/models/PricePointType.java index 4fac99c0..c7c0d3f5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PricePointType.java +++ b/src/main/java/com/maxio/advancedbilling/models/PricePointType.java @@ -46,8 +46,7 @@ public enum PricePointType { @JsonCreator public static PricePointType constructFromString(String toConvert) throws IOException { PricePointType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/PricingScheme.java b/src/main/java/com/maxio/advancedbilling/models/PricingScheme.java index 36dc2c83..3f2cf806 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PricingScheme.java +++ b/src/main/java/com/maxio/advancedbilling/models/PricingScheme.java @@ -50,8 +50,7 @@ public enum PricingScheme { @JsonCreator public static PricingScheme constructFromString(String toConvert) throws IOException { PricingScheme enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/Product.java b/src/main/java/com/maxio/advancedbilling/models/Product.java index a1734dad..a90998db 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Product.java +++ b/src/main/java/com/maxio/advancedbilling/models/Product.java @@ -12,8 +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.ProductExpirationIntervalUnit; -import com.maxio.advancedbilling.models.containers.ProductTrialIntervalUnit; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -31,7 +29,7 @@ public class Product private OptionalNullable accountingCode; private Boolean requestCreditCard; private OptionalNullable expirationInterval; - private OptionalNullable expirationIntervalUnit; + private OptionalNullable expirationIntervalUnit; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; private Long priceInCents; @@ -40,7 +38,7 @@ public class Product private OptionalNullable initialChargeInCents; private OptionalNullable trialPriceInCents; private OptionalNullable trialInterval; - private OptionalNullable trialIntervalUnit; + private OptionalNullable trialIntervalUnit; private OptionalNullable archivedAt; private Boolean requireCreditCard; private OptionalNullable returnParams; @@ -77,8 +75,7 @@ public Product() { * @param accountingCode String value for accountingCode. * @param requestCreditCard Boolean value for requestCreditCard. * @param expirationInterval Integer value for expirationInterval. - * @param expirationIntervalUnit ProductExpirationIntervalUnit value for - * expirationIntervalUnit. + * @param expirationIntervalUnit ExtendedIntervalUnit value for expirationIntervalUnit. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. * @param priceInCents Long value for priceInCents. @@ -87,7 +84,7 @@ public Product() { * @param initialChargeInCents Long value for initialChargeInCents. * @param trialPriceInCents Long value for trialPriceInCents. * @param trialInterval Integer value for trialInterval. - * @param trialIntervalUnit ProductTrialIntervalUnit value for trialIntervalUnit. + * @param trialIntervalUnit IntervalUnit value for trialIntervalUnit. * @param archivedAt ZonedDateTime value for archivedAt. * @param requireCreditCard Boolean value for requireCreditCard. * @param returnParams String value for returnParams. @@ -117,7 +114,7 @@ public Product( String accountingCode, Boolean requestCreditCard, Integer expirationInterval, - ProductExpirationIntervalUnit expirationIntervalUnit, + ExtendedIntervalUnit expirationIntervalUnit, ZonedDateTime createdAt, ZonedDateTime updatedAt, Long priceInCents, @@ -126,7 +123,7 @@ public Product( Long initialChargeInCents, Long trialPriceInCents, Integer trialInterval, - ProductTrialIntervalUnit trialIntervalUnit, + IntervalUnit trialIntervalUnit, ZonedDateTime archivedAt, Boolean requireCreditCard, String returnParams, @@ -195,8 +192,7 @@ public Product( * @param accountingCode String value for accountingCode. * @param requestCreditCard Boolean value for requestCreditCard. * @param expirationInterval Integer value for expirationInterval. - * @param expirationIntervalUnit ProductExpirationIntervalUnit value for - * expirationIntervalUnit. + * @param expirationIntervalUnit ExtendedIntervalUnit value for expirationIntervalUnit. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. * @param priceInCents Long value for priceInCents. @@ -205,7 +201,7 @@ public Product( * @param initialChargeInCents Long value for initialChargeInCents. * @param trialPriceInCents Long value for trialPriceInCents. * @param trialInterval Integer value for trialInterval. - * @param trialIntervalUnit ProductTrialIntervalUnit value for trialIntervalUnit. + * @param trialIntervalUnit IntervalUnit value for trialIntervalUnit. * @param archivedAt ZonedDateTime value for archivedAt. * @param requireCreditCard Boolean value for requireCreditCard. * @param returnParams String value for returnParams. @@ -231,11 +227,11 @@ public Product( protected Product(Integer id, String name, OptionalNullable handle, OptionalNullable description, OptionalNullable accountingCode, Boolean requestCreditCard, OptionalNullable expirationInterval, - OptionalNullable expirationIntervalUnit, - ZonedDateTime createdAt, ZonedDateTime updatedAt, Long priceInCents, Integer interval, - IntervalUnit intervalUnit, OptionalNullable initialChargeInCents, - OptionalNullable trialPriceInCents, OptionalNullable trialInterval, - OptionalNullable trialIntervalUnit, + OptionalNullable expirationIntervalUnit, ZonedDateTime createdAt, + ZonedDateTime updatedAt, Long priceInCents, Integer interval, IntervalUnit intervalUnit, + OptionalNullable initialChargeInCents, OptionalNullable trialPriceInCents, + OptionalNullable trialInterval, + OptionalNullable trialIntervalUnit, OptionalNullable archivedAt, Boolean requireCreditCard, OptionalNullable returnParams, Boolean taxable, OptionalNullable updateReturnUrl, Boolean initialChargeAfterTrial, @@ -515,31 +511,31 @@ public void unsetExpirationInterval() { /** * Internal Getter for ExpirationIntervalUnit. * A string representing the expiration interval unit for this product, either month or day - * @return Returns the Internal ProductExpirationIntervalUnit + * @return Returns the Internal ExtendedIntervalUnit */ @JsonGetter("expiration_interval_unit") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetExpirationIntervalUnit() { + protected OptionalNullable internalGetExpirationIntervalUnit() { return this.expirationIntervalUnit; } /** * Getter for ExpirationIntervalUnit. * A string representing the expiration interval unit for this product, either month or day - * @return Returns the ProductExpirationIntervalUnit + * @return Returns the ExtendedIntervalUnit */ - public ProductExpirationIntervalUnit getExpirationIntervalUnit() { + public ExtendedIntervalUnit getExpirationIntervalUnit() { return OptionalNullable.getFrom(expirationIntervalUnit); } /** * Setter for ExpirationIntervalUnit. * A string representing the expiration interval unit for this product, either month or day - * @param expirationIntervalUnit Value for ProductExpirationIntervalUnit + * @param expirationIntervalUnit Value for ExtendedIntervalUnit */ @JsonSetter("expiration_interval_unit") - public void setExpirationIntervalUnit(ProductExpirationIntervalUnit expirationIntervalUnit) { + public void setExpirationIntervalUnit(ExtendedIntervalUnit expirationIntervalUnit) { this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); } @@ -790,31 +786,31 @@ public void unsetTrialInterval() { /** * Internal Getter for TrialIntervalUnit. * A string representing the trial interval unit for this product, either month or day - * @return Returns the Internal ProductTrialIntervalUnit + * @return Returns the Internal IntervalUnit */ @JsonGetter("trial_interval_unit") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetTrialIntervalUnit() { + protected OptionalNullable internalGetTrialIntervalUnit() { return this.trialIntervalUnit; } /** * Getter for TrialIntervalUnit. * A string representing the trial interval unit for this product, either month or day - * @return Returns the ProductTrialIntervalUnit + * @return Returns the IntervalUnit */ - public ProductTrialIntervalUnit getTrialIntervalUnit() { + public IntervalUnit getTrialIntervalUnit() { return OptionalNullable.getFrom(trialIntervalUnit); } /** * Setter for TrialIntervalUnit. * A string representing the trial interval unit for this product, either month or day - * @param trialIntervalUnit Value for ProductTrialIntervalUnit + * @param trialIntervalUnit Value for IntervalUnit */ @JsonSetter("trial_interval_unit") - public void setTrialIntervalUnit(ProductTrialIntervalUnit trialIntervalUnit) { + public void setTrialIntervalUnit(IntervalUnit trialIntervalUnit) { this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit); } @@ -1476,7 +1472,7 @@ public static class Builder { private OptionalNullable accountingCode; private Boolean requestCreditCard; private OptionalNullable expirationInterval; - private OptionalNullable expirationIntervalUnit; + private OptionalNullable expirationIntervalUnit; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; private Long priceInCents; @@ -1485,7 +1481,7 @@ public static class Builder { private OptionalNullable initialChargeInCents; private OptionalNullable trialPriceInCents; private OptionalNullable trialInterval; - private OptionalNullable trialIntervalUnit; + private OptionalNullable trialIntervalUnit; private OptionalNullable archivedAt; private Boolean requireCreditCard; private OptionalNullable returnParams; @@ -1617,12 +1613,10 @@ public Builder unsetExpirationInterval() { /** * Setter for expirationIntervalUnit. - * @param expirationIntervalUnit ProductExpirationIntervalUnit value for - * expirationIntervalUnit. + * @param expirationIntervalUnit ExtendedIntervalUnit value for expirationIntervalUnit. * @return Builder */ - public Builder expirationIntervalUnit( - ProductExpirationIntervalUnit expirationIntervalUnit) { + public Builder expirationIntervalUnit(ExtendedIntervalUnit expirationIntervalUnit) { this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); return this; } @@ -1745,10 +1739,10 @@ public Builder unsetTrialInterval() { /** * Setter for trialIntervalUnit. - * @param trialIntervalUnit ProductTrialIntervalUnit value for trialIntervalUnit. + * @param trialIntervalUnit IntervalUnit value for trialIntervalUnit. * @return Builder */ - public Builder trialIntervalUnit(ProductTrialIntervalUnit trialIntervalUnit) { + public Builder trialIntervalUnit(IntervalUnit trialIntervalUnit) { this.trialIntervalUnit = OptionalNullable.of(trialIntervalUnit); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceDiscountSourceType.java b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceDiscountSourceType.java index 5abb77dd..0bf4e07a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceDiscountSourceType.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceDiscountSourceType.java @@ -42,8 +42,7 @@ public enum ProformaInvoiceDiscountSourceType { @JsonCreator public static ProformaInvoiceDiscountSourceType constructFromString(String toConvert) throws IOException { ProformaInvoiceDiscountSourceType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceRole.java b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceRole.java index 2be44f98..b9f73606 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceRole.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceRole.java @@ -50,8 +50,7 @@ public enum ProformaInvoiceRole { @JsonCreator public static ProformaInvoiceRole constructFromString(String toConvert) throws IOException { ProformaInvoiceRole enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceStatus.java b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceStatus.java index 38335f04..9764dae8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceStatus.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceStatus.java @@ -46,8 +46,7 @@ public enum ProformaInvoiceStatus { @JsonCreator public static ProformaInvoiceStatus constructFromString(String toConvert) throws IOException { ProformaInvoiceStatus enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceTaxSourceType.java b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceTaxSourceType.java index b9985bb7..61e1339e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceTaxSourceType.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoiceTaxSourceType.java @@ -42,8 +42,7 @@ public enum ProformaInvoiceTaxSourceType { @JsonCreator public static ProformaInvoiceTaxSourceType constructFromString(String toConvert) throws IOException { ProformaInvoiceTaxSourceType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ReactivationCharge.java b/src/main/java/com/maxio/advancedbilling/models/ReactivationCharge.java index e50341fa..6349bc8d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ReactivationCharge.java +++ b/src/main/java/com/maxio/advancedbilling/models/ReactivationCharge.java @@ -46,8 +46,7 @@ public enum ReactivationCharge { @JsonCreator public static ReactivationCharge constructFromString(String toConvert) throws IOException { ReactivationCharge enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/RecordPaymentResponse.java b/src/main/java/com/maxio/advancedbilling/models/RecordPaymentResponse.java index c82565d9..29aab1a3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/RecordPaymentResponse.java +++ b/src/main/java/com/maxio/advancedbilling/models/RecordPaymentResponse.java @@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.maxio.advancedbilling.models.containers.RecordPaymentResponsePrepayment; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.util.List; @@ -21,7 +20,7 @@ public class RecordPaymentResponse extends BaseModel { private List paidInvoices; - private OptionalNullable prepayment; + private OptionalNullable prepayment; /** * Default constructor. @@ -32,11 +31,11 @@ public RecordPaymentResponse() { /** * Initialization constructor. * @param paidInvoices List of PaidInvoice value for paidInvoices. - * @param prepayment RecordPaymentResponsePrepayment value for prepayment. + * @param prepayment InvoicePrePayment value for prepayment. */ public RecordPaymentResponse( List paidInvoices, - RecordPaymentResponsePrepayment prepayment) { + InvoicePrePayment prepayment) { this.paidInvoices = paidInvoices; this.prepayment = OptionalNullable.of(prepayment); } @@ -44,11 +43,11 @@ public RecordPaymentResponse( /** * Initialization constructor. * @param paidInvoices List of PaidInvoice value for paidInvoices. - * @param prepayment RecordPaymentResponsePrepayment value for prepayment. + * @param prepayment InvoicePrePayment value for prepayment. */ protected RecordPaymentResponse(List paidInvoices, - OptionalNullable prepayment) { + OptionalNullable prepayment) { this.paidInvoices = paidInvoices; this.prepayment = prepayment; } @@ -74,29 +73,29 @@ public void setPaidInvoices(List paidInvoices) { /** * Internal Getter for Prepayment. - * @return Returns the Internal RecordPaymentResponsePrepayment + * @return Returns the Internal InvoicePrePayment */ @JsonGetter("prepayment") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetPrepayment() { + protected OptionalNullable internalGetPrepayment() { return this.prepayment; } /** * Getter for Prepayment. - * @return Returns the RecordPaymentResponsePrepayment + * @return Returns the InvoicePrePayment */ - public RecordPaymentResponsePrepayment getPrepayment() { + public InvoicePrePayment getPrepayment() { return OptionalNullable.getFrom(prepayment); } /** * Setter for Prepayment. - * @param prepayment Value for RecordPaymentResponsePrepayment + * @param prepayment Value for InvoicePrePayment */ @JsonSetter("prepayment") - public void setPrepayment(RecordPaymentResponsePrepayment prepayment) { + public void setPrepayment(InvoicePrePayment prepayment) { this.prepayment = OptionalNullable.of(prepayment); } @@ -134,7 +133,7 @@ public Builder toBuilder() { */ public static class Builder { private List paidInvoices; - private OptionalNullable prepayment; + private OptionalNullable prepayment; @@ -150,10 +149,10 @@ public Builder paidInvoices(List paidInvoices) { /** * Setter for prepayment. - * @param prepayment RecordPaymentResponsePrepayment value for prepayment. + * @param prepayment InvoicePrePayment value for prepayment. * @return Builder */ - public Builder prepayment(RecordPaymentResponsePrepayment prepayment) { + public Builder prepayment(InvoicePrePayment prepayment) { this.prepayment = OptionalNullable.of(prepayment); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java b/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java index b8a0cdb9..20c8c4fc 100644 --- a/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java +++ b/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java @@ -46,8 +46,7 @@ public enum RecurringScheme { @JsonCreator public static RecurringScheme constructFromString(String toConvert) throws IOException { RecurringScheme enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ResourceType.java b/src/main/java/com/maxio/advancedbilling/models/ResourceType.java index 9ca7c0d3..67b05fdd 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ResourceType.java +++ b/src/main/java/com/maxio/advancedbilling/models/ResourceType.java @@ -42,8 +42,7 @@ public enum ResourceType { @JsonCreator public static ResourceType constructFromString(String toConvert) throws IOException { ResourceType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/RestrictionType.java b/src/main/java/com/maxio/advancedbilling/models/RestrictionType.java index a672dd24..5b7bfdc7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/RestrictionType.java +++ b/src/main/java/com/maxio/advancedbilling/models/RestrictionType.java @@ -42,8 +42,7 @@ public enum RestrictionType { @JsonCreator public static RestrictionType constructFromString(String toConvert) throws IOException { RestrictionType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ResumptionCharge.java b/src/main/java/com/maxio/advancedbilling/models/ResumptionCharge.java index a5c319ef..31524f9c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ResumptionCharge.java +++ b/src/main/java/com/maxio/advancedbilling/models/ResumptionCharge.java @@ -46,8 +46,7 @@ public enum ResumptionCharge { @JsonCreator public static ResumptionCharge constructFromString(String toConvert) throws IOException { ResumptionCharge enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/ServiceCreditType.java b/src/main/java/com/maxio/advancedbilling/models/ServiceCreditType.java index 6802e9fc..6f174402 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ServiceCreditType.java +++ b/src/main/java/com/maxio/advancedbilling/models/ServiceCreditType.java @@ -42,8 +42,7 @@ public enum ServiceCreditType { @JsonCreator public static ServiceCreditType constructFromString(String toConvert) throws IOException { ServiceCreditType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SnapDay.java b/src/main/java/com/maxio/advancedbilling/models/SnapDay.java index e7ba434e..40d24884 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SnapDay.java +++ b/src/main/java/com/maxio/advancedbilling/models/SnapDay.java @@ -38,8 +38,7 @@ public enum SnapDay { @JsonCreator public static SnapDay constructFromString(String toConvert) throws IOException { SnapDay enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SortingDirection.java b/src/main/java/com/maxio/advancedbilling/models/SortingDirection.java index ad72c646..e3f4c997 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SortingDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/SortingDirection.java @@ -42,8 +42,7 @@ public enum SortingDirection { @JsonCreator public static SortingDirection constructFromString(String toConvert) throws IOException { SortingDirection enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/Subscription.java b/src/main/java/com/maxio/advancedbilling/models/Subscription.java index 81f24df4..993f6064 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Subscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/Subscription.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.SubscriptionGroup2; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -52,7 +51,7 @@ public class Subscription private Customer customer; private Product product; private CreditCardPaymentProfile creditCard; - private OptionalNullable group; + private OptionalNullable group; private BankAccountPaymentProfile bankAccount; private OptionalNullable paymentType; private OptionalNullable referralCode; @@ -124,7 +123,7 @@ public Subscription() { * @param customer Customer value for customer. * @param product Product value for product. * @param creditCard CreditCardPaymentProfile value for creditCard. - * @param group SubscriptionGroup2 value for group. + * @param group NestedSubscriptionGroup value for group. * @param bankAccount BankAccountPaymentProfile value for bankAccount. * @param paymentType String value for paymentType. * @param referralCode String value for referralCode. @@ -189,7 +188,7 @@ public Subscription( Customer customer, Product product, CreditCardPaymentProfile creditCard, - SubscriptionGroup2 group, + NestedSubscriptionGroup group, BankAccountPaymentProfile bankAccount, String paymentType, String referralCode, @@ -318,7 +317,7 @@ public Subscription( * @param customer Customer value for customer. * @param product Product value for product. * @param creditCard CreditCardPaymentProfile value for creditCard. - * @param group SubscriptionGroup2 value for group. + * @param group NestedSubscriptionGroup value for group. * @param bankAccount BankAccountPaymentProfile value for bankAccount. * @param paymentType String value for paymentType. * @param referralCode String value for referralCode. @@ -368,7 +367,7 @@ protected Subscription(Integer id, SubscriptionState state, Long balanceInCents, OptionalNullable delayedCancelAt, OptionalNullable couponCode, OptionalNullable snapDay, CollectionMethod paymentCollectionMethod, Customer customer, Product product, CreditCardPaymentProfile creditCard, - OptionalNullable group, BankAccountPaymentProfile bankAccount, + OptionalNullable group, BankAccountPaymentProfile bankAccount, OptionalNullable paymentType, OptionalNullable referralCode, OptionalNullable nextProductId, OptionalNullable nextProductHandle, OptionalNullable couponUseCount, OptionalNullable couponUsesAllowed, @@ -1379,29 +1378,29 @@ public void setCreditCard(CreditCardPaymentProfile creditCard) { /** * Internal Getter for Group. - * @return Returns the Internal SubscriptionGroup2 + * @return Returns the Internal NestedSubscriptionGroup */ @JsonGetter("group") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetGroup() { + protected OptionalNullable internalGetGroup() { return this.group; } /** * Getter for Group. - * @return Returns the SubscriptionGroup2 + * @return Returns the NestedSubscriptionGroup */ - public SubscriptionGroup2 getGroup() { + public NestedSubscriptionGroup getGroup() { return OptionalNullable.getFrom(group); } /** * Setter for Group. - * @param group Value for SubscriptionGroup2 + * @param group Value for NestedSubscriptionGroup */ @JsonSetter("group") - public void setGroup(SubscriptionGroup2 group) { + public void setGroup(NestedSubscriptionGroup group) { this.group = OptionalNullable.of(group); } @@ -1865,7 +1864,8 @@ public void unsetPayerId() { /** * Getter for CurrentBillingAmountInCents. - * The balance in cents plus the estimated renewal amount in cents. + * The balance in cents plus the estimated renewal amount in cents. Returned ONLY for + * readSubscription operation as it's compute intensive operation. * @return Returns the Long */ @JsonGetter("current_billing_amount_in_cents") @@ -1876,7 +1876,8 @@ public Long getCurrentBillingAmountInCents() { /** * Setter for CurrentBillingAmountInCents. - * The balance in cents plus the estimated renewal amount in cents. + * The balance in cents plus the estimated renewal amount in cents. Returned ONLY for + * readSubscription operation as it's compute intensive operation. * @param currentBillingAmountInCents Value for Long */ @JsonSetter("current_billing_amount_in_cents") @@ -2603,7 +2604,7 @@ public static class Builder { private Customer customer; private Product product; private CreditCardPaymentProfile creditCard; - private OptionalNullable group; + private OptionalNullable group; private BankAccountPaymentProfile bankAccount; private OptionalNullable paymentType; private OptionalNullable referralCode; @@ -3021,10 +3022,10 @@ public Builder creditCard(CreditCardPaymentProfile creditCard) { /** * Setter for group. - * @param group SubscriptionGroup2 value for group. + * @param group NestedSubscriptionGroup value for group. * @return Builder */ - public Builder group(SubscriptionGroup2 group) { + public Builder group(NestedSubscriptionGroup group) { this.group = OptionalNullable.of(group); 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 91aeb5c9..99d8d876 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java @@ -14,7 +14,6 @@ import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.models.containers.SubscriptionComponentAllocatedQuantity; import com.maxio.advancedbilling.models.containers.SubscriptionComponentPricePointType; -import com.maxio.advancedbilling.models.containers.SubscriptionComponentPricingScheme; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -32,7 +31,7 @@ public class SubscriptionComponent private Integer unitBalance; private String currency; private SubscriptionComponentAllocatedQuantity allocatedQuantity; - private OptionalNullable pricingScheme; + private OptionalNullable pricingScheme; private Integer componentId; private OptionalNullable componentHandle; private Integer subscriptionId; @@ -73,7 +72,7 @@ public SubscriptionComponent() { * @param currency String value for currency. * @param allocatedQuantity SubscriptionComponentAllocatedQuantity value for * allocatedQuantity. - * @param pricingScheme SubscriptionComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @param componentId Integer value for componentId. * @param componentHandle String value for componentHandle. * @param subscriptionId Integer value for subscriptionId. @@ -106,7 +105,7 @@ public SubscriptionComponent( Integer unitBalance, String currency, SubscriptionComponentAllocatedQuantity allocatedQuantity, - SubscriptionComponentPricingScheme pricingScheme, + PricingScheme pricingScheme, Integer componentId, String componentHandle, Integer subscriptionId, @@ -173,7 +172,7 @@ public SubscriptionComponent( * @param currency String value for currency. * @param allocatedQuantity SubscriptionComponentAllocatedQuantity value for * allocatedQuantity. - * @param pricingScheme SubscriptionComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @param componentId Integer value for componentId. * @param componentHandle String value for componentHandle. * @param subscriptionId Integer value for subscriptionId. @@ -201,7 +200,7 @@ public SubscriptionComponent( protected SubscriptionComponent(Integer id, String name, ComponentKind kind, String unitName, Boolean enabled, Integer unitBalance, String currency, SubscriptionComponentAllocatedQuantity allocatedQuantity, - OptionalNullable pricingScheme, Integer componentId, + OptionalNullable pricingScheme, Integer componentId, OptionalNullable componentHandle, Integer subscriptionId, Boolean recurring, OptionalNullable upgradeCharge, OptionalNullable downgradeCredit, @@ -408,29 +407,29 @@ public void setAllocatedQuantity(SubscriptionComponentAllocatedQuantity allocate /** * Internal Getter for PricingScheme. - * @return Returns the Internal SubscriptionComponentPricingScheme + * @return Returns the Internal PricingScheme */ @JsonGetter("pricing_scheme") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetPricingScheme() { + protected OptionalNullable internalGetPricingScheme() { return this.pricingScheme; } /** * Getter for PricingScheme. - * @return Returns the SubscriptionComponentPricingScheme + * @return Returns the PricingScheme */ - public SubscriptionComponentPricingScheme getPricingScheme() { + public PricingScheme getPricingScheme() { return OptionalNullable.getFrom(pricingScheme); } /** * Setter for PricingScheme. - * @param pricingScheme Value for SubscriptionComponentPricingScheme + * @param pricingScheme Value for PricingScheme */ @JsonSetter("pricing_scheme") - public void setPricingScheme(SubscriptionComponentPricingScheme pricingScheme) { + public void setPricingScheme(PricingScheme pricingScheme) { this.pricingScheme = OptionalNullable.of(pricingScheme); } @@ -1113,7 +1112,7 @@ public static class Builder { private Integer unitBalance; private String currency; private SubscriptionComponentAllocatedQuantity allocatedQuantity; - private OptionalNullable pricingScheme; + private OptionalNullable pricingScheme; private Integer componentId; private OptionalNullable componentHandle; private Integer subscriptionId; @@ -1223,10 +1222,10 @@ public Builder allocatedQuantity( /** * Setter for pricingScheme. - * @param pricingScheme SubscriptionComponentPricingScheme value for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. * @return Builder */ - public Builder pricingScheme(SubscriptionComponentPricingScheme pricingScheme) { + public Builder pricingScheme(PricingScheme pricingScheme) { this.pricingScheme = OptionalNullable.of(pricingScheme); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionDateField.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionDateField.java index 0e7d4d03..34c5a0bb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionDateField.java @@ -70,8 +70,7 @@ public enum SubscriptionDateField { @JsonCreator public static SubscriptionDateField constructFromString(String toConvert) throws IOException { SubscriptionDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionFilter.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionFilter.java new file mode 100644 index 00000000..f4daf4b9 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionFilter.java @@ -0,0 +1,342 @@ +/* + * 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.LocalDate; +import java.time.ZonedDateTime; +import java.util.List; + +/** + * This is a model class for SubscriptionFilter type. + */ +public class SubscriptionFilter + extends BaseModel { + private List states; + private SubscriptionListDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + + /** + * Default constructor. + */ + public SubscriptionFilter() { + } + + /** + * Initialization constructor. + * @param states List of SubscriptionStateFilter value for states. + * @param dateField SubscriptionListDateField value for dateField. + * @param startDate LocalDate value for startDate. + * @param endDate LocalDate value for endDate. + * @param startDatetime ZonedDateTime value for startDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + */ + public SubscriptionFilter( + List states, + SubscriptionListDateField dateField, + LocalDate startDate, + LocalDate endDate, + ZonedDateTime startDatetime, + ZonedDateTime endDatetime) { + this.states = states; + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + } + + /** + * Getter for States. + * Allows fetching components allocations that belong to the subscription with matching states + * based on provided values. To use this filter you also have to include the following param in + * the request `include=subscription`. Use in query + * `filter[subscription][states]=active,canceled&include=subscription`. + * @return Returns the List of SubscriptionStateFilter + */ + @JsonGetter("states") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getStates() { + return states; + } + + /** + * Setter for States. + * Allows fetching components allocations that belong to the subscription with matching states + * based on provided values. To use this filter you also have to include the following param in + * the request `include=subscription`. Use in query + * `filter[subscription][states]=active,canceled&include=subscription`. + * @param states Value for List of SubscriptionStateFilter + */ + @JsonSetter("states") + public void setStates(List states) { + this.states = states; + } + + /** + * Getter for DateField. + * The type of filter you'd like to apply to your search. To use this filter you also have to + * include the following param in the request `include=subscription`. + * @return Returns the SubscriptionListDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SubscriptionListDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you'd like to apply to your search. To use this filter you also have to + * include the following param in the request `include=subscription`. + * @param dateField Value for SubscriptionListDateField + */ + @JsonSetter("date_field") + public void setDateField(SubscriptionListDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components + * that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your + * site’s time zone on the date specified. To use this filter you also have to include the + * following param in the request `include=subscription`. + * @return Returns the LocalDate + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components + * that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your + * site’s time zone on the date specified. To use this filter you also have to include the + * following param in the request `include=subscription`. + * @param startDate Value for LocalDate + */ + @JsonSetter("start_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that + * belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s + * time zone on the date specified. To use this filter you also have to include the following + * param in the request `include=subscription`. + * @return Returns the LocalDate + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that + * belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s + * time zone on the date specified. To use this filter you also have to include the following + * param in the request `include=subscription`. + * @param endDate Value for LocalDate + */ + @JsonSetter("end_date") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + /** + * Getter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns components that belong to the subscription 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. To use this filter + * you also have to include the following param in the request `include=subscription`. + * @return Returns the ZonedDateTime + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getStartDatetime() { + return startDatetime; + } + + /** + * Setter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns components that belong to the subscription 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. To use this filter + * you also have to include the following param in the request `include=subscription`. + * @param startDatetime Value for ZonedDateTime + */ + @JsonSetter("start_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setStartDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you + * also have to include the following param in the request `include=subscription`. + * @return Returns the ZonedDateTime + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getEndDatetime() { + return endDatetime; + } + + /** + * Setter for EndDatetime. + * The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns components that belong to the subscription with a timestamp at or before 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 end_date. To use this filter you + * also have to include the following param in the request `include=subscription`. + * @param endDatetime Value for ZonedDateTime + */ + @JsonSetter("end_datetime") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setEndDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Converts this SubscriptionFilter into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "SubscriptionFilter [" + "states=" + states + ", dateField=" + dateField + + ", startDate=" + startDate + ", endDate=" + endDate + ", startDatetime=" + + startDatetime + ", endDatetime=" + endDatetime + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link SubscriptionFilter.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link SubscriptionFilter.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .states(getStates()) + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()); + return builder; + } + + /** + * Class to build instances of {@link SubscriptionFilter}. + */ + public static class Builder { + private List states; + private SubscriptionListDateField dateField; + private LocalDate startDate; + private LocalDate endDate; + private ZonedDateTime startDatetime; + private ZonedDateTime endDatetime; + + + + /** + * Setter for states. + * @param states List of SubscriptionStateFilter value for states. + * @return Builder + */ + public Builder states(List states) { + this.states = states; + return this; + } + + /** + * Setter for dateField. + * @param dateField SubscriptionListDateField value for dateField. + * @return Builder + */ + public Builder dateField(SubscriptionListDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDate. + * @param startDate LocalDate value for startDate. + * @return Builder + */ + public Builder startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate LocalDate value for endDate. + * @return Builder + */ + public Builder endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime ZonedDateTime value for startDatetime. + * @return Builder + */ + public Builder startDatetime(ZonedDateTime startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime ZonedDateTime value for endDatetime. + * @return Builder + */ + public Builder endDatetime(ZonedDateTime endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Builds a new {@link SubscriptionFilter} object using the set fields. + * @return {@link SubscriptionFilter} + */ + public SubscriptionFilter build() { + return new SubscriptionFilter(states, dateField, startDate, endDate, startDatetime, + endDatetime); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupInclude.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupInclude.java index 4c4569d6..55c9cf4f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupInclude.java @@ -38,8 +38,7 @@ public enum SubscriptionGroupInclude { @JsonCreator public static SubscriptionGroupInclude constructFromString(String toConvert) throws IOException { SubscriptionGroupInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentMethod.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentMethod.java index 13baf6da..5fe83808 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupPrepaymentMethod.java @@ -58,8 +58,7 @@ public enum SubscriptionGroupPrepaymentMethod { @JsonCreator public static SubscriptionGroupPrepaymentMethod constructFromString(String toConvert) throws IOException { SubscriptionGroupPrepaymentMethod enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupsListInclude.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupsListInclude.java index 4b90fd3e..62577c04 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupsListInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupsListInclude.java @@ -38,8 +38,7 @@ public enum SubscriptionGroupsListInclude { @JsonCreator public static SubscriptionGroupsListInclude constructFromString(String toConvert) throws IOException { SubscriptionGroupsListInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionInclude.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionInclude.java index 9a0e9ee5..60a30026 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionInclude.java @@ -42,8 +42,7 @@ public enum SubscriptionInclude { @JsonCreator public static SubscriptionInclude constructFromString(String toConvert) throws IOException { SubscriptionInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionListDateField.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionListDateField.java index 30bb397c..7af52000 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionListDateField.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionListDateField.java @@ -38,8 +38,7 @@ public enum SubscriptionListDateField { @JsonCreator public static SubscriptionListDateField constructFromString(String toConvert) throws IOException { SubscriptionListDateField enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionListInclude.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionListInclude.java index 4679cd5d..8980fd15 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionListInclude.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionListInclude.java @@ -38,8 +38,7 @@ public enum SubscriptionListInclude { @JsonCreator public static SubscriptionListInclude constructFromString(String toConvert) throws IOException { SubscriptionListInclude enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionPurgeType.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionPurgeType.java index 20a8e2e3..28b132c9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionPurgeType.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionPurgeType.java @@ -42,8 +42,7 @@ public enum SubscriptionPurgeType { @JsonCreator public static SubscriptionPurgeType constructFromString(String toConvert) throws IOException { SubscriptionPurgeType enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java index d147119b..a3a285a0 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java @@ -58,8 +58,7 @@ public enum SubscriptionSort { @JsonCreator public static SubscriptionSort constructFromString(String toConvert) throws IOException { SubscriptionSort enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionState.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionState.java index 88f7b8c5..61b7f8ae 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionState.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionState.java @@ -94,8 +94,7 @@ public enum SubscriptionState { @JsonCreator public static SubscriptionState constructFromString(String toConvert) throws IOException { SubscriptionState enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionStateFilter.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionStateFilter.java index e687503a..666e445a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionStateFilter.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionStateFilter.java @@ -82,8 +82,7 @@ public enum SubscriptionStateFilter { @JsonCreator public static SubscriptionStateFilter constructFromString(String toConvert) throws IOException { SubscriptionStateFilter enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/TaxConfigurationKind.java b/src/main/java/com/maxio/advancedbilling/models/TaxConfigurationKind.java index 374b2f32..d6ae4133 100644 --- a/src/main/java/com/maxio/advancedbilling/models/TaxConfigurationKind.java +++ b/src/main/java/com/maxio/advancedbilling/models/TaxConfigurationKind.java @@ -50,8 +50,7 @@ public enum TaxConfigurationKind { @JsonCreator public static TaxConfigurationKind constructFromString(String toConvert) throws IOException { TaxConfigurationKind enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/TaxDestinationAddress.java b/src/main/java/com/maxio/advancedbilling/models/TaxDestinationAddress.java index 618e372f..4f3cd85c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/TaxDestinationAddress.java +++ b/src/main/java/com/maxio/advancedbilling/models/TaxDestinationAddress.java @@ -50,8 +50,7 @@ public enum TaxDestinationAddress { @JsonCreator public static TaxDestinationAddress constructFromString(String toConvert) throws IOException { TaxDestinationAddress enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java b/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java index 229a803d..cc50ef45 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java @@ -36,6 +36,7 @@ public class UpdateCustomer private Boolean taxExempt; private String taxExemptReason; private OptionalNullable parentId; + private OptionalNullable verified; /** * Default constructor. @@ -63,6 +64,7 @@ public UpdateCustomer() { * @param taxExempt Boolean value for taxExempt. * @param taxExemptReason String value for taxExemptReason. * @param parentId Integer value for parentId. + * @param verified Boolean value for verified. */ public UpdateCustomer( String firstName, @@ -82,7 +84,8 @@ public UpdateCustomer( String vatNumber, Boolean taxExempt, String taxExemptReason, - Integer parentId) { + Integer parentId, + Boolean verified) { this.firstName = firstName; this.lastName = lastName; this.email = email; @@ -101,6 +104,7 @@ public UpdateCustomer( this.taxExempt = taxExempt; this.taxExemptReason = taxExemptReason; this.parentId = OptionalNullable.of(parentId); + this.verified = OptionalNullable.of(verified); } /** @@ -123,12 +127,14 @@ public UpdateCustomer( * @param taxExempt Boolean value for taxExempt. * @param taxExemptReason String value for taxExemptReason. * @param parentId Integer value for parentId. + * @param verified Boolean value for verified. */ protected UpdateCustomer(String firstName, String lastName, String email, String ccEmails, String organization, String reference, String address, String address2, String city, String state, String zip, String country, String phone, String locale, String vatNumber, - Boolean taxExempt, String taxExemptReason, OptionalNullable parentId) { + Boolean taxExempt, String taxExemptReason, OptionalNullable parentId, + OptionalNullable verified) { this.firstName = firstName; this.lastName = lastName; this.email = email; @@ -147,6 +153,7 @@ protected UpdateCustomer(String firstName, String lastName, String email, String this.taxExempt = taxExempt; this.taxExemptReason = taxExemptReason; this.parentId = parentId; + this.verified = verified; } /** @@ -509,6 +516,49 @@ public void unsetParentId() { parentId = null; } + /** + * Internal Getter for Verified. + * Is the customer verified to use ACH as a payment method. Available only on Authorize.Net + * gateway + * @return Returns the Internal Boolean + */ + @JsonGetter("verified") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetVerified() { + return this.verified; + } + + /** + * Getter for Verified. + * Is the customer verified to use ACH as a payment method. Available only on Authorize.Net + * gateway + * @return Returns the Boolean + */ + public Boolean getVerified() { + return OptionalNullable.getFrom(verified); + } + + /** + * Setter for Verified. + * Is the customer verified to use ACH as a payment method. Available only on Authorize.Net + * gateway + * @param verified Value for Boolean + */ + @JsonSetter("verified") + public void setVerified(Boolean verified) { + this.verified = OptionalNullable.of(verified); + } + + /** + * UnSetter for Verified. + * Is the customer verified to use ACH as a payment method. Available only on Authorize.Net + * gateway + */ + public void unsetVerified() { + verified = null; + } + /** * Converts this UpdateCustomer into string format. * @return String representation of this class @@ -521,8 +571,8 @@ public String toString() { + ", city=" + city + ", state=" + state + ", zip=" + zip + ", country=" + country + ", phone=" + phone + ", locale=" + locale + ", vatNumber=" + vatNumber + ", taxExempt=" + taxExempt + ", taxExemptReason=" + taxExemptReason - + ", parentId=" + parentId + ", additionalProperties=" + getAdditionalProperties() - + "]"; + + ", parentId=" + parentId + ", verified=" + verified + ", additionalProperties=" + + getAdditionalProperties() + "]"; } /** @@ -550,6 +600,7 @@ public Builder toBuilder() { .taxExempt(getTaxExempt()) .taxExemptReason(getTaxExemptReason()); builder.parentId = internalGetParentId(); + builder.verified = internalGetVerified(); return builder; } @@ -575,6 +626,7 @@ public static class Builder { private Boolean taxExempt; private String taxExemptReason; private OptionalNullable parentId; + private OptionalNullable verified; @@ -767,6 +819,25 @@ public Builder unsetParentId() { return this; } + /** + * Setter for verified. + * @param verified Boolean value for verified. + * @return Builder + */ + public Builder verified(Boolean verified) { + this.verified = OptionalNullable.of(verified); + return this; + } + + /** + * UnSetter for verified. + * @return Builder + */ + public Builder unsetVerified() { + verified = null; + return this; + } + /** * Builds a new {@link UpdateCustomer} object using the set fields. * @return {@link UpdateCustomer} @@ -774,7 +845,7 @@ public Builder unsetParentId() { public UpdateCustomer build() { return new UpdateCustomer(firstName, lastName, email, ccEmails, organization, reference, address, address2, city, state, zip, country, phone, locale, vatNumber, - taxExempt, taxExemptReason, parentId); + taxExempt, taxExemptReason, parentId, verified); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/VoidInvoiceEventData.java b/src/main/java/com/maxio/advancedbilling/models/VoidInvoiceEventData.java index 66b41bbb..382914a8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/VoidInvoiceEventData.java +++ b/src/main/java/com/maxio/advancedbilling/models/VoidInvoiceEventData.java @@ -13,7 +13,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.VoidInvoiceEventDataCreditNoteAttributes; import io.apimatic.core.types.BaseModel; import java.time.ZonedDateTime; @@ -22,7 +21,7 @@ */ public class VoidInvoiceEventData extends BaseModel { - private VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes; + private CreditNote creditNoteAttributes; private String memo; private String appliedAmount; private ZonedDateTime transactionTime; @@ -37,8 +36,7 @@ public VoidInvoiceEventData() { /** * Initialization constructor. - * @param creditNoteAttributes VoidInvoiceEventDataCreditNoteAttributes value for - * creditNoteAttributes. + * @param creditNoteAttributes CreditNote value for creditNoteAttributes. * @param memo String value for memo. * @param appliedAmount String value for appliedAmount. * @param transactionTime ZonedDateTime value for transactionTime. @@ -47,7 +45,7 @@ public VoidInvoiceEventData() { */ @JsonCreator public VoidInvoiceEventData( - @JsonProperty("credit_note_attributes") VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes, + @JsonProperty("credit_note_attributes") CreditNote creditNoteAttributes, @JsonProperty("memo") String memo, @JsonProperty("applied_amount") String appliedAmount, @JsonProperty("transaction_time") ZonedDateTime transactionTime, @@ -63,19 +61,19 @@ public VoidInvoiceEventData( /** * Getter for CreditNoteAttributes. - * @return Returns the VoidInvoiceEventDataCreditNoteAttributes + * @return Returns the CreditNote */ @JsonGetter("credit_note_attributes") - public VoidInvoiceEventDataCreditNoteAttributes getCreditNoteAttributes() { + public CreditNote getCreditNoteAttributes() { return creditNoteAttributes; } /** * Setter for CreditNoteAttributes. - * @param creditNoteAttributes Value for VoidInvoiceEventDataCreditNoteAttributes + * @param creditNoteAttributes Value for CreditNote */ @JsonSetter("credit_note_attributes") - public void setCreditNoteAttributes(VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes) { + public void setCreditNoteAttributes(CreditNote creditNoteAttributes) { this.creditNoteAttributes = creditNoteAttributes; } @@ -208,7 +206,7 @@ public Builder toBuilder() { * Class to build instances of {@link VoidInvoiceEventData}. */ public static class Builder { - private VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes; + private CreditNote creditNoteAttributes; private String memo; private String appliedAmount; private ZonedDateTime transactionTime; @@ -223,17 +221,15 @@ public Builder() { /** * Initialization constructor. - * @param creditNoteAttributes VoidInvoiceEventDataCreditNoteAttributes value for - * creditNoteAttributes. + * @param creditNoteAttributes CreditNote value for creditNoteAttributes. * @param memo String value for memo. * @param appliedAmount String value for appliedAmount. * @param transactionTime ZonedDateTime value for transactionTime. * @param isAdvanceInvoice boolean value for isAdvanceInvoice. * @param reason String value for reason. */ - public Builder(VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes, String memo, - String appliedAmount, ZonedDateTime transactionTime, boolean isAdvanceInvoice, - String reason) { + public Builder(CreditNote creditNoteAttributes, String memo, String appliedAmount, + ZonedDateTime transactionTime, boolean isAdvanceInvoice, String reason) { this.creditNoteAttributes = creditNoteAttributes; this.memo = memo; this.appliedAmount = appliedAmount; @@ -244,12 +240,10 @@ public Builder(VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes, St /** * Setter for creditNoteAttributes. - * @param creditNoteAttributes VoidInvoiceEventDataCreditNoteAttributes value for - * creditNoteAttributes. + * @param creditNoteAttributes CreditNote value for creditNoteAttributes. * @return Builder */ - public Builder creditNoteAttributes( - VoidInvoiceEventDataCreditNoteAttributes creditNoteAttributes) { + public Builder creditNoteAttributes(CreditNote creditNoteAttributes) { this.creditNoteAttributes = creditNoteAttributes; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/WebhookOrder.java b/src/main/java/com/maxio/advancedbilling/models/WebhookOrder.java index e06c0a36..30438658 100644 --- a/src/main/java/com/maxio/advancedbilling/models/WebhookOrder.java +++ b/src/main/java/com/maxio/advancedbilling/models/WebhookOrder.java @@ -42,8 +42,7 @@ public enum WebhookOrder { @JsonCreator public static WebhookOrder constructFromString(String toConvert) throws IOException { WebhookOrder enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/WebhookStatus.java b/src/main/java/com/maxio/advancedbilling/models/WebhookStatus.java index fa1df286..642fe032 100644 --- a/src/main/java/com/maxio/advancedbilling/models/WebhookStatus.java +++ b/src/main/java/com/maxio/advancedbilling/models/WebhookStatus.java @@ -50,8 +50,7 @@ public enum WebhookStatus { @JsonCreator public static WebhookStatus constructFromString(String toConvert) throws IOException { WebhookStatus enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java b/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java index cb2c9b81..8737fe4c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/WebhookSubscription.java @@ -174,8 +174,7 @@ public enum WebhookSubscription { @JsonCreator public static WebhookSubscription constructFromString(String toConvert) throws IOException { WebhookSubscription enumValue = fromString(toConvert); - if (enumValue == null) - { + if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } return enumValue; diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/AllocationPayment.java b/src/main/java/com/maxio/advancedbilling/models/containers/AllocationPayment.java deleted file mode 100644 index b47dcd3a..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/AllocationPayment.java +++ /dev/null @@ -1,102 +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.PaymentForAllocation; -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 = AllocationPayment.AllocationPaymentDeserializer.class) -public abstract class AllocationPayment { - - /** - * This is Payment for Allocation case. - * @param paymentForAllocation PaymentForAllocation value for paymentForAllocation. - * @return The PaymentForAllocationCase object. - */ - public static AllocationPayment fromPaymentForAllocation( - PaymentForAllocation paymentForAllocation) { - return paymentForAllocation == null ? null : new PaymentForAllocationCase(paymentForAllocation); - } - - /** - * 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 paymentForAllocation(PaymentForAllocation paymentForAllocation); - } - - /** - * This is a implementation class for PaymentForAllocationCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "PaymentForAllocation") - private static class PaymentForAllocationCase extends AllocationPayment { - - @JsonValue - private PaymentForAllocation paymentForAllocation; - - PaymentForAllocationCase(PaymentForAllocation paymentForAllocation) { - this.paymentForAllocation = paymentForAllocation; - } - - @Override - public R match(Cases cases) { - return cases.paymentForAllocation(this.paymentForAllocation); - } - - @JsonCreator - private PaymentForAllocationCase(JsonNode jsonNode) throws IOException { - this.paymentForAllocation = ApiHelper.deserialize(jsonNode, - PaymentForAllocation.class); - } - - @Override - public String toString() { - return paymentForAllocation.toString(); - } - } - - /** - * This is a custom deserializer class for AllocationPayment. - */ - protected static class AllocationPaymentDeserializer - extends JsonDeserializer { - - @Override - public AllocationPayment deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(PaymentForAllocationCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricePointIntervalUnit.java b/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricePointIntervalUnit.java deleted file mode 100644 index f7200680..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricePointIntervalUnit.java +++ /dev/null @@ -1,104 +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.IntervalUnit; -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 = ComponentPricePointIntervalUnit.ComponentPricePointIntervalUnitDeserializer.class) -public abstract class ComponentPricePointIntervalUnit { - - /** - * This is Interval Unit case. - * @param intervalUnit IntervalUnit value for intervalUnit. - * @return The IntervalUnitCase object. - */ - public static ComponentPricePointIntervalUnit fromIntervalUnit(IntervalUnit intervalUnit) { - return intervalUnit == null ? null : new IntervalUnitCase(intervalUnit); - } - - /** - * 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 intervalUnit(IntervalUnit intervalUnit); - } - - /** - * This is a implementation class for IntervalUnitCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "IntervalUnit") - private static class IntervalUnitCase extends ComponentPricePointIntervalUnit { - - @JsonValue - private IntervalUnit intervalUnit; - - IntervalUnitCase(IntervalUnit intervalUnit) { - this.intervalUnit = intervalUnit; - } - - @Override - public R match(Cases cases) { - return cases.intervalUnit(this.intervalUnit); - } - - @JsonCreator - private IntervalUnitCase(JsonNode jsonNode) throws IOException { - this.intervalUnit = - IntervalUnit.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.intervalUnit == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return intervalUnit.toString(); - } - } - - /** - * This is a custom deserializer class for ComponentPricePointIntervalUnit. - */ - protected static class ComponentPricePointIntervalUnitDeserializer - extends JsonDeserializer { - - @Override - public ComponentPricePointIntervalUnit deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(IntervalUnitCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricingScheme.java b/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricingScheme.java deleted file mode 100644 index c0b616b6..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ComponentPricingScheme.java +++ /dev/null @@ -1,104 +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.PricingScheme; -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 = ComponentPricingScheme.ComponentPricingSchemeDeserializer.class) -public abstract class ComponentPricingScheme { - - /** - * This is Pricing Scheme case. - * @param pricingScheme PricingScheme value for pricingScheme. - * @return The PricingSchemeCase object. - */ - public static ComponentPricingScheme fromPricingScheme(PricingScheme pricingScheme) { - return pricingScheme == null ? null : new PricingSchemeCase(pricingScheme); - } - - /** - * 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 pricingScheme(PricingScheme pricingScheme); - } - - /** - * This is a implementation class for PricingSchemeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "PricingScheme") - private static class PricingSchemeCase extends ComponentPricingScheme { - - @JsonValue - private PricingScheme pricingScheme; - - PricingSchemeCase(PricingScheme pricingScheme) { - this.pricingScheme = pricingScheme; - } - - @Override - public R match(Cases cases) { - return cases.pricingScheme(this.pricingScheme); - } - - @JsonCreator - private PricingSchemeCase(JsonNode jsonNode) throws IOException { - this.pricingScheme = - PricingScheme.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.pricingScheme == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return pricingScheme.toString(); - } - } - - /** - * This is a custom deserializer class for ComponentPricingScheme. - */ - protected static class ComponentPricingSchemeDeserializer - extends JsonDeserializer { - - @Override - public ComponentPricingScheme deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(PricingSchemeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeBillingAddress.java b/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeBillingAddress.java deleted file mode 100644 index 4ead71d6..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeBillingAddress.java +++ /dev/null @@ -1,101 +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.AddressChange; -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 = CustomerChangeBillingAddress.CustomerChangeBillingAddressDeserializer.class) -public abstract class CustomerChangeBillingAddress { - - /** - * This is Address Change case. - * @param addressChange AddressChange value for addressChange. - * @return The AddressChangeCase object. - */ - public static CustomerChangeBillingAddress fromAddressChange(AddressChange addressChange) { - return addressChange == null ? null : new AddressChangeCase(addressChange); - } - - /** - * 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 addressChange(AddressChange addressChange); - } - - /** - * This is a implementation class for AddressChangeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "AddressChange") - private static class AddressChangeCase extends CustomerChangeBillingAddress { - - @JsonValue - private AddressChange addressChange; - - AddressChangeCase(AddressChange addressChange) { - this.addressChange = addressChange; - } - - @Override - public R match(Cases cases) { - return cases.addressChange(this.addressChange); - } - - @JsonCreator - private AddressChangeCase(JsonNode jsonNode) throws IOException { - this.addressChange = ApiHelper.deserialize(jsonNode, - AddressChange.class); - } - - @Override - public String toString() { - return addressChange.toString(); - } - } - - /** - * This is a custom deserializer class for CustomerChangeBillingAddress. - */ - protected static class CustomerChangeBillingAddressDeserializer - extends JsonDeserializer { - - @Override - public CustomerChangeBillingAddress deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(AddressChangeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeCustomFields.java b/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeCustomFields.java deleted file mode 100644 index 77b78c2f..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeCustomFields.java +++ /dev/null @@ -1,103 +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.CustomerCustomFieldsChange; -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 = CustomerChangeCustomFields.CustomerChangeCustomFieldsDeserializer.class) -public abstract class CustomerChangeCustomFields { - - /** - * This is Customer Custom Fields Change case. - * @param customerCustomFieldsChange CustomerCustomFieldsChange value for customerCustomFieldsChange. - * @return The CustomerCustomFieldsChangeCase object. - */ - public static CustomerChangeCustomFields fromCustomerCustomFieldsChange( - CustomerCustomFieldsChange customerCustomFieldsChange) { - return customerCustomFieldsChange == null ? null : new CustomerCustomFieldsChangeCase(customerCustomFieldsChange); - } - - /** - * 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 customerCustomFieldsChange(CustomerCustomFieldsChange customerCustomFieldsChange); - } - - /** - * This is a implementation class for CustomerCustomFieldsChangeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "CustomerCustomFieldsChange") - private static class CustomerCustomFieldsChangeCase extends CustomerChangeCustomFields { - - @JsonValue - private CustomerCustomFieldsChange customerCustomFieldsChange; - - CustomerCustomFieldsChangeCase(CustomerCustomFieldsChange customerCustomFieldsChange) { - this.customerCustomFieldsChange = customerCustomFieldsChange; - } - - @Override - public R match(Cases cases) { - return cases.customerCustomFieldsChange(this.customerCustomFieldsChange); - } - - @JsonCreator - private CustomerCustomFieldsChangeCase(JsonNode jsonNode) throws IOException { - this.customerCustomFieldsChange = ApiHelper.deserialize(jsonNode, - CustomerCustomFieldsChange.class); - } - - @Override - public String toString() { - return customerCustomFieldsChange.toString(); - } - } - - /** - * This is a custom deserializer class for CustomerChangeCustomFields. - */ - protected static class CustomerChangeCustomFieldsDeserializer - extends JsonDeserializer { - - @Override - public CustomerChangeCustomFields deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList( - CustomerCustomFieldsChangeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangePayer.java b/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangePayer.java deleted file mode 100644 index 417700a2..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangePayer.java +++ /dev/null @@ -1,102 +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.CustomerPayerChange; -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 = CustomerChangePayer.CustomerChangePayerDeserializer.class) -public abstract class CustomerChangePayer { - - /** - * This is Customer Payer Change case. - * @param customerPayerChange CustomerPayerChange value for customerPayerChange. - * @return The CustomerPayerChangeCase object. - */ - public static CustomerChangePayer fromCustomerPayerChange( - CustomerPayerChange customerPayerChange) { - return customerPayerChange == null ? null : new CustomerPayerChangeCase(customerPayerChange); - } - - /** - * 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 customerPayerChange(CustomerPayerChange customerPayerChange); - } - - /** - * This is a implementation class for CustomerPayerChangeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "CustomerPayerChange") - private static class CustomerPayerChangeCase extends CustomerChangePayer { - - @JsonValue - private CustomerPayerChange customerPayerChange; - - CustomerPayerChangeCase(CustomerPayerChange customerPayerChange) { - this.customerPayerChange = customerPayerChange; - } - - @Override - public R match(Cases cases) { - return cases.customerPayerChange(this.customerPayerChange); - } - - @JsonCreator - private CustomerPayerChangeCase(JsonNode jsonNode) throws IOException { - this.customerPayerChange = ApiHelper.deserialize(jsonNode, - CustomerPayerChange.class); - } - - @Override - public String toString() { - return customerPayerChange.toString(); - } - } - - /** - * This is a custom deserializer class for CustomerChangePayer. - */ - protected static class CustomerChangePayerDeserializer - extends JsonDeserializer { - - @Override - public CustomerChangePayer deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(CustomerPayerChangeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeShippingAddress.java b/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeShippingAddress.java deleted file mode 100644 index b90a7901..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CustomerChangeShippingAddress.java +++ /dev/null @@ -1,101 +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.AddressChange; -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 = CustomerChangeShippingAddress.CustomerChangeShippingAddressDeserializer.class) -public abstract class CustomerChangeShippingAddress { - - /** - * This is Address Change case. - * @param addressChange AddressChange value for addressChange. - * @return The AddressChangeCase object. - */ - public static CustomerChangeShippingAddress fromAddressChange(AddressChange addressChange) { - return addressChange == null ? null : new AddressChangeCase(addressChange); - } - - /** - * 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 addressChange(AddressChange addressChange); - } - - /** - * This is a implementation class for AddressChangeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "AddressChange") - private static class AddressChangeCase extends CustomerChangeShippingAddress { - - @JsonValue - private AddressChange addressChange; - - AddressChangeCase(AddressChange addressChange) { - this.addressChange = addressChange; - } - - @Override - public R match(Cases cases) { - return cases.addressChange(this.addressChange); - } - - @JsonCreator - private AddressChangeCase(JsonNode jsonNode) throws IOException { - this.addressChange = ApiHelper.deserialize(jsonNode, - AddressChange.class); - } - - @Override - public String toString() { - return addressChange.toString(); - } - } - - /** - * This is a custom deserializer class for CustomerChangeShippingAddress. - */ - protected static class CustomerChangeShippingAddressDeserializer - extends JsonDeserializer { - - @Override - public CustomerChangeShippingAddress deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(AddressChangeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/InvoiceLineItemComponentCostData2.java b/src/main/java/com/maxio/advancedbilling/models/containers/InvoiceLineItemComponentCostData2.java deleted file mode 100644 index b5ff29f0..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/InvoiceLineItemComponentCostData2.java +++ /dev/null @@ -1,103 +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.InvoiceLineItemComponentCostData; -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 = InvoiceLineItemComponentCostData2.InvoiceLineItemComponentCostData2Deserializer.class) -public abstract class InvoiceLineItemComponentCostData2 { - - /** - * This is Invoice Line Item Component Cost Data case. - * @param invoiceLineItemComponentCostData InvoiceLineItemComponentCostData value for invoiceLineItemComponentCostData. - * @return The InvoiceLineItemComponentCostDataCase object. - */ - public static InvoiceLineItemComponentCostData2 fromInvoiceLineItemComponentCostData( - InvoiceLineItemComponentCostData invoiceLineItemComponentCostData) { - return invoiceLineItemComponentCostData == null ? null : new InvoiceLineItemComponentCostDataCase(invoiceLineItemComponentCostData); - } - - /** - * 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 invoiceLineItemComponentCostData(InvoiceLineItemComponentCostData invoiceLineItemComponentCostData); - } - - /** - * This is a implementation class for InvoiceLineItemComponentCostDataCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "InvoiceLineItemComponentCostData") - private static class InvoiceLineItemComponentCostDataCase extends InvoiceLineItemComponentCostData2 { - - @JsonValue - private InvoiceLineItemComponentCostData invoiceLineItemComponentCostData; - - InvoiceLineItemComponentCostDataCase(InvoiceLineItemComponentCostData invoiceLineItemComponentCostData) { - this.invoiceLineItemComponentCostData = invoiceLineItemComponentCostData; - } - - @Override - public R match(Cases cases) { - return cases.invoiceLineItemComponentCostData(this.invoiceLineItemComponentCostData); - } - - @JsonCreator - private InvoiceLineItemComponentCostDataCase(JsonNode jsonNode) throws IOException { - this.invoiceLineItemComponentCostData = ApiHelper.deserialize(jsonNode, - InvoiceLineItemComponentCostData.class); - } - - @Override - public String toString() { - return invoiceLineItemComponentCostData.toString(); - } - } - - /** - * This is a custom deserializer class for InvoiceLineItemComponentCostData2. - */ - protected static class InvoiceLineItemComponentCostData2Deserializer - extends JsonDeserializer { - - @Override - public InvoiceLineItemComponentCostData2 deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList( - InvoiceLineItemComponentCostDataCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ProductExpirationIntervalUnit.java b/src/main/java/com/maxio/advancedbilling/models/containers/ProductExpirationIntervalUnit.java deleted file mode 100644 index b9c002c1..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ProductExpirationIntervalUnit.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.ExtendedIntervalUnit; -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 = ProductExpirationIntervalUnit.ProductExpirationIntervalUnitDeserializer.class) -public abstract class ProductExpirationIntervalUnit { - - /** - * This is Extended Interval Unit case. - * @param extendedIntervalUnit ExtendedIntervalUnit value for extendedIntervalUnit. - * @return The ExtendedIntervalUnitCase object. - */ - public static ProductExpirationIntervalUnit fromExtendedIntervalUnit( - ExtendedIntervalUnit extendedIntervalUnit) { - return extendedIntervalUnit == null ? null : new ExtendedIntervalUnitCase(extendedIntervalUnit); - } - - /** - * 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 extendedIntervalUnit(ExtendedIntervalUnit extendedIntervalUnit); - } - - /** - * This is a implementation class for ExtendedIntervalUnitCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "ExtendedIntervalUnit") - private static class ExtendedIntervalUnitCase extends ProductExpirationIntervalUnit { - - @JsonValue - private ExtendedIntervalUnit extendedIntervalUnit; - - ExtendedIntervalUnitCase(ExtendedIntervalUnit extendedIntervalUnit) { - this.extendedIntervalUnit = extendedIntervalUnit; - } - - @Override - public R match(Cases cases) { - return cases.extendedIntervalUnit(this.extendedIntervalUnit); - } - - @JsonCreator - private ExtendedIntervalUnitCase(JsonNode jsonNode) throws IOException { - this.extendedIntervalUnit = - ExtendedIntervalUnit.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.extendedIntervalUnit == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return extendedIntervalUnit.toString(); - } - } - - /** - * This is a custom deserializer class for ProductExpirationIntervalUnit. - */ - protected static class ProductExpirationIntervalUnitDeserializer - extends JsonDeserializer { - - @Override - public ProductExpirationIntervalUnit deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(ExtendedIntervalUnitCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ProductTrialIntervalUnit.java b/src/main/java/com/maxio/advancedbilling/models/containers/ProductTrialIntervalUnit.java deleted file mode 100644 index 7b33b32b..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ProductTrialIntervalUnit.java +++ /dev/null @@ -1,104 +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.IntervalUnit; -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 = ProductTrialIntervalUnit.ProductTrialIntervalUnitDeserializer.class) -public abstract class ProductTrialIntervalUnit { - - /** - * This is Interval Unit case. - * @param intervalUnit IntervalUnit value for intervalUnit. - * @return The IntervalUnitCase object. - */ - public static ProductTrialIntervalUnit fromIntervalUnit(IntervalUnit intervalUnit) { - return intervalUnit == null ? null : new IntervalUnitCase(intervalUnit); - } - - /** - * 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 intervalUnit(IntervalUnit intervalUnit); - } - - /** - * This is a implementation class for IntervalUnitCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "IntervalUnit") - private static class IntervalUnitCase extends ProductTrialIntervalUnit { - - @JsonValue - private IntervalUnit intervalUnit; - - IntervalUnitCase(IntervalUnit intervalUnit) { - this.intervalUnit = intervalUnit; - } - - @Override - public R match(Cases cases) { - return cases.intervalUnit(this.intervalUnit); - } - - @JsonCreator - private IntervalUnitCase(JsonNode jsonNode) throws IOException { - this.intervalUnit = - IntervalUnit.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.intervalUnit == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return intervalUnit.toString(); - } - } - - /** - * This is a custom deserializer class for ProductTrialIntervalUnit. - */ - protected static class ProductTrialIntervalUnitDeserializer - extends JsonDeserializer { - - @Override - public ProductTrialIntervalUnit deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(IntervalUnitCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/RecordPaymentResponsePrepayment.java b/src/main/java/com/maxio/advancedbilling/models/containers/RecordPaymentResponsePrepayment.java deleted file mode 100644 index 4c96586a..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/RecordPaymentResponsePrepayment.java +++ /dev/null @@ -1,102 +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.InvoicePrePayment; -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 = RecordPaymentResponsePrepayment.RecordPaymentResponsePrepaymentDeserializer.class) -public abstract class RecordPaymentResponsePrepayment { - - /** - * This is Invoice PrePayment case. - * @param invoicePrePayment InvoicePrePayment value for invoicePrePayment. - * @return The InvoicePrePaymentCase object. - */ - public static RecordPaymentResponsePrepayment fromInvoicePrePayment( - InvoicePrePayment invoicePrePayment) { - return invoicePrePayment == null ? null : new InvoicePrePaymentCase(invoicePrePayment); - } - - /** - * 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 invoicePrePayment(InvoicePrePayment invoicePrePayment); - } - - /** - * This is a implementation class for InvoicePrePaymentCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "InvoicePrePayment") - private static class InvoicePrePaymentCase extends RecordPaymentResponsePrepayment { - - @JsonValue - private InvoicePrePayment invoicePrePayment; - - InvoicePrePaymentCase(InvoicePrePayment invoicePrePayment) { - this.invoicePrePayment = invoicePrePayment; - } - - @Override - public R match(Cases cases) { - return cases.invoicePrePayment(this.invoicePrePayment); - } - - @JsonCreator - private InvoicePrePaymentCase(JsonNode jsonNode) throws IOException { - this.invoicePrePayment = ApiHelper.deserialize(jsonNode, - InvoicePrePayment.class); - } - - @Override - public String toString() { - return invoicePrePayment.toString(); - } - } - - /** - * This is a custom deserializer class for RecordPaymentResponsePrepayment. - */ - protected static class RecordPaymentResponsePrepaymentDeserializer - extends JsonDeserializer { - - @Override - public RecordPaymentResponsePrepayment deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(InvoicePrePaymentCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricingScheme.java b/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricingScheme.java deleted file mode 100644 index d629f339..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionComponentPricingScheme.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.PricingScheme; -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 = SubscriptionComponentPricingScheme.SubscriptionComponentPricingSchemeDeserializer.class) -public abstract class SubscriptionComponentPricingScheme { - - /** - * This is Pricing Scheme case. - * @param pricingScheme PricingScheme value for pricingScheme. - * @return The PricingSchemeCase object. - */ - public static SubscriptionComponentPricingScheme fromPricingScheme( - PricingScheme pricingScheme) { - return pricingScheme == null ? null : new PricingSchemeCase(pricingScheme); - } - - /** - * 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 pricingScheme(PricingScheme pricingScheme); - } - - /** - * This is a implementation class for PricingSchemeCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "PricingScheme") - private static class PricingSchemeCase extends SubscriptionComponentPricingScheme { - - @JsonValue - private PricingScheme pricingScheme; - - PricingSchemeCase(PricingScheme pricingScheme) { - this.pricingScheme = pricingScheme; - } - - @Override - public R match(Cases cases) { - return cases.pricingScheme(this.pricingScheme); - } - - @JsonCreator - private PricingSchemeCase(JsonNode jsonNode) throws IOException { - this.pricingScheme = - PricingScheme.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.pricingScheme == null) { - throw new IllegalArgumentException(); - } - } - - @Override - public String toString() { - return pricingScheme.toString(); - } - } - - /** - * This is a custom deserializer class for SubscriptionComponentPricingScheme. - */ - protected static class SubscriptionComponentPricingSchemeDeserializer - extends JsonDeserializer { - - @Override - public SubscriptionComponentPricingScheme deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(PricingSchemeCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionGroup2.java b/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionGroup2.java deleted file mode 100644 index 5db23f48..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionGroup2.java +++ /dev/null @@ -1,103 +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.NestedSubscriptionGroup; -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 = SubscriptionGroup2.SubscriptionGroup2Deserializer.class) -public abstract class SubscriptionGroup2 { - - /** - * This is Nested Subscription Group case. - * @param nestedSubscriptionGroup NestedSubscriptionGroup value for nestedSubscriptionGroup. - * @return The NestedSubscriptionGroupCase object. - */ - public static SubscriptionGroup2 fromNestedSubscriptionGroup( - NestedSubscriptionGroup nestedSubscriptionGroup) { - return nestedSubscriptionGroup == null ? null : new NestedSubscriptionGroupCase(nestedSubscriptionGroup); - } - - /** - * 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 nestedSubscriptionGroup(NestedSubscriptionGroup nestedSubscriptionGroup); - } - - /** - * This is a implementation class for NestedSubscriptionGroupCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "NestedSubscriptionGroup") - private static class NestedSubscriptionGroupCase extends SubscriptionGroup2 { - - @JsonValue - private NestedSubscriptionGroup nestedSubscriptionGroup; - - NestedSubscriptionGroupCase(NestedSubscriptionGroup nestedSubscriptionGroup) { - this.nestedSubscriptionGroup = nestedSubscriptionGroup; - } - - @Override - public R match(Cases cases) { - return cases.nestedSubscriptionGroup(this.nestedSubscriptionGroup); - } - - @JsonCreator - private NestedSubscriptionGroupCase(JsonNode jsonNode) throws IOException { - this.nestedSubscriptionGroup = ApiHelper.deserialize(jsonNode, - NestedSubscriptionGroup.class); - } - - @Override - public String toString() { - return nestedSubscriptionGroup.toString(); - } - } - - /** - * This is a custom deserializer class for SubscriptionGroup2. - */ - protected static class SubscriptionGroup2Deserializer - extends JsonDeserializer { - - @Override - public SubscriptionGroup2 deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList( - NestedSubscriptionGroupCase.class), true); - } - } - -} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/VoidInvoiceEventDataCreditNoteAttributes.java b/src/main/java/com/maxio/advancedbilling/models/containers/VoidInvoiceEventDataCreditNoteAttributes.java deleted file mode 100644 index d9f23d04..00000000 --- a/src/main/java/com/maxio/advancedbilling/models/containers/VoidInvoiceEventDataCreditNoteAttributes.java +++ /dev/null @@ -1,101 +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.CreditNote; -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 = VoidInvoiceEventDataCreditNoteAttributes.VoidInvoiceEventDataCreditNoteAttributesDeserializer.class) -public abstract class VoidInvoiceEventDataCreditNoteAttributes { - - /** - * This is Credit Note case. - * @param creditNote CreditNote value for creditNote. - * @return The CreditNoteCase object. - */ - public static VoidInvoiceEventDataCreditNoteAttributes fromCreditNote(CreditNote creditNote) { - return creditNote == null ? null : new CreditNoteCase(creditNote); - } - - /** - * 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 creditNote(CreditNote creditNote); - } - - /** - * This is a implementation class for CreditNoteCase. - */ - @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "CreditNote") - private static class CreditNoteCase extends VoidInvoiceEventDataCreditNoteAttributes { - - @JsonValue - private CreditNote creditNote; - - CreditNoteCase(CreditNote creditNote) { - this.creditNote = creditNote; - } - - @Override - public R match(Cases cases) { - return cases.creditNote(this.creditNote); - } - - @JsonCreator - private CreditNoteCase(JsonNode jsonNode) throws IOException { - this.creditNote = ApiHelper.deserialize(jsonNode, - CreditNote.class); - } - - @Override - public String toString() { - return creditNote.toString(); - } - } - - /** - * This is a custom deserializer class for VoidInvoiceEventDataCreditNoteAttributes. - */ - protected static class VoidInvoiceEventDataCreditNoteAttributesDeserializer - extends JsonDeserializer { - - @Override - public VoidInvoiceEventDataCreditNoteAttributes deserialize(JsonParser jp, DeserializationContext ctxt) - throws IOException, JsonProcessingException { - ObjectCodec oc = jp.getCodec(); - JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(CreditNoteCase.class), true); - } - } - -}