diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index a5dcdee9..51942c16 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -29,9 +29,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/proforma_invoices/123 ```java List listExportedProformaInvoices( - final String batchId, - final Integer perPage, - final Integer page) + final ListExportedProformaInvoicesInput input) ``` ## Parameters @@ -49,12 +47,15 @@ List listExportedProformaInvoices( ## Example Usage ```java -String batchId = "batch_id8"; -Integer perPage = 100; -Integer page = 2; +ListExportedProformaInvoicesInput listExportedProformaInvoicesInput = new ListExportedProformaInvoicesInput.Builder( + "batch_id8" +) +.perPage(100) +.page(2) +.build(); try { - List result = aPIExportsController.listExportedProformaInvoices(batchId, perPage, page); + List result = aPIExportsController.listExportedProformaInvoices(listExportedProformaInvoicesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -78,9 +79,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per ```java List listExportedInvoices( - final String batchId, - final Integer perPage, - final Integer page) + final ListExportedInvoicesInput input) ``` ## Parameters @@ -98,12 +97,15 @@ List listExportedInvoices( ## Example Usage ```java -String batchId = "batch_id8"; -Integer perPage = 100; -Integer page = 2; +ListExportedInvoicesInput listExportedInvoicesInput = new ListExportedInvoicesInput.Builder( + "batch_id8" +) +.perPage(100) +.page(2) +.build(); try { - List result = aPIExportsController.listExportedInvoices(batchId, perPage, page); + List result = aPIExportsController.listExportedInvoices(listExportedInvoicesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -127,9 +129,7 @@ Example: `GET https://{subdomain}.chargify.com/api_exports/subscriptions/123/row ```java List listExportedSubscriptions( - final String batchId, - final Integer perPage, - final Integer page) + final ListExportedSubscriptionsInput input) ``` ## Parameters @@ -147,12 +147,15 @@ List listExportedSubscriptions( ## Example Usage ```java -String batchId = "batch_id8"; -Integer perPage = 100; -Integer page = 2; +ListExportedSubscriptionsInput listExportedSubscriptionsInput = new ListExportedSubscriptionsInput.Builder( + "batch_id8" +) +.perPage(100) +.page(2) +.build(); try { - List result = aPIExportsController.listExportedSubscriptions(batchId, perPage, page); + List result = aPIExportsController.listExportedSubscriptions(listExportedSubscriptionsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 5a23c149..4a309407 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -446,16 +446,7 @@ This request will return a list of components for a site. ```java List listComponents( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final Integer page, - final Integer perPage, - final List filterIds, - final Boolean filterUseSiteExchangeRate) + final ListComponentsInput input) ``` ## Parameters @@ -480,12 +471,14 @@ List listComponents( ## Example Usage ```java -BasicDateField dateField = BasicDateField.UPDATED_AT; -Integer page = 2; -Integer perPage = 50; -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') +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(); + try { - List result = componentsController.listComponents(dateField, null, null, null, null, null, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); + List result = componentsController.listComponents(listComponentsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -682,17 +675,7 @@ This request will return a list of components for a particular product family. ```java List listComponentsForProductFamily( - final int productFamilyId, - final Boolean includeArchived, - final List filterIds, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Boolean filterUseSiteExchangeRate) + final ListComponentsForProductFamilyInput input) ``` ## Parameters @@ -718,13 +701,16 @@ List listComponentsForProductFamily( ## Example Usage ```java -int productFamilyId = 140; -Liquid error: Value cannot be null. (Parameter 'key')Integer page = 2; -Integer perPage = 50; -BasicDateField dateField = BasicDateField.UPDATED_AT; -Liquid error: Value cannot be null. (Parameter 'key') +ListComponentsForProductFamilyInput listComponentsForProductFamilyInput = new ListComponentsForProductFamilyInput.Builder( + 140 +) +Liquid error: Value cannot be null. (Parameter 'key').page(2) +.perPage(50) +.dateField(BasicDateField.UPDATED_AT) +Liquid error: Value cannot be null. (Parameter 'key').build(); + try { - List result = componentsController.listComponentsForProductFamily(productFamilyId, null, Liquid error: Value cannot be null. (Parameter 'key'), page, perPage, dateField, null, null, null, null, Liquid error: Value cannot be null. (Parameter 'key')); + List result = componentsController.listComponentsForProductFamily(listComponentsForProductFamilyInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -913,11 +899,7 @@ If the price point is set to `use_site_exchange_rate: true`, it will return pric ```java ComponentPricePointsResponse listComponentPricePoints( - final int componentId, - final Boolean currencyPrices, - final Integer page, - final Integer perPage, - final List filterType) + final ListComponentPricePointsInput input) ``` ## Parameters @@ -937,11 +919,15 @@ ComponentPricePointsResponse listComponentPricePoints( ## Example Usage ```java -int componentId = 222; -Integer page = 2; -Integer perPage = 50; -Liquid error: Value cannot be null. (Parameter 'key')try { - ComponentPricePointsResponse result = componentsController.listComponentPricePoints(componentId, null, page, perPage, Liquid error: Value cannot be null. (Parameter 'key')); +ListComponentPricePointsInput listComponentPricePointsInput = new ListComponentPricePointsInput.Builder( + 222 +) +.page(2) +.perPage(50) +Liquid error: Value cannot be null. (Parameter 'key').build(); + +try { + ComponentPricePointsResponse result = componentsController.listComponentPricePoints(listComponentPricePointsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -1474,18 +1460,7 @@ This method allows to retrieve a list of Components Price Points belonging to a ```java ListComponentsPricePointsResponse listAllComponentPricePoints( - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final ListComponentsPricePointsInclude include, - final Integer page, - final Integer perPage, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListAllComponentPricePointsDirection direction, - final List filterIds, - final IncludeNotNull filterArchivedAt) + final ListAllComponentPricePointsInput input) ``` ## Parameters @@ -1501,7 +1476,7 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( | `filterStartDate` | `String` | 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` | `String` | 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` | [`PricePointType`](../../doc/models/price-point-type.md) | Query, Optional | Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. | -| `direction` | [`ListAllComponentPricePointsDirection`](../../doc/models/containers/list-all-component-price-points-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListAllComponentPricePointsInputDirection`](../../doc/models/containers/list-all-component-price-points-input-direction.md) | Query, Optional | This is a container for one-of cases. | | `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`. | @@ -1512,12 +1487,14 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( ## Example Usage ```java -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')ListComponentsPricePointsInclude include = ListComponentsPricePointsInclude.CURRENCY_PRICES; -Integer page = 2; -Integer 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') +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) + .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(); + try { - ListComponentsPricePointsResponse result = componentsController.listAllComponentPricePoints(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, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), null, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); + ListComponentsPricePointsResponse result = componentsController.listAllComponentPricePoints(listAllComponentPricePointsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 478def88..93a0c9e0 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -121,18 +121,7 @@ If the coupon is set to `use_site_exchange_rate: true`, it will return pricing b ```java List listCouponsForProductFamily( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final Boolean filterUseSiteExchangeRate) + final ListCouponsForProductFamilyInput input) ``` ## Parameters @@ -159,13 +148,16 @@ List listCouponsForProductFamily( ## Example Usage ```java -int productFamilyId = 140; -Integer page = 2; -Integer 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')Boolean currencyPrices = true; -Liquid error: Value cannot be null. (Parameter 'key') +ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCouponsForProductFamilyInput.Builder( + 140 +) +.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(); + try { - List result = couponsController.listCouponsForProductFamily(productFamilyId, page, perPage, 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, Liquid error: Value cannot be null. (Parameter 'key')); + List result = couponsController.listCouponsForProductFamily(listCouponsForProductFamilyInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -560,22 +552,7 @@ If the coupon is set to `use_site_exchange_rate: true`, it will return pricing b ```java List listCoupons( - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final BasicDateField filterDateField, - final Boolean filterUseSiteExchangeRate) + final ListCouponsInput input) ``` ## Parameters @@ -606,13 +583,15 @@ List listCoupons( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -BasicDateField dateField = BasicDateField.UPDATED_AT; -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')Boolean 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') +ListCouponsInput listCouponsInput = new ListCouponsInput.Builder() + .page(2) + .perPage(50) + .dateField(BasicDateField.UPDATED_AT) +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(); + try { - List result = couponsController.listCoupons(page, perPage, dateField, null, null, null, null, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), currencyPrices, 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')); + List result = couponsController.listCoupons(listCouponsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -992,9 +971,7 @@ This request allows you to request the subcodes that are attached to a coupon. ```java CouponSubcodes listCouponSubcodes( - final int couponId, - final Integer page, - final Integer perPage) + final ListCouponSubcodesInput input) ``` ## Parameters @@ -1012,12 +989,15 @@ CouponSubcodes listCouponSubcodes( ## Example Usage ```java -int couponId = 162; -Integer page = 2; -Integer perPage = 50; +ListCouponSubcodesInput listCouponSubcodesInput = new ListCouponSubcodesInput.Builder( + 162 +) +.page(2) +.perPage(50) +.build(); try { - CouponSubcodes result = couponsController.listCouponSubcodes(couponId, page, perPage); + CouponSubcodes result = couponsController.listCouponSubcodes(listCouponSubcodesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index aef56a05..74144975 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -137,11 +137,7 @@ This endpoint lists metafields associated with a site. The metafield description ```java ListMetafieldsResponse listMetafields( - final ResourceType resourceType, - final String name, - final Integer page, - final Integer perPage, - final ListMetafieldsDirection direction) + final ListMetafieldsInput input) ``` ## Parameters @@ -152,7 +148,7 @@ ListMetafieldsResponse listMetafields( | `name` | `String` | Query, Optional | filter by the name of the metafield | | `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`.
**Default**: `1`
**Constraints**: `>= 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`.
**Default**: `20`
**Constraints**: `<= 200` | -| `direction` | [`ListMetafieldsDirection`](../../doc/models/containers/list-metafields-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListMetafieldsInputDirection`](../../doc/models/containers/list-metafields-input-direction.md) | Query, Optional | This is a container for one-of cases. | ## Response Type @@ -161,12 +157,15 @@ ListMetafieldsResponse listMetafields( ## Example Usage ```java -ResourceType resourceType = ResourceType.SUBSCRIPTIONS; -Integer page = 2; -Integer perPage = 50; +ListMetafieldsInput listMetafieldsInput = new ListMetafieldsInput.Builder( + ResourceType.SUBSCRIPTIONS +) +.page(2) +.perPage(50) +.build(); try { - ListMetafieldsResponse result = customFieldsController.listMetafields(resourceType, null, page, perPage, null); + ListMetafieldsResponse result = customFieldsController.listMetafields(listMetafieldsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -375,10 +374,7 @@ This endpoint will also display the current stats of your metadata to use as a t ```java PaginatedMetadata readMetadata( - final ResourceType resourceType, - final String resourceId, - final Integer page, - final Integer perPage) + final ReadMetadataInput input) ``` ## Parameters @@ -397,13 +393,16 @@ PaginatedMetadata readMetadata( ## Example Usage ```java -ResourceType resourceType = ResourceType.SUBSCRIPTIONS; -String resourceId = "resource_id4"; -Integer page = 2; -Integer perPage = 50; +ReadMetadataInput readMetadataInput = new ReadMetadataInput.Builder( + ResourceType.SUBSCRIPTIONS, + "resource_id4" +) +.page(2) +.perPage(50) +.build(); try { - PaginatedMetadata result = customFieldsController.readMetadata(resourceType, resourceId, page, perPage); + PaginatedMetadata result = customFieldsController.readMetadata(readMetadataInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -540,17 +539,7 @@ This endpoint will list the number of pages of metadata information that are con ```java PaginatedMetadata listMetadata( - final ResourceType resourceType, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean withDeleted, - final List resourceIds, - final ListMetadataDirection direction) + final ListMetadataInput input) ``` ## Parameters @@ -567,7 +556,7 @@ PaginatedMetadata listMetadata( | `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns metadata 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. | | `withDeleted` | `Boolean` | Query, Optional | Allow to fetch deleted metadata. | | `resourceIds` | `List` | Query, Optional | Allow to fetch metadata for multiple records based on provided ids. Use in query: `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`.
**Constraints**: *Maximum Items*: `50` | -| `direction` | [`ListMetadataDirection`](../../doc/models/containers/list-metadata-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListMetadataInputDirection`](../../doc/models/containers/list-metadata-input-direction.md) | Query, Optional | This is a container for one-of cases. | ## Response Type @@ -576,13 +565,16 @@ PaginatedMetadata listMetadata( ## Example Usage ```java -ResourceType resourceType = ResourceType.SUBSCRIPTIONS; -Integer page = 2; -Integer perPage = 50; -BasicDateField dateField = BasicDateField.UPDATED_AT; -Liquid error: Value cannot be null. (Parameter 'key') +ListMetadataInput listMetadataInput = new ListMetadataInput.Builder( + ResourceType.SUBSCRIPTIONS +) +.page(2) +.perPage(50) +.dateField(BasicDateField.UPDATED_AT) +Liquid error: Value cannot be null. (Parameter 'key').build(); + try { - PaginatedMetadata result = customFieldsController.listMetadata(resourceType, page, perPage, dateField, null, null, null, null, null, Liquid error: Value cannot be null. (Parameter 'key'), null); + PaginatedMetadata result = customFieldsController.listMetadata(listMetadataInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index d0736fce..ddcb45ed 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -157,22 +157,14 @@ To retrieve a single, exact match by reference, please use the [lookup endpoint] ```java List listCustomers( - final ListCustomersDirection direction, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final String q) + final ListCustomersInput input) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `direction` | [`ListCustomersDirection`](../../doc/models/containers/list-customers-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListCustomersInputDirection`](../../doc/models/containers/list-customers-input-direction.md) | Query, Optional | This is a container for one-of cases. | | `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`.
**Default**: `1`
**Constraints**: `>= 1` | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 50. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.
**Default**: `50`
**Constraints**: `<= 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`. | @@ -189,12 +181,14 @@ List listCustomers( ## Example Usage ```java -Integer page = 2; -Integer perPage = 30; -BasicDateField dateField = BasicDateField.UPDATED_AT; +ListCustomersInput listCustomersInput = new ListCustomersInput.Builder() + .page(2) + .perPage(30) + .dateField(BasicDateField.UPDATED_AT) + .build(); try { - List result = customersController.listCustomers(null, page, perPage, dateField, null, null, null, null, null); + List result = customersController.listCustomers(listCustomersInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 4867c17b..5e8d599b 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -109,14 +109,7 @@ You may specify component and/or price point by using either the numeric ID or t ```java ListSegmentsResponse listSegmentsForPricePoint( - final String componentId, - final String pricePointId, - final Integer page, - final Integer perPage, - final String filterSegmentProperty1Value, - final String filterSegmentProperty2Value, - final String filterSegmentProperty3Value, - final String filterSegmentProperty4Value) + final ListSegmentsForPricePointInput input) ``` ## Parameters @@ -139,13 +132,16 @@ ListSegmentsResponse listSegmentsForPricePoint( ## Example Usage ```java -String componentId = "component_id8"; -String pricePointId = "price_point_id8"; -Integer page = 2; -Integer 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') +ListSegmentsForPricePointInput listSegmentsForPricePointInput = new ListSegmentsForPricePointInput.Builder( + "component_id8", + "price_point_id8" +) +.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(); + try { - ListSegmentsResponse result = eventsBasedBillingSegmentsController.listSegmentsForPricePoint(componentId, pricePointId, page, perPage, 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')); + ListSegmentsResponse result = eventsBasedBillingSegmentsController.listSegmentsForPricePoint(listSegmentsForPricePointInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/events.md b/doc/controllers/events.md index b4537387..7d3577a5 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -82,17 +82,7 @@ Here’s an example event for the `subscription_state_change` event: ```java List listEvents( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter, - final ListEventsDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) + final ListEventsInput input) ``` ## Parameters @@ -118,18 +108,19 @@ List listEvents( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; -List filter = Arrays.asList( - EventType.CUSTOM_FIELD_VALUE_CHANGE, - EventType.PAYMENT_SUCCESS -); - -ListEventsDateField dateField = ListEventsDateField.CREATED_AT; +ListEventsInput listEventsInput = new ListEventsInput.Builder() + .page(2) + .perPage(50) + .direction(Direction.DESC) + .filter(Arrays.asList( + EventType.CUSTOM_FIELD_VALUE_CHANGE, + EventType.PAYMENT_SUCCESS + )) + .dateField(ListEventsDateField.CREATED_AT) + .build(); try { - List result = eventsController.listEvents(page, perPage, null, null, direction, filter, dateField, null, null, null, null); + List result = eventsController.listEvents(listEventsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -209,13 +200,7 @@ Each event type has its own `event_specific_data` specified. ```java List listSubscriptionEvents( - final String subscriptionId, - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) + final ListSubscriptionEventsInput input) ``` ## Parameters @@ -237,17 +222,20 @@ List listSubscriptionEvents( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; -List filter = Arrays.asList( - EventType.CUSTOM_FIELD_VALUE_CHANGE, - EventType.PAYMENT_SUCCESS -); +ListSubscriptionEventsInput listSubscriptionEventsInput = new ListSubscriptionEventsInput.Builder( + "subscription_id0" +) +.page(2) +.perPage(50) +.direction(Direction.DESC) +.filter(Arrays.asList( + EventType.CUSTOM_FIELD_VALUE_CHANGE, + EventType.PAYMENT_SUCCESS + )) +.build(); try { - List result = eventsController.listSubscriptionEvents(subscriptionId, page, perPage, null, null, direction, filter); + List result = eventsController.listSubscriptionEvents(listSubscriptionEventsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -306,12 +294,7 @@ Get a count of all the events for a given site by using this method. ```java CountResponse readEventsCount( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) + final ReadEventsCountInput input) ``` ## Parameters @@ -332,16 +315,18 @@ CountResponse readEventsCount( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; -List filter = Arrays.asList( - EventType.CUSTOM_FIELD_VALUE_CHANGE, - EventType.PAYMENT_SUCCESS -); +ReadEventsCountInput readEventsCountInput = new ReadEventsCountInput.Builder() + .page(2) + .perPage(50) + .direction(Direction.DESC) + .filter(Arrays.asList( + EventType.CUSTOM_FIELD_VALUE_CHANGE, + EventType.PAYMENT_SUCCESS + )) + .build(); try { - CountResponse result = eventsController.readEventsCount(page, perPage, null, null, direction, filter); + CountResponse result = eventsController.readEventsCount(readEventsCountInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index 20ca419a..569f551a 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -157,10 +157,7 @@ Usage includes revenue from: ```java ListMRRResponse readMrrMovements( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final ReadMrrMovementsDirection direction) + final ReadMrrMovementsInput input) ``` ## Parameters @@ -170,7 +167,7 @@ ListMRRResponse readMrrMovements( | `subscriptionId` | `Integer` | Query, Optional | optionally filter results by 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`.
**Default**: `1`
**Constraints**: `>= 1` | | `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.
**Default**: `10`
**Constraints**: `<= 50` | -| `direction` | [`ReadMrrMovementsDirection`](../../doc/models/containers/read-mrr-movements-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ReadMrrMovementsInputDirection`](../../doc/models/containers/read-mrr-movements-input-direction.md) | Query, Optional | This is a container for one-of cases. | ## Response Type @@ -179,11 +176,13 @@ ListMRRResponse readMrrMovements( ## Example Usage ```java -Integer page = 2; -Integer perPage = 20; +ReadMrrMovementsInput readMrrMovementsInput = new ReadMrrMovementsInput.Builder() + .page(2) + .perPage(20) + .build(); try { - ListMRRResponse result = insightsController.readMrrMovements(null, page, perPage, null); + ListMRRResponse result = insightsController.readMrrMovements(readMrrMovementsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -253,11 +252,7 @@ This endpoint returns your site's current MRR, including plan and usage breakout ```java SubscriptionMRRResponse listMrrPerSubscription( - final List filterSubscriptionIds, - final String atTime, - final Integer page, - final Integer perPage, - final Direction direction) + final ListMrrPerSubscriptionInput input) ``` ## Parameters @@ -277,13 +272,15 @@ SubscriptionMRRResponse listMrrPerSubscription( ## Example Usage ```java -Liquid error: Value cannot be null. (Parameter 'key')String atTime = "at_time=2022-01-10T10:00:00-05:00"; -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; +ListMrrPerSubscriptionInput listMrrPerSubscriptionInput = new ListMrrPerSubscriptionInput.Builder() +Liquid error: Value cannot be null. (Parameter 'key') .atTime("at_time=2022-01-10T10:00:00-05:00") + .page(2) + .perPage(50) + .direction(Direction.DESC) + .build(); try { - SubscriptionMRRResponse result = insightsController.listMrrPerSubscription(Liquid error: Value cannot be null. (Parameter 'key'), atTime, page, perPage, direction); + SubscriptionMRRResponse result = insightsController.listMrrPerSubscription(listMrrPerSubscriptionInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 47bb6ada..9ad1fbc7 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -92,28 +92,7 @@ By default, invoices returned on the index will only include totals, not detaile ```java ListInvoicesResponse listInvoices( - final String startDate, - final String endDate, - final Status status, - final Integer subscriptionId, - final String subscriptionGroupUid, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields, - final Boolean refunds, - final InvoiceDateField dateField, - final String startDatetime, - final String endDatetime, - final List customerIds, - final List number, - final List productIds, - final InvoiceSortField sort) + final ListInvoicesInput input) ``` ## Parameters @@ -150,37 +129,36 @@ ListInvoicesResponse listInvoices( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; -Boolean lineItems = false; -Boolean discounts = false; -Boolean taxes = false; -Boolean credits = false; -Boolean payments = false; -Boolean customFields = false; -Boolean refunds = false; -InvoiceDateField dateField = InvoiceDateField.ISSUE_DATE; -List customerIds = Arrays.asList( - 1, - 2, - 3 -); - -List number = Arrays.asList( - "1234", - "1235" -); - -List productIds = Arrays.asList( - 23, - 34 -); - -InvoiceSortField sort = InvoiceSortField.TOTAL_AMOUNT; +ListInvoicesInput listInvoicesInput = new ListInvoicesInput.Builder() + .page(2) + .perPage(50) + .direction(Direction.DESC) + .lineItems(false) + .discounts(false) + .taxes(false) + .credits(false) + .payments(false) + .customFields(false) + .refunds(false) + .dateField(InvoiceDateField.ISSUE_DATE) + .customerIds(Arrays.asList( + 1, + 2, + 3 + )) + .number(Arrays.asList( + "1234", + "1235" + )) + .productIds(Arrays.asList( + 23, + 34 + )) + .sort(InvoiceSortField.TOTAL_AMOUNT) + .build(); try { - ListInvoicesResponse result = invoicesController.listInvoices(null, null, null, null, null, page, perPage, direction, lineItems, discounts, taxes, credits, payments, customFields, refunds, dateField, null, null, customerIds, number, productIds, sort); + ListInvoicesResponse result = invoicesController.listInvoices(listInvoicesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -636,13 +614,7 @@ Note - invoice events that occurred prior to 09/05/2018 __will not__ contain an ```java ListInvoiceEventsResponse listInvoiceEvents( - final String sinceDate, - final Integer sinceId, - final Integer page, - final Integer perPage, - final String invoiceUid, - final String withChangeInvoiceStatus, - final List eventTypes) + final ListInvoiceEventsInput input) ``` ## Parameters @@ -664,10 +636,13 @@ ListInvoiceEventsResponse listInvoiceEvents( ## Example Usage ```java -Integer page = 2; -Integer perPage = 100; +ListInvoiceEventsInput listInvoiceEventsInput = new ListInvoiceEventsInput.Builder() + .page(2) + .perPage(100) + .build(); + try { - ListInvoiceEventsResponse result = invoicesController.listInvoiceEvents(null, null, page, perPage, null, null, null); + ListInvoiceEventsResponse result = invoicesController.listInvoiceEvents(listInvoiceEventsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -1264,14 +1239,7 @@ By default, the credit notes returned by this endpoint will exclude the arrays o ```java ListCreditNotesResponse listCreditNotes( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean refunds, - final Boolean applications) + final ListCreditNotesInput input) ``` ## Parameters @@ -1294,16 +1262,18 @@ ListCreditNotesResponse listCreditNotes( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -Boolean lineItems = false; -Boolean discounts = false; -Boolean taxes = false; -Boolean refunds = false; -Boolean applications = false; +ListCreditNotesInput listCreditNotesInput = new ListCreditNotesInput.Builder() + .page(2) + .perPage(50) + .lineItems(false) + .discounts(false) + .taxes(false) + .refunds(false) + .applications(false) + .build(); try { - ListCreditNotesResponse result = invoicesController.listCreditNotes(null, page, perPage, lineItems, discounts, taxes, refunds, applications); + ListCreditNotesResponse result = invoicesController.listCreditNotes(listCreditNotesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -2099,10 +2069,7 @@ Invoice segments returned on the index will only include totals, not detailed br ```java ConsolidatedInvoice listInvoiceSegments( - final String invoiceUid, - final Integer page, - final Integer perPage, - final Direction direction) + final ListInvoiceSegmentsInput input) ``` ## Parameters @@ -2121,13 +2088,16 @@ ConsolidatedInvoice listInvoiceSegments( ## Example Usage ```java -String invoiceUid = "invoice_uid0"; -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.ASC; +ListInvoiceSegmentsInput listInvoiceSegmentsInput = new ListInvoiceSegmentsInput.Builder( + "invoice_uid0" +) +.page(2) +.perPage(50) +.direction(Direction.ASC) +.build(); try { - ConsolidatedInvoice result = invoicesController.listInvoiceSegments(invoiceUid, page, perPage, direction); + ConsolidatedInvoice result = invoicesController.listInvoiceSegments(listInvoiceSegmentsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index ba320d76..f8322415 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -352,9 +352,7 @@ This method will return all of the active `payment_profiles` for a Site, or for ```java List listPaymentProfiles( - final Integer page, - final Integer perPage, - final Integer customerId) + final ListPaymentProfilesInput input) ``` ## Parameters @@ -372,11 +370,13 @@ List listPaymentProfiles( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; +ListPaymentProfilesInput listPaymentProfilesInput = new ListPaymentProfilesInput.Builder() + .page(2) + .perPage(50) + .build(); try { - List result = paymentProfilesController.listPaymentProfiles(page, perPage, null); + List result = paymentProfilesController.listPaymentProfiles(listPaymentProfilesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index ccc6ee27..2eabfa1d 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -22,18 +22,7 @@ This method allows to retrieve a list of Products belonging to a Product Family. ```java List listProductsForProductFamily( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) + final ListProductsForProductFamilyInput input) ``` ## Parameters @@ -60,14 +49,17 @@ List listProductsForProductFamily( ## Example Usage ```java -int productFamilyId = 140; -Integer page = 2; -Integer perPage = 50; -BasicDateField dateField = BasicDateField.UPDATED_AT; -ListProductsInclude include = ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT; -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') +ListProductsForProductFamilyInput listProductsForProductFamilyInput = new ListProductsForProductFamilyInput.Builder( + 140 +) +.page(2) +.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(); + try { - List result = productFamiliesController.listProductsForProductFamily(productFamilyId, page, perPage, dateField, null, null, null, null, null, include, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); + List result = productFamiliesController.listProductsForProductFamily(listProductsForProductFamilyInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -245,11 +237,7 @@ This method allows to retrieve a list of Product Families for a site. ```java List listProductFamilies( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) + final ListProductFamiliesInput input) ``` ## Parameters @@ -269,10 +257,12 @@ List listProductFamilies( ## Example Usage ```java -BasicDateField dateField = BasicDateField.UPDATED_AT; +ListProductFamiliesInput listProductFamiliesInput = new ListProductFamiliesInput.Builder() + .dateField(BasicDateField.UPDATED_AT) + .build(); try { - List result = productFamiliesController.listProductFamilies(dateField, null, null, null, null); + List result = productFamiliesController.listProductFamilies(listProductFamiliesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 68df0479..9dd83f13 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -112,11 +112,7 @@ Use this endpoint to retrieve a list of product price points. ```java ListProductPricePointsResponse listProductPricePoints( - final int productId, - final Integer page, - final Integer perPage, - final Boolean currencyPrices, - final List filterType) + final ListProductPricePointsInput input) ``` ## Parameters @@ -136,11 +132,15 @@ ListProductPricePointsResponse listProductPricePoints( ## Example Usage ```java -int productId = 202; -Integer page = 2; -Integer perPage = 10; -Liquid error: Value cannot be null. (Parameter 'key')try { - ListProductPricePointsResponse result = productPricePointsController.listProductPricePoints(productId, page, perPage, null, Liquid error: Value cannot be null. (Parameter 'key')); +ListProductPricePointsInput listProductPricePointsInput = new ListProductPricePointsInput.Builder( + 202 +) +.page(2) +.perPage(10) +Liquid error: Value cannot be null. (Parameter 'key').build(); + +try { + ListProductPricePointsResponse result = productPricePointsController.listProductPricePoints(listProductPricePointsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -769,25 +769,14 @@ This method allows retrieval of a list of Products Price Points belonging to a S ```java ListProductPricePointsResponse listAllProductPricePoints( - final ListAllProductPricePointsDirection direction, - final IncludeNotNull filterArchivedAt, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final List filterIds, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListProductsPricePointsInclude include, - final Integer page, - final Integer perPage) + final ListAllProductPricePointsInput input) ``` ## Parameters | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `direction` | [`ListAllProductPricePointsDirection`](../../doc/models/containers/list-all-product-price-points-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListAllProductPricePointsInputDirection`](../../doc/models/containers/list-all-product-price-points-input-direction.md) | Query, Optional | This is a container for one-of cases. | | `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` | `String` | 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. | @@ -807,12 +796,14 @@ ListProductPricePointsResponse listAllProductPricePoints( ## Example Usage ```java -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')ListProductsPricePointsInclude include = ListProductsPricePointsInclude.CURRENCY_PRICES; -Integer page = 2; -Integer perPage = 50; +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) + .page(2) + .perPage(50) + .build(); try { - ListProductPricePointsResponse result = productPricePointsController.listAllProductPricePoints(null, 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, page, perPage); + ListProductPricePointsResponse result = productPricePointsController.listAllProductPricePoints(listAllProductPricePointsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 735435c8..61b5a69a 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -490,17 +490,7 @@ This method allows to retrieve a list of Products belonging to a Site. ```java List listProducts( - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Integer page, - final Integer perPage, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) + final ListProductsInput input) ``` ## Parameters @@ -526,14 +516,16 @@ List listProducts( ## Example Usage ```java -BasicDateField dateField = BasicDateField.UPDATED_AT; -Integer page = 2; -Integer perPage = 50; -Boolean includeArchived = true; -ListProductsInclude include = ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT; -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key') +ListProductsInput listProductsInput = new ListProductsInput.Builder() + .dateField(BasicDateField.UPDATED_AT) + .page(2) + .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(); + try { - List result = productsController.listProducts(dateField, null, null, null, null, page, perPage, includeArchived, include, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); + List result = productsController.listProducts(listProductsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 65966dff..a9da167b 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -211,19 +211,7 @@ By default, proforma invoices returned on the index will only include totals, no ```java List listProformaInvoices( - final String subscriptionId, - final String startDate, - final String endDate, - final Status status, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields) + final ListProformaInvoicesInput input) ``` ## Parameters @@ -251,19 +239,22 @@ List listProformaInvoices( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -Integer page = 2; -Integer perPage = 50; -Direction direction = Direction.DESC; -Boolean lineItems = false; -Boolean discounts = false; -Boolean taxes = false; -Boolean credits = false; -Boolean payments = false; -Boolean customFields = false; +ListProformaInvoicesInput listProformaInvoicesInput = new ListProformaInvoicesInput.Builder( + "subscription_id0" +) +.page(2) +.perPage(50) +.direction(Direction.DESC) +.lineItems(false) +.discounts(false) +.taxes(false) +.credits(false) +.payments(false) +.customFields(false) +.build(); try { - List result = proformaInvoicesController.listProformaInvoices(subscriptionId, null, null, null, page, perPage, direction, lineItems, discounts, taxes, credits, payments, customFields); + List result = proformaInvoicesController.listProformaInvoices(listProformaInvoicesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index f14a84a5..f369b124 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -86,8 +86,7 @@ This method gives a merchant the option to retrieve a list of all of the current ```java List listReasonCodes( - final Integer page, - final Integer perPage) + final ListReasonCodesInput input) ``` ## Parameters @@ -104,11 +103,13 @@ List listReasonCodes( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; +ListReasonCodesInput listReasonCodesInput = new ListReasonCodesInput.Builder() + .page(2) + .perPage(50) + .build(); try { - List result = reasonCodesController.listReasonCodes(page, perPage); + List result = reasonCodesController.listReasonCodes(listReasonCodesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index eb674ffe..12544337 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -29,11 +29,7 @@ Access to the Sales Commission API endpoints is available to users with financia ```java List listSalesCommissionSettings( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) + final ListSalesCommissionSettingsInput input) ``` ## Parameters @@ -53,13 +49,16 @@ List listSalesCommissionSettings( ## Example Usage ```java -String sellerId = "seller_id8"; -String authorization = "Bearer <>"; -Integer page = 2; -Integer perPage = 100; +ListSalesCommissionSettingsInput listSalesCommissionSettingsInput = new ListSalesCommissionSettingsInput.Builder( + "seller_id8" +) +.authorization("Bearer <>") +.page(2) +.perPage(100) +.build(); try { - List result = salesCommissionsController.listSalesCommissionSettings(sellerId, authorization, null, page, perPage); + List result = salesCommissionsController.listSalesCommissionSettings(listSalesCommissionSettingsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -117,11 +116,7 @@ Access to the Sales Commission API endpoints is available to users with financia ```java List listSalesReps( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) + final ListSalesRepsInput input) ``` ## Parameters @@ -141,13 +136,16 @@ List listSalesReps( ## Example Usage ```java -String sellerId = "seller_id8"; -String authorization = "Bearer <>"; -Integer page = 2; -Integer perPage = 100; +ListSalesRepsInput listSalesRepsInput = new ListSalesRepsInput.Builder( + "seller_id8" +) +.authorization("Bearer <>") +.page(2) +.perPage(100) +.build(); try { - List result = salesCommissionsController.listSalesReps(sellerId, authorization, null, page, perPage); + List result = salesCommissionsController.listSalesReps(listSalesRepsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index 6ee51f1d..3751e3df 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -149,8 +149,7 @@ This endpoint returns public keys used for Chargify.js. ```java ListPublicKeysResponse listChargifyJsPublicKeys( - final Integer page, - final Integer perPage) + final ListChargifyJsPublicKeysInput input) ``` ## Parameters @@ -167,11 +166,13 @@ ListPublicKeysResponse listChargifyJsPublicKeys( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; +ListChargifyJsPublicKeysInput listChargifyJsPublicKeysInput = new ListChargifyJsPublicKeysInput.Builder() + .page(2) + .perPage(50) + .build(); try { - ListPublicKeysResponse result = sitesController.listChargifyJsPublicKeys(page, perPage); + ListPublicKeysResponse result = sitesController.listChargifyJsPublicKeys(listChargifyJsPublicKeysInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 9b658c9e..ff19dd56 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -102,19 +102,7 @@ When requesting to list components for a given subscription, if the subscription ```java List listSubscriptionComponents( - final String subscriptionId, - final SubscriptionListDateField dateField, - final ListSubscriptionComponentsDirection direction, - final String endDate, - final String endDatetime, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsSort sort, - final String startDate, - final String startDatetime, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies) + final ListSubscriptionComponentsInput input) ``` ## Parameters @@ -123,7 +111,7 @@ List listSubscriptionComponents( | --- | --- | --- | --- | | `subscriptionId` | `String` | 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` | [`ListSubscriptionComponentsDirection`](../../doc/models/containers/list-subscription-components-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListSubscriptionComponentsInputDirection`](../../doc/models/containers/list-subscription-components-input-direction.md) | Query, Optional | This is a container for one-of cases. | | `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`. | @@ -142,19 +130,22 @@ List listSubscriptionComponents( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -SubscriptionListDateField dateField = SubscriptionListDateField.UPDATED_AT; -IncludeNotNull pricePointIds = IncludeNotNull.NOT_NULL; -List productFamilyIds = Arrays.asList( - 1, - 2, - 3 -); +ListSubscriptionComponentsInput listSubscriptionComponentsInput = new ListSubscriptionComponentsInput.Builder( + "subscription_id0" +) +.dateField(SubscriptionListDateField.UPDATED_AT) +.pricePointIds(IncludeNotNull.NOT_NULL) +.productFamilyIds(Arrays.asList( + 1, + 2, + 3 + )) +.sort(ListSubscriptionComponentsSort.UPDATED_AT) +.include(ListSubscriptionComponentsInclude.SUBSCRIPTION) +Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key').build(); -ListSubscriptionComponentsSort sort = ListSubscriptionComponentsSort.UPDATED_AT; -ListSubscriptionComponentsInclude include = ListSubscriptionComponentsInclude.SUBSCRIPTION; -Liquid error: Value cannot be null. (Parameter 'key')Liquid error: Value cannot be null. (Parameter 'key')try { - List result = subscriptionComponentsController.listSubscriptionComponents(subscriptionId, dateField, null, null, null, pricePointIds, productFamilyIds, sort, null, null, include, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); +try { + List result = subscriptionComponentsController.listSubscriptionComponents(listSubscriptionComponentsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -1196,14 +1187,7 @@ Use this endpoint to read the previously recorded components for a subscription. ```java List listUsages( - final String subscriptionId, - final int componentId, - final Integer sinceId, - final Integer maxId, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage) + final ListUsagesInput input) ``` ## Parameters @@ -1226,13 +1210,16 @@ List listUsages( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -int componentId = 222; -Integer page = 2; -Integer perPage = 50; +ListUsagesInput listUsagesInput = new ListUsagesInput.Builder( + "subscription_id0", + 222 +) +.page(2) +.perPage(50) +.build(); try { - List result = subscriptionComponentsController.listUsages(subscriptionId, componentId, null, null, null, null, page, perPage); + List result = subscriptionComponentsController.listUsages(listUsagesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); @@ -1477,27 +1464,7 @@ This request will list components applied to each subscription. ```java ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( - final Integer page, - final Integer perPage, - final ListSubscriptionComponentsSort sort, - final ListSubscriptionComponentsForSiteDirection direction, - final SubscriptionListDateField dateField, - final String startDate, - final String startDatetime, - final String endDate, - final String endDatetime, - final List subscriptionIds, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies, - final List filterSubscriptionStates, - final SubscriptionListDateField filterSubscriptionDateField, - final String filterSubscriptionStartDate, - final String filterSubscriptionStartDatetime, - final String filterSubscriptionEndDate, - final String filterSubscriptionEndDatetime) + final ListSubscriptionComponentsForSiteInput input) ``` ## Parameters @@ -1507,7 +1474,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | `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`.
**Default**: `1`
**Constraints**: `>= 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`.
**Default**: `20`
**Constraints**: `<= 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` | [`ListSubscriptionComponentsForSiteDirection`](../../doc/models/containers/list-subscription-components-for-site-direction.md) | Query, Optional | This is a container for one-of cases. | +| `direction` | [`ListSubscriptionComponentsForSiteInputDirection`](../../doc/models/containers/list-subscription-components-for-site-input-direction.md) | Query, Optional | This is a container for one-of cases. | | `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`. | @@ -1533,27 +1500,27 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; -ListSubscriptionComponentsSort sort = ListSubscriptionComponentsSort.UPDATED_AT; -SubscriptionListDateField dateField = SubscriptionListDateField.UPDATED_AT; -List subscriptionIds = Arrays.asList( - 1, - 2, - 3 -); - -IncludeNotNull pricePointIds = IncludeNotNull.NOT_NULL; -List productFamilyIds = Arrays.asList( - 1, - 2, - 3 -); +ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = new ListSubscriptionComponentsForSiteInput.Builder() + .page(2) + .perPage(50) + .sort(ListSubscriptionComponentsSort.UPDATED_AT) + .dateField(SubscriptionListDateField.UPDATED_AT) + .subscriptionIds(Arrays.asList( + 1, + 2, + 3 + )) + .pricePointIds(IncludeNotNull.NOT_NULL) + .productFamilyIds(Arrays.asList( + 1, + 2, + 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(); -ListSubscriptionComponentsInclude 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') try { - ListSubscriptionComponentsResponse result = subscriptionComponentsController.listSubscriptionComponentsForSite(page, perPage, sort, null, dateField, null, null, null, null, subscriptionIds, pricePointIds, productFamilyIds, include, 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')); + ListSubscriptionComponentsResponse result = subscriptionComponentsController.listSubscriptionComponentsForSite(listSubscriptionComponentsForSiteInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 80f0a266..6c241018 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -76,12 +76,7 @@ This request will list a subscription group's prepayments. ```java ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( - final String uid, - final ListSubscriptionGroupPrepaymentDateField filterDateField, - final String filterEndDate, - final String filterStartDate, - final Integer page, - final Integer perPage) + final ListPrepaymentsForSubscriptionGroupInput input) ``` ## Parameters @@ -102,12 +97,15 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( ## Example Usage ```java -String uid = "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')Integer page = 2; -Integer perPage = 50; +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) +.perPage(50) +.build(); try { - ListSubscriptionGroupPrepaymentResponse result = subscriptionGroupInvoiceAccountController.listPrepaymentsForSubscriptionGroup(uid, 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, perPage); + ListSubscriptionGroupPrepaymentResponse result = subscriptionGroupInvoiceAccountController.listPrepaymentsForSubscriptionGroup(listPrepaymentsForSubscriptionGroupInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 71a9eef1..bee9834f 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -175,9 +175,7 @@ Account balance information for the subscription groups is not returned by defau ```java ListSubscriptionGroupsResponse listSubscriptionGroups( - final Integer page, - final Integer perPage, - final String include) + final ListSubscriptionGroupsInput input) ``` ## Parameters @@ -195,11 +193,13 @@ ListSubscriptionGroupsResponse listSubscriptionGroups( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; +ListSubscriptionGroupsInput listSubscriptionGroupsInput = new ListSubscriptionGroupsInput.Builder() + .page(2) + .perPage(50) + .build(); try { - ListSubscriptionGroupsResponse result = subscriptionGroupsController.listSubscriptionGroups(page, perPage, null); + ListSubscriptionGroupsResponse result = subscriptionGroupsController.listSubscriptionGroups(listSubscriptionGroupsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 9be0beb2..35f3ff72 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -128,12 +128,7 @@ This request will list a subscription's prepayments. ```java PrepaymentsResponse listPrepayments( - final String subscriptionId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterStartDate, - final String filterEndDate) + final ListPrepaymentsInput input) ``` ## Parameters @@ -154,12 +149,15 @@ PrepaymentsResponse listPrepayments( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -Integer page = 2; -Integer 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') +ListPrepaymentsInput listPrepaymentsInput = new ListPrepaymentsInput.Builder( + "subscription_id0" +) +.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(); + try { - PrepaymentsResponse result = subscriptionInvoiceAccountController.listPrepayments(subscriptionId, page, perPage, Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key'), Liquid error: Value cannot be null. (Parameter 'key')); + PrepaymentsResponse result = subscriptionInvoiceAccountController.listPrepayments(listPrepaymentsInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 9faa8908..00197cb6 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -116,9 +116,7 @@ Use this method to retrieve a list of Notes associated with a Subscription. The ```java List listSubscriptionNotes( - final String subscriptionId, - final Integer page, - final Integer perPage) + final ListSubscriptionNotesInput input) ``` ## Parameters @@ -136,12 +134,15 @@ List listSubscriptionNotes( ## Example Usage ```java -String subscriptionId = "subscription_id0"; -Integer page = 2; -Integer perPage = 50; +ListSubscriptionNotesInput listSubscriptionNotesInput = new ListSubscriptionNotesInput.Builder( + "subscription_id0" +) +.page(2) +.perPage(50) +.build(); try { - List result = subscriptionNotesController.listSubscriptionNotes(subscriptionId, page, perPage); + List result = subscriptionNotesController.listSubscriptionNotes(listSubscriptionNotesInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index ca1cdcef..c29a9e23 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -37,13 +37,7 @@ This method allows you to fetch data about webhooks. You can pass query paramete ```java List listWebhooks( - final WebhookStatus status, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage, - final WebhookOrder order, - final Integer subscription) + final ListWebhooksInput input) ``` ## Parameters @@ -65,11 +59,13 @@ List listWebhooks( ## Example Usage ```java -Integer page = 2; -Integer perPage = 50; +ListWebhooksInput listWebhooksInput = new ListWebhooksInput.Builder() + .page(2) + .perPage(50) + .build(); try { - List result = webhooksController.listWebhooks(null, null, null, page, perPage, null, null); + List result = webhooksController.listWebhooks(listWebhooksInput); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/models/containers/list-all-component-price-points-direction.md b/doc/models/containers/list-all-component-price-points-direction.md deleted file mode 100644 index 3b8ed04d..00000000 --- a/doc/models/containers/list-all-component-price-points-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List All Component Price Points Direction - -## Class Name - -`ListAllComponentPricePointsDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListAllComponentPricePointsDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-all-component-price-points-input-direction.md b/doc/models/containers/list-all-component-price-points-input-direction.md new file mode 100644 index 00000000..47989f99 --- /dev/null +++ b/doc/models/containers/list-all-component-price-points-input-direction.md @@ -0,0 +1,13 @@ + +# List All Component Price Points Input Direction + +## Class Name + +`ListAllComponentPricePointsInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListAllComponentPricePointsInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-all-product-price-points-direction.md b/doc/models/containers/list-all-product-price-points-direction.md deleted file mode 100644 index fe66cd3c..00000000 --- a/doc/models/containers/list-all-product-price-points-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List All Product Price Points Direction - -## Class Name - -`ListAllProductPricePointsDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListAllProductPricePointsDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-all-product-price-points-input-direction.md b/doc/models/containers/list-all-product-price-points-input-direction.md new file mode 100644 index 00000000..8ffee21f --- /dev/null +++ b/doc/models/containers/list-all-product-price-points-input-direction.md @@ -0,0 +1,13 @@ + +# List All Product Price Points Input Direction + +## Class Name + +`ListAllProductPricePointsInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListAllProductPricePointsInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-customers-direction.md b/doc/models/containers/list-customers-direction.md deleted file mode 100644 index b3258574..00000000 --- a/doc/models/containers/list-customers-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List Customers Direction - -## Class Name - -`ListCustomersDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListCustomersDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-customers-input-direction.md b/doc/models/containers/list-customers-input-direction.md new file mode 100644 index 00000000..d991537c --- /dev/null +++ b/doc/models/containers/list-customers-input-direction.md @@ -0,0 +1,13 @@ + +# List Customers Input Direction + +## Class Name + +`ListCustomersInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListCustomersInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-metadata-direction.md b/doc/models/containers/list-metadata-direction.md deleted file mode 100644 index db3e8529..00000000 --- a/doc/models/containers/list-metadata-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List Metadata Direction - -## Class Name - -`ListMetadataDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListMetadataDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-metadata-input-direction.md b/doc/models/containers/list-metadata-input-direction.md new file mode 100644 index 00000000..e8a290b0 --- /dev/null +++ b/doc/models/containers/list-metadata-input-direction.md @@ -0,0 +1,13 @@ + +# List Metadata Input Direction + +## Class Name + +`ListMetadataInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListMetadataInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-metafields-direction.md b/doc/models/containers/list-metafields-direction.md deleted file mode 100644 index b9670766..00000000 --- a/doc/models/containers/list-metafields-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List Metafields Direction - -## Class Name - -`ListMetafieldsDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListMetafieldsDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-metafields-input-direction.md b/doc/models/containers/list-metafields-input-direction.md new file mode 100644 index 00000000..a8a18680 --- /dev/null +++ b/doc/models/containers/list-metafields-input-direction.md @@ -0,0 +1,13 @@ + +# List Metafields Input Direction + +## Class Name + +`ListMetafieldsInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListMetafieldsInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-subscription-components-direction.md b/doc/models/containers/list-subscription-components-direction.md deleted file mode 100644 index b4ecdd99..00000000 --- a/doc/models/containers/list-subscription-components-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List Subscription Components Direction - -## Class Name - -`ListSubscriptionComponentsDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListSubscriptionComponentsDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-subscription-components-for-site-direction.md b/doc/models/containers/list-subscription-components-for-site-direction.md deleted file mode 100644 index e473142b..00000000 --- a/doc/models/containers/list-subscription-components-for-site-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# List Subscription Components for Site Direction - -## Class Name - -`ListSubscriptionComponentsForSiteDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListSubscriptionComponentsForSiteDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/list-subscription-components-for-site-input-direction.md b/doc/models/containers/list-subscription-components-for-site-input-direction.md new file mode 100644 index 00000000..960b502b --- /dev/null +++ b/doc/models/containers/list-subscription-components-for-site-input-direction.md @@ -0,0 +1,13 @@ + +# List Subscription Components for Site Input Direction + +## Class Name + +`ListSubscriptionComponentsForSiteInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListSubscriptionComponentsForSiteInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/list-subscription-components-input-direction.md b/doc/models/containers/list-subscription-components-input-direction.md new file mode 100644 index 00000000..3f48f999 --- /dev/null +++ b/doc/models/containers/list-subscription-components-input-direction.md @@ -0,0 +1,13 @@ + +# List Subscription Components Input Direction + +## Class Name + +`ListSubscriptionComponentsInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ListSubscriptionComponentsInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/containers/read-mrr-movements-direction.md b/doc/models/containers/read-mrr-movements-direction.md deleted file mode 100644 index ce5e8f56..00000000 --- a/doc/models/containers/read-mrr-movements-direction.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Read Mrr Movements Direction - -## Class Name - -`ReadMrrMovementsDirection` - -## Cases - -| Type | Factory Method | -| --- | --- | -| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ReadMrrMovementsDirection.fromSortingDirection(SortingDirection sortingDirection) | - diff --git a/doc/models/containers/read-mrr-movements-input-direction.md b/doc/models/containers/read-mrr-movements-input-direction.md new file mode 100644 index 00000000..b7e0c51b --- /dev/null +++ b/doc/models/containers/read-mrr-movements-input-direction.md @@ -0,0 +1,13 @@ + +# Read Mrr Movements Input Direction + +## Class Name + +`ReadMrrMovementsInputDirection` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`SortingDirection`](../../../doc/models/sorting-direction.md) | ReadMrrMovementsInputDirection.fromSortingDirection(SortingDirection sortingDirection) | + diff --git a/doc/models/recurring-scheme.md b/doc/models/recurring-scheme.md index 51267472..547307c3 100644 --- a/doc/models/recurring-scheme.md +++ b/doc/models/recurring-scheme.md @@ -11,4 +11,5 @@ | --- | | `DoNotRecur` | | `RecurIndefinitely` | +| `RecurWithDuration` | diff --git a/pom.xml b/pom.xml index b7476c49..bdca441a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,20 +21,8 @@ Maxio integrates directly into your product, so you can seamlessly manage your p - Michał Pieróg - michal.pierog@maxio.com - Maxio - https://www.maxio.com/ - - - Patryk Grudzień - patryk.grudzien@maxio.com - Maxio - https://www.maxio.com/ - - - Maciej Nędza - maciej.nedza@maxio.com + MaxioSDK + maxio-sdk@maxio.com Maxio https://www.maxio.com/ diff --git a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java index d8c0eaed..725730d4 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java @@ -13,6 +13,9 @@ import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.BatchJobResponse; import com.maxio.advancedbilling.models.Invoice; +import com.maxio.advancedbilling.models.ListExportedInvoicesInput; +import com.maxio.advancedbilling.models.ListExportedProformaInvoicesInput; +import com.maxio.advancedbilling.models.ListExportedSubscriptionsInput; import com.maxio.advancedbilling.models.ProformaInvoice; import com.maxio.advancedbilling.models.Subscription; import io.apimatic.core.ApiCall; @@ -38,45 +41,32 @@ public APIExportsController(GlobalConfiguration globalConfig) { /** * This API returns an array of exported proforma invoices for a provided `batch_id`. Pay close * attention to pagination in order to control responses from the server. Example: `GET - * https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. - * @param batchId Required parameter: Id of a Batch Job. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. The maximum allowed values is 10000; any per_page - * value over 10000 will be changed to 10000. - * @param page Optional parameter: 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`. + * https://{subdomain}.chargify.com/api_exports/proforma_invoices/123/rows?per_page=10000&page=1`. + * @param input ListExportedProformaInvoicesInput object containing request parameters * @return Returns the List of ProformaInvoice response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listExportedProformaInvoices( - final String batchId, - final Integer perPage, - final Integer page) throws ApiException, IOException { - return prepareListExportedProformaInvoicesRequest(batchId, perPage, page).execute(); + final ListExportedProformaInvoicesInput input) throws ApiException, IOException { + return prepareListExportedProformaInvoicesRequest(input).execute(); } /** * Builds the ApiCall object for listExportedProformaInvoices. */ private ApiCall, ApiException> prepareListExportedProformaInvoicesRequest( - final String batchId, - final Integer perPage, - final Integer page) throws IOException { + final ListExportedProformaInvoicesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/api_exports/proforma_invoices/{batch_id}/rows.json") .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) - .templateParam(param -> param.key("batch_id").value(batchId) + .value(input.getPage()).isRequired(false)) + .templateParam(param -> param.key("batch_id").value(input.getBatchId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -94,45 +84,32 @@ private ApiCall, ApiException> prepareListExportedProforma /** * This API returns an array of exported invoices for a provided `batch_id`. Pay close attention * to pagination in order to control responses from the server. Example: `GET - * https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. - * @param batchId Required parameter: Id of a Batch Job. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. The maximum allowed values is 10000; any per_page - * value over 10000 will be changed to 10000. - * @param page Optional parameter: 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`. + * https://{subdomain}.chargify.com/api_exports/invoices/123/rows?per_page=10000&page=1`. + * @param input ListExportedInvoicesInput object containing request parameters * @return Returns the List of Invoice response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listExportedInvoices( - final String batchId, - final Integer perPage, - final Integer page) throws ApiException, IOException { - return prepareListExportedInvoicesRequest(batchId, perPage, page).execute(); + final ListExportedInvoicesInput input) throws ApiException, IOException { + return prepareListExportedInvoicesRequest(input).execute(); } /** * Builds the ApiCall object for listExportedInvoices. */ private ApiCall, ApiException> prepareListExportedInvoicesRequest( - final String batchId, - final Integer perPage, - final Integer page) throws IOException { + final ListExportedInvoicesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/api_exports/invoices/{batch_id}/rows.json") .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) - .templateParam(param -> param.key("batch_id").value(batchId) + .value(input.getPage()).isRequired(false)) + .templateParam(param -> param.key("batch_id").value(input.getBatchId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -150,45 +127,32 @@ private ApiCall, ApiException> prepareListExportedInvoicesRequest( /** * This API returns an array of exported subscriptions for a provided `batch_id`. Pay close * attention to pagination in order to control responses from the server. Example: `GET - * https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. - * @param batchId Required parameter: Id of a Batch Job. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. The maximum allowed values is 10000; any per_page - * value over 10000 will be changed to 10000. - * @param page Optional parameter: 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`. + * https://{subdomain}.chargify.com/api_exports/subscriptions/123/rows?per_page=200&page=1`. + * @param input ListExportedSubscriptionsInput object containing request parameters * @return Returns the List of Subscription response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listExportedSubscriptions( - final String batchId, - final Integer perPage, - final Integer page) throws ApiException, IOException { - return prepareListExportedSubscriptionsRequest(batchId, perPage, page).execute(); + final ListExportedSubscriptionsInput input) throws ApiException, IOException { + return prepareListExportedSubscriptionsRequest(input).execute(); } /** * Builds the ApiCall object for listExportedSubscriptions. */ private ApiCall, ApiException> prepareListExportedSubscriptionsRequest( - final String batchId, - final Integer perPage, - final Integer page) throws IOException { + final ListExportedSubscriptionsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/api_exports/subscriptions/{batch_id}/rows.json") .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) - .templateParam(param -> param.key("batch_id").value(batchId) + .value(input.getPage()).isRequired(false)) + .templateParam(param -> param.key("batch_id").value(input.getBatchId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java index 7b852015..faea2673 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java @@ -50,7 +50,7 @@ public BillingPortalController(GlobalConfiguration globalConfig) { * you need to provide your customer their Management URL through other means, you can retrieve * it via the API. Because the URL is cryptographically signed with a timestamp, it is not * possible for merchants to generate the URL without requesting it from Chargify. In order to - * prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. + * prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. * Management URLs are good for 65 days, so you should re-use a previously generated one as much * as possible. If you use the URL frequently (such as to display on your website), please **do * not** make an API request to Chargify every time. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java index d4d9cec6..771c42a9 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java @@ -12,7 +12,6 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.ComponentKindPath; import com.maxio.advancedbilling.models.ComponentPricePointResponse; import com.maxio.advancedbilling.models.ComponentPricePointsResponse; @@ -21,15 +20,15 @@ import com.maxio.advancedbilling.models.CreateComponentPricePointsRequest; import com.maxio.advancedbilling.models.CreateCurrencyPricesRequest; import com.maxio.advancedbilling.models.CurrencyPrice; -import com.maxio.advancedbilling.models.IncludeNotNull; -import com.maxio.advancedbilling.models.ListComponentsPricePointsInclude; +import com.maxio.advancedbilling.models.ListAllComponentPricePointsInput; +import com.maxio.advancedbilling.models.ListComponentPricePointsInput; +import com.maxio.advancedbilling.models.ListComponentsForProductFamilyInput; +import com.maxio.advancedbilling.models.ListComponentsInput; import com.maxio.advancedbilling.models.ListComponentsPricePointsResponse; -import com.maxio.advancedbilling.models.PricePointType; import com.maxio.advancedbilling.models.UpdateComponentPricePointRequest; import com.maxio.advancedbilling.models.UpdateComponentRequest; import com.maxio.advancedbilling.models.UpdateCurrencyPricesRequest; import com.maxio.advancedbilling.models.containers.CreateComponentBody; -import com.maxio.advancedbilling.models.containers.ListAllComponentPricePointsDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -304,98 +303,46 @@ private ApiCall prepareArchiveComponentRequest( /** * This request will return a list of components for a site. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. - * @param startDate Optional parameter: 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. - * @param endDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param endDatetime Optional parameter: 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 - * @param includeArchived Optional parameter: Include archived items - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterIds Optional parameter: Allows fetching components with matching id based on - * provided value. Use in query `filter[ids]=1,2,3`. - * @param filterUseSiteExchangeRate Optional parameter: 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 input ListComponentsInput object containing request parameters * @return Returns the List of ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listComponents( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final Integer page, - final Integer perPage, - final List filterIds, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListComponentsRequest(dateField, startDate, endDate, startDatetime, - endDatetime, includeArchived, page, perPage, filterIds, - filterUseSiteExchangeRate).execute(); + final ListComponentsInput input) throws ApiException, IOException { + return prepareListComponentsRequest(input).execute(); } /** * Builds the ApiCall object for listComponents. */ private ApiCall, ApiException> prepareListComponentsRequest( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final Integer page, - final Integer perPage, - final List filterIds, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListComponentsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/components.json") .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("include_archived") - .value(includeArchived).isRequired(false)) + .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) + .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -496,102 +443,47 @@ private ApiCall prepareUpdateDefaultPricePointForComponentRe /** * This request will return a list of components for a particular product family. - * @param productFamilyId Required parameter: The Chargify id of the product family - * @param includeArchived Optional parameter: Include archived items. - * @param filterIds Optional parameter: Allows fetching components with matching id based on - * provided value. Use in query `filter[ids]=1,2`. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query `date_field=created_at`. - * @param endDate Optional parameter: 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. - * @param endDatetime Optional parameter: 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. - * @param startDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param filterUseSiteExchangeRate Optional parameter: 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 input ListComponentsForProductFamilyInput object containing request parameters * @return Returns the List of ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listComponentsForProductFamily( - final int productFamilyId, - final Boolean includeArchived, - final List filterIds, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListComponentsForProductFamilyRequest(productFamilyId, includeArchived, - filterIds, page, perPage, dateField, endDate, endDatetime, startDate, startDatetime, - filterUseSiteExchangeRate).execute(); + final ListComponentsForProductFamilyInput input) throws ApiException, IOException { + return prepareListComponentsForProductFamilyRequest(input).execute(); } /** * Builds the ApiCall object for listComponentsForProductFamily. */ private ApiCall, ApiException> prepareListComponentsForProductFamilyRequest( - final int productFamilyId, - final Boolean includeArchived, - final List filterIds, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListComponentsForProductFamilyInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/product_families/{product_family_id}/components.json") .queryParam(param -> param.key("include_archived") - .value(includeArchived).isRequired(false)) + .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) - .templateParam(param -> param.key("product_family_id").value(productFamilyId).isRequired(false) + .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")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -657,55 +549,35 @@ private ApiCall prepareCreateComponen * currency price data in the response. If the price point is set to `use_site_exchange_rate: * true`, it will return pricing based on the current exchange rate. If the flag is set to * false, it will return all of the defined prices for each currency. - * @param componentId Required parameter: The Chargify id of the component - * @param currencyPrices Optional parameter: Include an array of currency price data - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterType Optional parameter: Use in query: `filter[type]=catalog,default`. + * @param input ListComponentPricePointsInput object containing request parameters * @return Returns the ComponentPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ComponentPricePointsResponse listComponentPricePoints( - final int componentId, - final Boolean currencyPrices, - final Integer page, - final Integer perPage, - final List filterType) throws ApiException, IOException { - return prepareListComponentPricePointsRequest(componentId, currencyPrices, page, perPage, - filterType).execute(); + final ListComponentPricePointsInput input) throws ApiException, IOException { + return prepareListComponentPricePointsRequest(input).execute(); } /** * Builds the ApiCall object for listComponentPricePoints. */ private ApiCall prepareListComponentPricePointsRequest( - final int componentId, - final Boolean currencyPrices, - final Integer page, - final Integer perPage, - final List filterType) throws IOException { + final ListComponentPricePointsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/components/{component_id}/price_points.json") .queryParam(param -> param.key("currency_prices") - .value(currencyPrices).isRequired(false)) + .value(input.getCurrencyPrices()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[type]") - .value(PricePointType.toValue(filterType)).isRequired(false)) - .templateParam(param -> param.key("component_id").value(componentId).isRequired(false) + .value(PricePointType.toValue(input.getFilterType())).isRequired(false)) + .templateParam(param -> param.key("component_id").value(input.getComponentId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -997,110 +869,50 @@ private ApiCall, ApiException> prepareUpdateCurrencyPricesRe /** * This method allows to retrieve a list of Components Price Points belonging to a Site. - * @param filterDateField Optional parameter: The type of filter you would like to apply to - * your search. Use in query: `filter[date_field]=created_at`. - * @param filterEndDate Optional parameter: 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 filterEndDatetime Optional parameter: 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 include Optional parameter: Allows including additional data in the response. Use in - * query: `include=currency_prices`. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterStartDate Optional parameter: 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 filterStartDatetime Optional parameter: 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 filterType Optional parameter: Allows fetching price points with matching type. Use - * in query: `filter[type]=custom,catalog`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. - * @param filterIds Optional parameter: Allows fetching price points with matching id based on - * provided values. Use in query: `filter[ids]=1,2,3`. - * @param filterArchivedAt Optional parameter: Allows fetching price points only if - * archived_at is present or not. Use in query: `filter[archived_at]=not_null`. + * @param input ListAllComponentPricePointsInput object containing request parameters * @return Returns the ListComponentsPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListComponentsPricePointsResponse listAllComponentPricePoints( - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final ListComponentsPricePointsInclude include, - final Integer page, - final Integer perPage, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListAllComponentPricePointsDirection direction, - final List filterIds, - final IncludeNotNull filterArchivedAt) throws ApiException, IOException { - return prepareListAllComponentPricePointsRequest(filterDateField, filterEndDate, - filterEndDatetime, include, page, perPage, filterStartDate, filterStartDatetime, - filterType, direction, filterIds, filterArchivedAt).execute(); + final ListAllComponentPricePointsInput input) throws ApiException, IOException { + return prepareListAllComponentPricePointsRequest(input).execute(); } /** * Builds the ApiCall object for listAllComponentPricePoints. */ private ApiCall prepareListAllComponentPricePointsRequest( - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final ListComponentsPricePointsInclude include, - final Integer page, - final Integer perPage, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListAllComponentPricePointsDirection direction, - final List filterIds, - final IncludeNotNull filterArchivedAt) throws IOException { + final ListAllComponentPricePointsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/components_price_points.json") .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) + .value(input.getFilterEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[end_datetime]") - .value(filterEndDatetime).isRequired(false)) + .value(input.getFilterEndDatetime()).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[start_datetime]") - .value(filterStartDatetime).isRequired(false)) + .value(input.getFilterStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[type]") - .value((filterType != null) ? filterType.value() : null).isRequired(false)) + .value((input.getFilterType() != null) ? input.getFilterType().value() : null).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("filter[archived_at]") - .value((filterArchivedAt != null) ? filterArchivedAt.value() : null).isRequired(false)) + .value((input.getFilterArchivedAt() != null) ? input.getFilterArchivedAt().value() : null).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java index 3852c60d..9c8fca91 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java @@ -13,13 +13,15 @@ import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.exceptions.SingleStringErrorResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CouponCurrency; import com.maxio.advancedbilling.models.CouponCurrencyRequest; import com.maxio.advancedbilling.models.CouponResponse; import com.maxio.advancedbilling.models.CouponSubcodes; import com.maxio.advancedbilling.models.CouponSubcodesResponse; import com.maxio.advancedbilling.models.CouponUsage; +import com.maxio.advancedbilling.models.ListCouponSubcodesInput; +import com.maxio.advancedbilling.models.ListCouponsForProductFamilyInput; +import com.maxio.advancedbilling.models.ListCouponsInput; import com.maxio.advancedbilling.models.containers.CreateCouponBody; import com.maxio.advancedbilling.models.containers.UpdateCouponBody; import io.apimatic.core.ApiCall; @@ -104,115 +106,49 @@ private ApiCall prepareCreateCouponRequest( * List coupons for a specific Product Family in a Site. If the coupon is set to * `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If * the flag is set to false, it will return all of the defined prices for each currency. - * @param productFamilyId Required parameter: The Chargify id of the product family to which - * the coupon belongs - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterDateField Optional parameter: The type of filter you would like to apply to - * your search. Use in query `filter[date_field]=created_at`. - * @param filterEndDate Optional parameter: 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 filterEndDatetime Optional parameter: 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 filterStartDate Optional parameter: 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 filterStartDatetime Optional parameter: 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 filterIds Optional parameter: Allows fetching coupons with matching id based on - * provided values. Use in query `filter[ids]=1,2,3`. - * @param filterCodes Optional parameter: Allows fetching coupons with matching codes based on - * provided values. Use in query `filter[codes]=free,free_trial`. - * @param currencyPrices Optional parameter: 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`. - * @param filterUseSiteExchangeRate Optional parameter: Allows fetching coupons with matching - * use_site_exchange_rate based on provided value. Use in query - * `filter[use_site_exchange_rate]=true`. + * @param input ListCouponsForProductFamilyInput object containing request parameters * @return Returns the List of CouponResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listCouponsForProductFamily( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListCouponsForProductFamilyRequest(productFamilyId, page, perPage, - filterDateField, filterEndDate, filterEndDatetime, filterStartDate, - filterStartDatetime, filterIds, filterCodes, currencyPrices, - filterUseSiteExchangeRate).execute(); + final ListCouponsForProductFamilyInput input) throws ApiException, IOException { + return prepareListCouponsForProductFamilyRequest(input).execute(); } /** * Builds the ApiCall object for listCouponsForProductFamily. */ private ApiCall, ApiException> prepareListCouponsForProductFamilyRequest( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListCouponsForProductFamilyInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/product_families/{product_family_id}/coupons.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 30).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) + .value(input.getFilterEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[end_datetime]") - .value(filterEndDatetime).isRequired(false)) + .value(input.getFilterEndDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[start_datetime]") - .value(filterStartDatetime).isRequired(false)) + .value(input.getFilterStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("filter[codes]") - .value(filterCodes).isRequired(false)) + .value(input.getFilterCodes()).isRequired(false)) .queryParam(param -> param.key("currency_prices") - .value(currencyPrices).isRequired(false)) + .value(input.getCurrencyPrices()).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) - .templateParam(param -> param.key("product_family_id").value(productFamilyId).isRequired(false) + .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")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -422,155 +358,58 @@ private ApiCall prepareArchiveCouponRequest( * You can retrieve a list of coupons. If the coupon is set to `use_site_exchange_rate: true`, * it will return pricing based on the current exchange rate. If the flag is set to false, it * will return all of the defined prices for each currency. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param dateField Optional parameter: 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 startDate Optional parameter: 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 endDate Optional parameter: 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 startDatetime Optional parameter: 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 endDatetime Optional parameter: 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 filterIds Optional parameter: Allows fetching coupons with matching id based on - * provided values. Use in query `filter[ids]=1,2,3`. - * @param filterCodes Optional parameter: Allows fetching coupons with matching code based on - * provided values. Use in query `filter[ids]=1,2,3`. - * @param currencyPrices Optional parameter: 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`. - * @param filterEndDate Optional parameter: 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 filterEndDatetime Optional parameter: 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 filterStartDate Optional parameter: 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 filterStartDatetime Optional parameter: 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 filterDateField Optional parameter: The type of filter you would like to apply to - * your search. Use in query `filter[date_field]=updated_at`. - * @param filterUseSiteExchangeRate Optional parameter: Allows fetching coupons with matching - * use_site_exchange_rate based on provided value. Use in query - * `filter[use_site_exchange_rate]=true`. + * @param input ListCouponsInput object containing request parameters * @return Returns the List of CouponResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listCoupons( - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final BasicDateField filterDateField, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListCouponsRequest(page, perPage, dateField, startDate, endDate, - startDatetime, endDatetime, filterIds, filterCodes, currencyPrices, filterEndDate, - filterEndDatetime, filterStartDate, filterStartDatetime, filterDateField, - filterUseSiteExchangeRate).execute(); + final ListCouponsInput input) throws ApiException, IOException { + return prepareListCouponsRequest(input).execute(); } /** * Builds the ApiCall object for listCoupons. */ private ApiCall, ApiException> prepareListCouponsRequest( - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final List filterIds, - final List filterCodes, - final Boolean currencyPrices, - final String filterEndDate, - final String filterEndDatetime, - final String filterStartDate, - final String filterStartDatetime, - final BasicDateField filterDateField, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListCouponsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/coupons.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 30).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("filter[codes]") - .value(filterCodes).isRequired(false)) + .value(input.getFilterCodes()).isRequired(false)) .queryParam(param -> param.key("currency_prices") - .value(currencyPrices).isRequired(false)) + .value(input.getCurrencyPrices()).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) + .value(input.getFilterEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[end_datetime]") - .value(filterEndDatetime).isRequired(false)) + .value(input.getFilterEndDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[start_datetime]") - .value(filterStartDatetime).isRequired(false)) + .value(input.getFilterStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) + .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -641,7 +480,7 @@ private ApiCall, ApiException> prepareReadCouponUsageRequest( * the `handle:my-family` format. Eg. ``` * https://<subdomain>.chargify.com/product_families/handle:<product_family_handle>/coupons/validate.<format>?code=<coupon_code> * ``` Or: ``` - * https://<subdomain>.chargify.com/coupons/validate.<format>?code=<coupon_code>&product_family_id=<id> + * https://<subdomain>.chargify.com/coupons/validate.<format>?code=<coupon_code>&product_family_id=<id> * ```. * @param code Required parameter: The code of the coupon * @param productFamilyId Optional parameter: The Chargify id of the product family to which @@ -746,8 +585,8 @@ private ApiCall, ApiException> prepareUpdateCouponCurrencyP * Chargify UI, please see our documentation * [here](https://chargify.zendesk.com/hc/en-us/articles/4407884887835#coupon). ## Create Coupon * Subcode This request allows you to create specific subcodes underneath an existing coupon - * code. *Note*: If you are using any of the allowed special characters ("%", "@", "+", "-", - * "_", and "."), you must encode them for use in the URL. % to %25 @ to %40 + to %2B - to %2D _ + * code. *Note*: If you are using any of the allowed special characters ("%", "{@literal @}", "+", "-", + * "_", and "."), you must encode them for use in the URL. % to %25 {@literal @} to %40 + to %2B - to %2D _ * to %5F . to %2E So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode * would be: `https://<subdomain>.chargify.com/coupons/567/codes/20%25OFF.<format>`. * @param couponId Required parameter: The Chargify id of the coupon @@ -793,44 +632,31 @@ private ApiCall prepareCreateCouponSubcode /** * This request allows you to request the subcodes that are attached to a coupon. - * @param couponId Required parameter: The Chargify id of the coupon - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListCouponSubcodesInput object containing request parameters * @return Returns the CouponSubcodes response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public CouponSubcodes listCouponSubcodes( - final int couponId, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListCouponSubcodesRequest(couponId, page, perPage).execute(); + final ListCouponSubcodesInput input) throws ApiException, IOException { + return prepareListCouponSubcodesRequest(input).execute(); } /** * Builds the ApiCall object for listCouponSubcodes. */ private ApiCall prepareListCouponSubcodesRequest( - final int couponId, - final Integer page, - final Integer perPage) throws IOException { + final ListCouponSubcodesInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/coupons/{coupon_id}/codes.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) - .templateParam(param -> param.key("coupon_id").value(couponId).isRequired(false) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("coupon_id").value(input.getCouponId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -895,11 +721,11 @@ private ApiCall prepareUpdateCouponSubcode * ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to * `DELETE` this coupon subcode would be: ``` * http://subdomain.chargify.com/coupons/567/codes/20OFF.<format> ``` Note: If you are using any - * of the allowed special characters (“%”, “@”, “+”, “-”, “_”, and “.”), you must encode them + * of the allowed special characters (“%”, “{@literal @}”, “+”, “-”, “_”, and “.”), you must encode them * for use in the URL. | Special character | Encoding | |-------------------|----------| | % | - * %25 | | @ | %40 | | + | %2B | | – | %2D | | _ | %5F | | . | %2E | ## Percent Encoding Example + * %25 | | {@literal @} | %40 | | + | %2B | | – | %2D | | _ | %5F | | . | %2E | ## Percent Encoding Example * Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: - * @https://<subdomain>.chargify.com/coupons/567/codes/20%25OFF.<format>. + * {@literal @}https://<subdomain>.chargify.com/coupons/567/codes/20%25OFF.<format>. * @param couponId Required parameter: The Chargify id of the coupon to which the subcode * belongs * @param subcode Required parameter: The subcode of the coupon diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java index f8e6b5a0..6fb07935 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java @@ -11,18 +11,18 @@ import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CreateMetadataRequest; import com.maxio.advancedbilling.models.CreateMetafieldsRequest; +import com.maxio.advancedbilling.models.ListMetadataInput; +import com.maxio.advancedbilling.models.ListMetafieldsInput; import com.maxio.advancedbilling.models.ListMetafieldsResponse; import com.maxio.advancedbilling.models.Metadata; import com.maxio.advancedbilling.models.Metafield; import com.maxio.advancedbilling.models.PaginatedMetadata; +import com.maxio.advancedbilling.models.ReadMetadataInput; import com.maxio.advancedbilling.models.ResourceType; import com.maxio.advancedbilling.models.UpdateMetadataRequest; import com.maxio.advancedbilling.models.UpdateMetafieldsRequest; -import com.maxio.advancedbilling.models.containers.ListMetadataDirection; -import com.maxio.advancedbilling.models.containers.ListMetafieldsDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -112,55 +112,35 @@ private ApiCall, ApiException> prepareCreateMetafieldsRequest( /** * This endpoint lists metafields associated with a site. The metafield description and usage is * contained in the response. - * @param resourceType Required parameter: the resource type to which the metafields belong - * @param name Optional parameter: filter by the name of the metafield - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. + * @param input ListMetafieldsInput object containing request parameters * @return Returns the ListMetafieldsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListMetafieldsResponse listMetafields( - final ResourceType resourceType, - final String name, - final Integer page, - final Integer perPage, - final ListMetafieldsDirection direction) throws ApiException, IOException { - return prepareListMetafieldsRequest(resourceType, name, page, perPage, direction).execute(); + final ListMetafieldsInput input) throws ApiException, IOException { + return prepareListMetafieldsRequest(input).execute(); } /** * Builds the ApiCall object for listMetafields. */ private ApiCall prepareListMetafieldsRequest( - final ResourceType resourceType, - final String name, - final Integer page, - final Integer perPage, - final ListMetafieldsDirection direction) throws IOException { + final ListMetafieldsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/{resource_type}/metafields.json") .queryParam(param -> param.key("name") - .value(name).isRequired(false)) + .value(input.getName()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) - .templateParam(param -> param.key("resource_type").value((resourceType != null) ? resourceType.value() : null) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) + .templateParam(param -> param.key("resource_type").value((input.getResourceType() != null) ? input.getResourceType().value() : null) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -350,50 +330,33 @@ private ApiCall, ApiException> prepareCreateMetadataRequest( * This request will list all of the metadata belonging to a particular resource (ie. * subscription, customer) that is specified. ## Metadata Data This endpoint will also display * the current stats of your metadata to use as a tool for pagination. - * @param resourceType Required parameter: the resource type to which the metafields belong - * @param resourceId Required parameter: The Chargify id of the customer or the subscription - * for which the metadata applies - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ReadMetadataInput object containing request parameters * @return Returns the PaginatedMetadata response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public PaginatedMetadata readMetadata( - final ResourceType resourceType, - final String resourceId, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareReadMetadataRequest(resourceType, resourceId, page, perPage).execute(); + final ReadMetadataInput input) throws ApiException, IOException { + return prepareReadMetadataRequest(input).execute(); } /** * Builds the ApiCall object for readMetadata. */ private ApiCall prepareReadMetadataRequest( - final ResourceType resourceType, - final String resourceId, - final Integer page, - final Integer perPage) throws IOException { + final ReadMetadataInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/{resource_type}/{resource_id}/metadata.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) - .templateParam(param -> param.key("resource_type").value((resourceType != null) ? resourceType.value() : null) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("resource_type").value((input.getResourceType() != null) ? input.getResourceType().value() : null) .shouldEncode(true)) - .templateParam(param -> param.key("resource_id").value(resourceId) + .templateParam(param -> param.key("resource_id").value(input.getResourceId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -468,7 +431,7 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest( * For instance if you wanted to delete the metadata for customer 99 named weight you would * request: ``` https://acme.chargify.com/customers/99/metadata.json?name=weight ``` If you want * to delete multiple metadata fields for a customer 99 named: `weight` and `age` you wrould - * request: ``` https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[]=age + * request: ``` https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[]=age * ``` ## Successful Response For a success, there will be a code `200` and the plain text * response `true`. ## Unsuccessful Response When a failed response is encountered, you will * receive a `404` response and the plain text response of `true`. @@ -477,7 +440,7 @@ private ApiCall, ApiException> prepareUpdateMetadataRequest( * for which the metadata applies * @param name Optional parameter: Name of field to be removed. * @param names Optional parameter: Names of fields to be removed. Use in query: - * `names[]=field1&names[]=my-field&names[]=another-field`. + * `names[]=field1&names[]=my-field&names[]=another-field`. * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ @@ -527,104 +490,50 @@ private ApiCall prepareDeleteMetadataRequest( * This method will provide you information on usage of metadata across your selected resource * (ie. subscriptions, customers) ## Metadata Data This endpoint will also display the current * stats of your metadata to use as a tool for pagination. ### Metadata for multiple records - * `https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&resource_ids[]=2` ## + * `https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&resource_ids[]=2` ## * Read Metadata for a Site This endpoint will list the number of pages of metadata information * that are contained within a site. - * @param resourceType Required parameter: the resource type to which the metafields belong - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. - * @param startDate Optional parameter: The start date (format YYYY-MM-DD) with which to - * filter the date_field. Returns metadata with a timestamp at or after midnight - * (12:00:00 AM) in your site’s time zone on the date specified. - * @param endDate Optional parameter: The end date (format YYYY-MM-DD) with which to filter - * the date_field. Returns metadata with a timestamp up to and including 11:59:59PM in - * your site’s time zone on the date specified. - * @param startDatetime Optional parameter: The start date and time (format YYYY-MM-DD - * HH:MM:SS) with which to filter the date_field. Returns metadata 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 endDatetime Optional parameter: The end date and time (format YYYY-MM-DD HH:MM:SS) - * with which to filter the date_field. Returns metadata 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 withDeleted Optional parameter: Allow to fetch deleted metadata. - * @param resourceIds Optional parameter: Allow to fetch metadata for multiple records based - * on provided ids. Use in query: - * `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. + * @param input ListMetadataInput object containing request parameters * @return Returns the PaginatedMetadata response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public PaginatedMetadata listMetadata( - final ResourceType resourceType, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean withDeleted, - final List resourceIds, - final ListMetadataDirection direction) throws ApiException, IOException { - return prepareListMetadataRequest(resourceType, page, perPage, dateField, startDate, - endDate, startDatetime, endDatetime, withDeleted, resourceIds, direction).execute(); + final ListMetadataInput input) throws ApiException, IOException { + return prepareListMetadataRequest(input).execute(); } /** * Builds the ApiCall object for listMetadata. */ private ApiCall prepareListMetadataRequest( - final ResourceType resourceType, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean withDeleted, - final List resourceIds, - final ListMetadataDirection direction) throws IOException { + final ListMetadataInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/{resource_type}/metadata.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("with_deleted") - .value(withDeleted).isRequired(false)) + .value(input.getWithDeleted()).isRequired(false)) .queryParam(param -> param.key("resource_ids[]") - .value(resourceIds).isRequired(false)) + .value(input.getResourceIds()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) - .templateParam(param -> param.key("resource_type").value((resourceType != null) ? resourceType.value() : null) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) + .templateParam(param -> param.key("resource_type").value((input.getResourceType() != null) ? input.getResourceType().value() : null) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java index e33a41b3..8c83638e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java @@ -12,12 +12,11 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.CustomerErrorResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CreateCustomerRequest; import com.maxio.advancedbilling.models.CustomerResponse; +import com.maxio.advancedbilling.models.ListCustomersInput; import com.maxio.advancedbilling.models.SubscriptionResponse; import com.maxio.advancedbilling.models.UpdateCustomerRequest; -import com.maxio.advancedbilling.models.containers.ListCustomersDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -108,90 +107,44 @@ private ApiCall prepareCreateCustomerRequest( * by a first or last name To retrieve a single, exact match by reference, please use the * [lookup * endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference). - * @param direction Optional parameter: Direction to sort customers by time of creation - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 50. The maximum allowed values is 200; any per_page - * value over 200 will be changed to 200. Use in query `per_page=200`. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query: `date_field=created_at`. - * @param startDate Optional parameter: The start date (format YYYY-MM-DD) with which to - * filter the date_field. Returns subscriptions with a timestamp at or after midnight - * (12:00:00 AM) in your site’s time zone on the date specified. - * @param endDate Optional parameter: The end date (format YYYY-MM-DD) with which to filter - * the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM - * in your site’s time zone on the date specified. - * @param startDatetime Optional parameter: The start date and time (format YYYY-MM-DD - * HH:MM:SS) with which to filter the date_field. Returns subscriptions 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 endDatetime Optional parameter: The end date and time (format YYYY-MM-DD HH:MM:SS) - * with which to filter the date_field. Returns subscriptions 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 q Optional parameter: A search query by which to filter customers (can be an email, - * an ID, a reference, organization) + * @param input ListCustomersInput object containing request parameters * @return Returns the List of CustomerResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listCustomers( - final ListCustomersDirection direction, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final String q) throws ApiException, IOException { - return prepareListCustomersRequest(direction, page, perPage, dateField, startDate, endDate, - startDatetime, endDatetime, q).execute(); + final ListCustomersInput input) throws ApiException, IOException { + return prepareListCustomersRequest(input).execute(); } /** * Builds the ApiCall object for listCustomers. */ private ApiCall, ApiException> prepareListCustomersRequest( - final ListCustomersDirection direction, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final String q) throws IOException { + final ListCustomersInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/customers.json") .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 50).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("q") - .value(q).isRequired(false)) + .value(input.getQ()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java index 6a67d669..2140874f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java @@ -17,6 +17,7 @@ import com.maxio.advancedbilling.models.BulkCreateSegments; import com.maxio.advancedbilling.models.BulkUpdateSegments; import com.maxio.advancedbilling.models.CreateSegmentRequest; +import com.maxio.advancedbilling.models.ListSegmentsForPricePointInput; import com.maxio.advancedbilling.models.ListSegmentsResponse; import com.maxio.advancedbilling.models.SegmentResponse; import com.maxio.advancedbilling.models.UpdateSegmentRequest; @@ -106,81 +107,41 @@ private ApiCall prepareCreateSegmentRequest( * access all of the segments. By default it will return `30` records. You can set `per_page` to * `200` at most. You may specify component and/or price point by using either the numeric ID or * the `handle:gold` syntax. - * @param componentId Required parameter: ID or Handle for the Component - * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the - * Component - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterSegmentProperty1Value Optional parameter: 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 filterSegmentProperty2Value Optional parameter: 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 filterSegmentProperty3Value Optional parameter: 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 filterSegmentProperty4Value Optional parameter: 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 input ListSegmentsForPricePointInput object containing request parameters * @return Returns the ListSegmentsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListSegmentsResponse listSegmentsForPricePoint( - final String componentId, - final String pricePointId, - final Integer page, - final Integer perPage, - final String filterSegmentProperty1Value, - final String filterSegmentProperty2Value, - final String filterSegmentProperty3Value, - final String filterSegmentProperty4Value) throws ApiException, IOException { - return prepareListSegmentsForPricePointRequest(componentId, pricePointId, page, perPage, - filterSegmentProperty1Value, filterSegmentProperty2Value, - filterSegmentProperty3Value, filterSegmentProperty4Value).execute(); + final ListSegmentsForPricePointInput input) throws ApiException, IOException { + return prepareListSegmentsForPricePointRequest(input).execute(); } /** * Builds the ApiCall object for listSegmentsForPricePoint. */ private ApiCall prepareListSegmentsForPricePointRequest( - final String componentId, - final String pricePointId, - final Integer page, - final Integer perPage, - final String filterSegmentProperty1Value, - final String filterSegmentProperty2Value, - final String filterSegmentProperty3Value, - final String filterSegmentProperty4Value) throws IOException { + final ListSegmentsForPricePointInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/components/{component_id}/price_points/{price_point_id}/segments.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 30).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[segment_property_1_value]") - .value(filterSegmentProperty1Value).isRequired(false)) + .value(input.getFilterSegmentProperty1Value()).isRequired(false)) .queryParam(param -> param.key("filter[segment_property_2_value]") - .value(filterSegmentProperty2Value).isRequired(false)) + .value(input.getFilterSegmentProperty2Value()).isRequired(false)) .queryParam(param -> param.key("filter[segment_property_3_value]") - .value(filterSegmentProperty3Value).isRequired(false)) + .value(input.getFilterSegmentProperty3Value()).isRequired(false)) .queryParam(param -> param.key("filter[segment_property_4_value]") - .value(filterSegmentProperty4Value).isRequired(false)) - .templateParam(param -> param.key("component_id").value(componentId) + .value(input.getFilterSegmentProperty4Value()).isRequired(false)) + .templateParam(param -> param.key("component_id").value(input.getComponentId()) .shouldEncode(true)) - .templateParam(param -> param.key("price_point_id").value(pricePointId) + .templateParam(param -> param.key("price_point_id").value(input.getPricePointId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java index e6e6d8e9..3988b890 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java @@ -11,10 +11,10 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.CountResponse; -import com.maxio.advancedbilling.models.Direction; import com.maxio.advancedbilling.models.EventResponse; -import com.maxio.advancedbilling.models.EventType; -import com.maxio.advancedbilling.models.ListEventsDateField; +import com.maxio.advancedbilling.models.ListEventsInput; +import com.maxio.advancedbilling.models.ListSubscriptionEventsInput; +import com.maxio.advancedbilling.models.ReadEventsCountInput; import io.apimatic.core.ApiCall; import io.apimatic.core.GlobalConfiguration; import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; @@ -57,102 +57,48 @@ public EventsController(GlobalConfiguration globalConfig) { * from trialing to active", "subscription_id": 205, "event_specific_data": { * "new_subscription_state": "active", "previous_subscription_state": "trialing" }, * "created_at": "2012-01-30T10:43:33-05:00" } } ```. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param sinceId Optional parameter: Returns events with an id greater than or equal to the - * one specified - * @param maxId Optional parameter: Returns events with an id less than or equal to the one - * specified - * @param direction Optional parameter: The sort direction of the returned events. - * @param filter Optional parameter: You can pass multiple event keys after comma. Use in - * query `filter=signup_success,payment_success`. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. - * @param startDate Optional parameter: 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. - * @param endDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param endDatetime Optional parameter: 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. + * @param input ListEventsInput object containing request parameters * @return Returns the List of EventResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listEvents( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter, - final ListEventsDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) throws ApiException, IOException { - return prepareListEventsRequest(page, perPage, sinceId, maxId, direction, filter, dateField, - startDate, endDate, startDatetime, endDatetime).execute(); + final ListEventsInput input) throws ApiException, IOException { + return prepareListEventsRequest(input).execute(); } /** * Builds the ApiCall object for listEvents. */ private ApiCall, ApiException> prepareListEventsRequest( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter, - final ListEventsDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) throws IOException { + final ListEventsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/events.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("since_id") - .value(sinceId).isRequired(false)) + .value(input.getSinceId()).isRequired(false)) .queryParam(param -> param.key("max_id") - .value(maxId).isRequired(false)) + .value(input.getMaxId()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "desc").isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : "desc").isRequired(false)) .queryParam(param -> param.key("filter") - .value(EventType.toValue(filter)).isRequired(false)) + .value(EventType.toValue(input.getFilter())).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -169,68 +115,39 @@ private ApiCall, ApiException> prepareListEventsRequest( /** * The following request will return a list of events for a subscription. Each event type has * its own `event_specific_data` specified. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param sinceId Optional parameter: Returns events with an id greater than or equal to the - * one specified - * @param maxId Optional parameter: Returns events with an id less than or equal to the one - * specified - * @param direction Optional parameter: The sort direction of the returned events. - * @param filter Optional parameter: You can pass multiple event keys after comma. Use in - * query `filter=signup_success,payment_success`. + * @param input ListSubscriptionEventsInput object containing request parameters * @return Returns the List of EventResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listSubscriptionEvents( - final String subscriptionId, - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) throws ApiException, IOException { - return prepareListSubscriptionEventsRequest(subscriptionId, page, perPage, sinceId, maxId, - direction, filter).execute(); + final ListSubscriptionEventsInput input) throws ApiException, IOException { + return prepareListSubscriptionEventsRequest(input).execute(); } /** * Builds the ApiCall object for listSubscriptionEvents. */ private ApiCall, ApiException> prepareListSubscriptionEventsRequest( - final String subscriptionId, - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) throws IOException { + final ListSubscriptionEventsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/events.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("since_id") - .value(sinceId).isRequired(false)) + .value(input.getSinceId()).isRequired(false)) .queryParam(param -> param.key("max_id") - .value(maxId).isRequired(false)) + .value(input.getMaxId()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "desc").isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : "desc").isRequired(false)) .queryParam(param -> param.key("filter") - .value(EventType.toValue(filter)).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(EventType.toValue(input.getFilter())).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -247,64 +164,38 @@ private ApiCall, ApiException> prepareListSubscriptionEvents /** * Get a count of all the events for a given site by using this method. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param sinceId Optional parameter: Returns events with an id greater than or equal to the - * one specified - * @param maxId Optional parameter: Returns events with an id less than or equal to the one - * specified - * @param direction Optional parameter: The sort direction of the returned events. - * @param filter Optional parameter: You can pass multiple event keys after comma. Use in - * query `filter=signup_success,payment_success`. + * @param input ReadEventsCountInput object containing request parameters * @return Returns the CountResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public CountResponse readEventsCount( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) throws ApiException, IOException { - return prepareReadEventsCountRequest(page, perPage, sinceId, maxId, direction, - filter).execute(); + final ReadEventsCountInput input) throws ApiException, IOException { + return prepareReadEventsCountRequest(input).execute(); } /** * Builds the ApiCall object for readEventsCount. */ private ApiCall prepareReadEventsCountRequest( - final Integer page, - final Integer perPage, - final Integer sinceId, - final Integer maxId, - final Direction direction, - final List filter) throws IOException { + final ReadEventsCountInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/events/count.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("since_id") - .value(sinceId).isRequired(false)) + .value(input.getSinceId()).isRequired(false)) .queryParam(param -> param.key("max_id") - .value(maxId).isRequired(false)) + .value(input.getMaxId()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "desc").isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : "desc").isRequired(false)) .queryParam(param -> param.key("filter") - .value(EventType.toValue(filter)).isRequired(false)) + .value(EventType.toValue(input.getFilter())).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java index 5eb742a5..92b7c3e5 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java @@ -12,19 +12,18 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.SubscriptionsMrrErrorResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.Direction; import com.maxio.advancedbilling.models.ListMRRResponse; +import com.maxio.advancedbilling.models.ListMrrPerSubscriptionInput; import com.maxio.advancedbilling.models.MRRResponse; +import com.maxio.advancedbilling.models.ReadMrrMovementsInput; import com.maxio.advancedbilling.models.SiteSummary; import com.maxio.advancedbilling.models.SubscriptionMRRResponse; -import com.maxio.advancedbilling.models.containers.ReadMrrMovementsDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; import java.io.IOException; import java.time.LocalDateTime; -import java.util.List; /** * This class lists all the endpoints of the groups. @@ -128,7 +127,7 @@ private ApiCall prepareReadMrrRequest( * upgrade), we record an MRR movement. These records are accessible via the MRR Movements * endpoint. Each MRR Movement belongs to a subscription and contains a timestamp, category, and * an amount. `line_items` represent the subscription's product configuration at the time of the - * movement. ### Plan & Usage Breakouts In the MRR Report UI, we support a setting to [include + * movement. ### Plan & Usage Breakouts In the MRR Report UI, we support a setting to [include * or * exclude](https://chargify.zendesk.com/hc/en-us/articles/4407838249627#displaying-component-based-metered-usage-in-mrr) * usage revenue. In the MRR APIs, responses include `plan` and `usage` breakouts. Plan includes @@ -136,52 +135,35 @@ private ApiCall prepareReadMrrRequest( * revenue from: * Metered Components * Prepaid Usage Components. * @deprecated * - * @param subscriptionId Optional parameter: optionally filter results by subscription - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 10. The maximum allowed values is 50; any per_page - * value over 50 will be changed to 50. Use in query `per_page=20`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. + * @param input ReadMrrMovementsInput object containing request parameters * @return Returns the ListMRRResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ @Deprecated public ListMRRResponse readMrrMovements( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final ReadMrrMovementsDirection direction) throws ApiException, IOException { - return prepareReadMrrMovementsRequest(subscriptionId, page, perPage, direction).execute(); + final ReadMrrMovementsInput input) throws ApiException, IOException { + return prepareReadMrrMovementsRequest(input).execute(); } /** * Builds the ApiCall object for readMrrMovements. */ private ApiCall prepareReadMrrMovementsRequest( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final ReadMrrMovementsDirection direction) throws IOException { + final ReadMrrMovementsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/mrr_movements.json") .queryParam(param -> param.key("subscription_id") - .value(subscriptionId).isRequired(false)) + .value(input.getSubscriptionId()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 10).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -199,61 +181,37 @@ private ApiCall prepareReadMrrMovementsRequest( * subscription. * @deprecated * - * @param filterSubscriptionIds Optional parameter: Submit ids in order to limit results. Use - * in query: `filter[subscription_ids]=1,2,3`. - * @param atTime Optional parameter: 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`. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param direction Optional parameter: Controls the order in which results are returned. - * Records are ordered by subscription_id in ascending order by default. Use in query - * `direction=desc`. + * @param input ListMrrPerSubscriptionInput object containing request parameters * @return Returns the SubscriptionMRRResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ @Deprecated public SubscriptionMRRResponse listMrrPerSubscription( - final List filterSubscriptionIds, - final String atTime, - final Integer page, - final Integer perPage, - final Direction direction) throws ApiException, IOException { - return prepareListMrrPerSubscriptionRequest(filterSubscriptionIds, atTime, page, perPage, - direction).execute(); + final ListMrrPerSubscriptionInput input) throws ApiException, IOException { + return prepareListMrrPerSubscriptionRequest(input).execute(); } /** * Builds the ApiCall object for listMrrPerSubscription. */ private ApiCall prepareListMrrPerSubscriptionRequest( - final List filterSubscriptionIds, - final String atTime, - final Integer page, - final Integer perPage, - final Direction direction) throws IOException { + final ListMrrPerSubscriptionInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions_mrr.json") .queryParam(param -> param.key("filter[subscription_ids]") - .value(filterSubscriptionIds).isRequired(false)) + .value(input.getFilterSubscriptionIds()).isRequired(false)) .queryParam(param -> param.key("at_time") - .value(atTime).isRequired(false)) + .value(input.getAtTime()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java index 0e3331d9..1ec3b192 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java @@ -19,29 +19,27 @@ import com.maxio.advancedbilling.models.CreateMultiInvoicePaymentRequest; import com.maxio.advancedbilling.models.CreditNote; import com.maxio.advancedbilling.models.CustomerChangesPreviewResponse; -import com.maxio.advancedbilling.models.Direction; import com.maxio.advancedbilling.models.Invoice; -import com.maxio.advancedbilling.models.InvoiceDateField; -import com.maxio.advancedbilling.models.InvoiceEventType; import com.maxio.advancedbilling.models.InvoiceResponse; -import com.maxio.advancedbilling.models.InvoiceSortField; import com.maxio.advancedbilling.models.IssueInvoiceRequest; +import com.maxio.advancedbilling.models.ListCreditNotesInput; import com.maxio.advancedbilling.models.ListCreditNotesResponse; +import com.maxio.advancedbilling.models.ListInvoiceEventsInput; import com.maxio.advancedbilling.models.ListInvoiceEventsResponse; +import com.maxio.advancedbilling.models.ListInvoiceSegmentsInput; +import com.maxio.advancedbilling.models.ListInvoicesInput; import com.maxio.advancedbilling.models.ListInvoicesResponse; import com.maxio.advancedbilling.models.MultiInvoicePaymentResponse; import com.maxio.advancedbilling.models.PaymentResponse; import com.maxio.advancedbilling.models.RecordPaymentRequest; import com.maxio.advancedbilling.models.RefundInvoiceRequest; import com.maxio.advancedbilling.models.SendInvoiceRequest; -import com.maxio.advancedbilling.models.Status; import com.maxio.advancedbilling.models.VoidInvoiceRequest; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; import io.apimatic.coreinterfaces.http.request.ArraySerializationFormat; import java.io.IOException; -import java.util.List; /** * This class lists all the endpoints of the groups. @@ -108,165 +106,70 @@ private ApiCall prepareRefundInvoiceRequest( * for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. * To include breakdowns, pass the specific field as a key in the query with a value set to * `true`. - * @param startDate Optional parameter: The start date (format YYYY-MM-DD) with which to - * filter the date_field. Returns invoices with a timestamp at or after midnight - * (12:00:00 AM) in your site’s time zone on the date specified. - * @param endDate Optional parameter: The end date (format YYYY-MM-DD) with which to filter - * the date_field. Returns invoices with a timestamp up to and including 11:59:59PM in - * your site’s time zone on the date specified. - * @param status Optional parameter: The current status of the invoice. Allowed Values: draft, - * open, paid, pending, voided - * @param subscriptionId Optional parameter: The subscription's ID. - * @param subscriptionGroupUid Optional parameter: The UID of the subscription group you want - * to fetch consolidated invoices for. This will return a paginated list of consolidated - * invoices for the specified group. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param direction Optional parameter: The sort direction of the returned invoices. - * @param lineItems Optional parameter: Include line items data - * @param discounts Optional parameter: Include discounts data - * @param taxes Optional parameter: Include taxes data - * @param credits Optional parameter: Include credits data - * @param payments Optional parameter: Include payments data - * @param customFields Optional parameter: Include custom fields data - * @param refunds Optional parameter: Include refunds data - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query `date_field=issue_date`. - * @param startDatetime Optional parameter: The start date and time (format YYYY-MM-DD - * HH:MM:SS) with which to filter the date_field. Returns invoices 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. Allowed to be used only along with date_field set to created_at or - * updated_at. - * @param endDatetime Optional parameter: The end date and time (format YYYY-MM-DD HH:MM:SS) - * with which to filter the date_field. Returns invoices 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. Allowed to be used only along with date_field set to created_at or - * updated_at. - * @param customerIds Optional parameter: Allows fetching invoices with matching customer id - * based on provided values. Use in query `customer_ids=1,2,3`. - * @param number Optional parameter: Allows fetching invoices with matching invoice number - * based on provided values. Use in query `number=1234,1235`. - * @param productIds Optional parameter: Allows fetching invoices with matching line items - * product ids based on provided values. Use in query `product_ids=23,34`. - * @param sort Optional parameter: Allows specification of the order of the returned list. Use - * in query `sort=total_amount`. + * @param input ListInvoicesInput object containing request parameters * @return Returns the ListInvoicesResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListInvoicesResponse listInvoices( - final String startDate, - final String endDate, - final Status status, - final Integer subscriptionId, - final String subscriptionGroupUid, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields, - final Boolean refunds, - final InvoiceDateField dateField, - final String startDatetime, - final String endDatetime, - final List customerIds, - final List number, - final List productIds, - final InvoiceSortField sort) throws ApiException, IOException { - return prepareListInvoicesRequest(startDate, endDate, status, subscriptionId, - subscriptionGroupUid, page, perPage, direction, lineItems, discounts, taxes, - credits, payments, customFields, refunds, dateField, startDatetime, endDatetime, - customerIds, number, productIds, sort).execute(); + final ListInvoicesInput input) throws ApiException, IOException { + return prepareListInvoicesRequest(input).execute(); } /** * Builds the ApiCall object for listInvoices. */ private ApiCall prepareListInvoicesRequest( - final String startDate, - final String endDate, - final Status status, - final Integer subscriptionId, - final String subscriptionGroupUid, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields, - final Boolean refunds, - final InvoiceDateField dateField, - final String startDatetime, - final String endDatetime, - final List customerIds, - final List number, - final List productIds, - final InvoiceSortField sort) throws IOException { + final ListInvoicesInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/invoices.json") .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("status") - .value((status != null) ? status.value() : null).isRequired(false)) + .value((input.getStatus() != null) ? input.getStatus().value() : null).isRequired(false)) .queryParam(param -> param.key("subscription_id") - .value(subscriptionId).isRequired(false)) + .value(input.getSubscriptionId()).isRequired(false)) .queryParam(param -> param.key("subscription_group_uid") - .value(subscriptionGroupUid).isRequired(false)) + .value(input.getSubscriptionGroupUid()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "desc").isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : "desc").isRequired(false)) .queryParam(param -> param.key("line_items") - .value((lineItems != null) ? lineItems : false).isRequired(false)) + .value(input.getLineItems()).isRequired(false)) .queryParam(param -> param.key("discounts") - .value((discounts != null) ? discounts : false).isRequired(false)) + .value(input.getDiscounts()).isRequired(false)) .queryParam(param -> param.key("taxes") - .value((taxes != null) ? taxes : false).isRequired(false)) + .value(input.getTaxes()).isRequired(false)) .queryParam(param -> param.key("credits") - .value((credits != null) ? credits : false).isRequired(false)) + .value(input.getCredits()).isRequired(false)) .queryParam(param -> param.key("payments") - .value((payments != null) ? payments : false).isRequired(false)) + .value(input.getPayments()).isRequired(false)) .queryParam(param -> param.key("custom_fields") - .value((customFields != null) ? customFields : false).isRequired(false)) + .value(input.getCustomFields()).isRequired(false)) .queryParam(param -> param.key("refunds") - .value((refunds != null) ? refunds : false).isRequired(false)) + .value(input.getRefunds()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : "due_date").isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : "due_date").isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("customer_ids") - .value(customerIds).isRequired(false)) + .value(input.getCustomerIds()).isRequired(false)) .queryParam(param -> param.key("number") - .value(number).isRequired(false)) + .value(input.getNumber()).isRequired(false)) .queryParam(param -> param.key("product_ids") - .value(productIds).isRequired(false)) + .value(input.getProductIds()).isRequired(false)) .queryParam(param -> param.key("sort") - .value((sort != null) ? sort.value() : "number").isRequired(false)) + .value((input.getSort() != null) ? input.getSort().value() : "number").isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -325,75 +228,40 @@ private ApiCall prepareReadInvoiceRequest( * order. If both a `since_date` and `since_id` are provided in request parameters, the * `since_date` will be used. Note - invoice events that occurred prior to 09/05/2018 __will * not__ contain an `invoice` snapshot. - * @param sinceDate Optional parameter: The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, - * or `YYYY-MM-DD`(in this case, it returns data from the beginning of the day). of the - * event from which you want to start the search. All the events before the `since_date` - * timestamp are not returned in the response. - * @param sinceId Optional parameter: The ID of the event from which you want to start the - * search(ID is not included. e.g. if ID is set to 2, then all events with ID 3 and more - * will be shown) This parameter is not used if since_date is defined. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. The maximum allowed values is 200; any per_page - * value over 200 will be changed to 200. - * @param invoiceUid Optional parameter: Providing an invoice_uid allows for scoping of the - * invoice events to a single invoice or credit note. - * @param withChangeInvoiceStatus Optional parameter: Use this parameter if you want to fetch - * also invoice events with change_invoice_status type. - * @param eventTypes Optional parameter: Filter results by event_type. Supply a comma - * separated list of event types (listed above). Use in query: - * `event_types=void_invoice,void_remainder`. + * @param input ListInvoiceEventsInput object containing request parameters * @return Returns the ListInvoiceEventsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListInvoiceEventsResponse listInvoiceEvents( - final String sinceDate, - final Integer sinceId, - final Integer page, - final Integer perPage, - final String invoiceUid, - final String withChangeInvoiceStatus, - final List eventTypes) throws ApiException, IOException { - return prepareListInvoiceEventsRequest(sinceDate, sinceId, page, perPage, invoiceUid, - withChangeInvoiceStatus, eventTypes).execute(); + final ListInvoiceEventsInput input) throws ApiException, IOException { + return prepareListInvoiceEventsRequest(input).execute(); } /** * Builds the ApiCall object for listInvoiceEvents. */ private ApiCall prepareListInvoiceEventsRequest( - final String sinceDate, - final Integer sinceId, - final Integer page, - final Integer perPage, - final String invoiceUid, - final String withChangeInvoiceStatus, - final List eventTypes) throws IOException { + final ListInvoiceEventsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/invoices/events.json") .queryParam(param -> param.key("since_date") - .value(sinceDate).isRequired(false)) + .value(input.getSinceDate()).isRequired(false)) .queryParam(param -> param.key("since_id") - .value(sinceId).isRequired(false)) + .value(input.getSinceId()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("invoice_uid") - .value(invoiceUid).isRequired(false)) + .value(input.getInvoiceUid()).isRequired(false)) .queryParam(param -> param.key("with_change_invoice_status") - .value(withChangeInvoiceStatus).isRequired(false)) + .value(input.getWithChangeInvoiceStatus()).isRequired(false)) .queryParam(param -> param.key("event_types") - .value(InvoiceEventType.toValue(eventTypes)).isRequired(false)) + .value(InvoiceEventType.toValue(input.getEventTypes())).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -520,71 +388,42 @@ private ApiCall prepareRecordExternal * the credit notes returned by this endpoint will exclude the arrays of `line_items`, * `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the * specific field as a key in the query with a value set to `true`. - * @param subscriptionId Optional parameter: The subscription's Chargify id - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param lineItems Optional parameter: Include line items data - * @param discounts Optional parameter: Include discounts data - * @param taxes Optional parameter: Include taxes data - * @param refunds Optional parameter: Include refunds data - * @param applications Optional parameter: Include applications data + * @param input ListCreditNotesInput object containing request parameters * @return Returns the ListCreditNotesResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListCreditNotesResponse listCreditNotes( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean refunds, - final Boolean applications) throws ApiException, IOException { - return prepareListCreditNotesRequest(subscriptionId, page, perPage, lineItems, discounts, - taxes, refunds, applications).execute(); + final ListCreditNotesInput input) throws ApiException, IOException { + return prepareListCreditNotesRequest(input).execute(); } /** * Builds the ApiCall object for listCreditNotes. */ private ApiCall prepareListCreditNotesRequest( - final Integer subscriptionId, - final Integer page, - final Integer perPage, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean refunds, - final Boolean applications) throws IOException { + final ListCreditNotesInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/credit_notes.json") .queryParam(param -> param.key("subscription_id") - .value(subscriptionId).isRequired(false)) + .value(input.getSubscriptionId()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("line_items") - .value((lineItems != null) ? lineItems : false).isRequired(false)) + .value(input.getLineItems()).isRequired(false)) .queryParam(param -> param.key("discounts") - .value((discounts != null) ? discounts : false).isRequired(false)) + .value(input.getDiscounts()).isRequired(false)) .queryParam(param -> param.key("taxes") - .value((taxes != null) ? taxes : false).isRequired(false)) + .value(input.getTaxes()).isRequired(false)) .queryParam(param -> param.key("refunds") - .value((refunds != null) ? refunds : false).isRequired(false)) + .value(input.getRefunds()).isRequired(false)) .queryParam(param -> param.key("applications") - .value((applications != null) ? applications : false).isRequired(false)) + .value(input.getApplications()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -786,49 +625,33 @@ private ApiCall prepareVoidInvoiceRequest( /** * Invoice segments returned on the index will only include totals, not detailed breakdowns for * `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. - * @param invoiceUid Required parameter: The unique identifier of the consolidated invoice - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param direction Optional parameter: Sort direction of the returned segments. + * @param input ListInvoiceSegmentsInput object containing request parameters * @return Returns the ConsolidatedInvoice response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ConsolidatedInvoice listInvoiceSegments( - final String invoiceUid, - final Integer page, - final Integer perPage, - final Direction direction) throws ApiException, IOException { - return prepareListInvoiceSegmentsRequest(invoiceUid, page, perPage, direction).execute(); + final ListInvoiceSegmentsInput input) throws ApiException, IOException { + return prepareListInvoiceSegmentsRequest(input).execute(); } /** * Builds the ApiCall object for listInvoiceSegments. */ private ApiCall prepareListInvoiceSegmentsRequest( - final String invoiceUid, - final Integer page, - final Integer perPage, - final Direction direction) throws IOException { + final ListInvoiceSegmentsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/invoices/{invoice_uid}/segments.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "asc").isRequired(false)) - .templateParam(param -> param.key("invoice_uid").value(invoiceUid) + .value((input.getDirection() != null) ? input.getDirection().value() : "asc").isRequired(false)) + .templateParam(param -> param.key("invoice_uid").value(input.getInvoiceUid()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java index a0a6e52f..d12d3cfc 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java @@ -17,6 +17,7 @@ import com.maxio.advancedbilling.models.CreatePaymentProfileRequest; import com.maxio.advancedbilling.models.CreatePaymentProfileResponse; import com.maxio.advancedbilling.models.GetOneTimeTokenRequest; +import com.maxio.advancedbilling.models.ListPaymentProfilesInput; import com.maxio.advancedbilling.models.ListPaymentProfilesResponse; import com.maxio.advancedbilling.models.PaymentProfileResponse; import com.maxio.advancedbilling.models.ReadPaymentProfileResponse; @@ -144,7 +145,7 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) { * to this URL if you want to be notified about the result of 3D Secure authentication. Attach * redirect_url param to this URL if you want to redirect a customer back to your page after 3D * Secure authentication. Example: - * https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com + * https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com * will do a POST request to https://localhost:4000 after credit card is authenticated and will * redirect a customer to https://yourpage.com after 3DS authentication.", "links": { * "action_link": @@ -161,7 +162,7 @@ public PaymentProfilesController(GlobalConfiguration globalConfig) { * The final URL that you send a customer to complete 3D Secure may resemble the following, * where the first half is the `action_link` and the second half contains a `redirect_url` and * `callback_url`: - * `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com` + * `https://checkout-test.chargifypay.test/3d-secure/checkout/pay_uerzhsxd5uhkbodx5jhvkg6yeu?one_time_token_id=93&callback_url=http://localhost:4000&redirect_url=https://yourpage.com` * ### Example Redirect Flow You may wish to redirect customers to different pages depending on * whether their SCA was performed successfully. Here's an example flow to use as a reference: * 1. Create a payment profile via API; it requires 3DS 2. You receive a `action_link` in the @@ -216,46 +217,32 @@ private ApiCall prepareCreatePayment * This method will return all of the active `payment_profiles` for a Site, or for one Customer * within a site. If no payment profiles are found, this endpoint will return an empty array, * not a 404. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param customerId Optional parameter: The ID of the customer for which you wish to list - * payment profiles + * @param input ListPaymentProfilesInput object containing request parameters * @return Returns the List of ListPaymentProfilesResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listPaymentProfiles( - final Integer page, - final Integer perPage, - final Integer customerId) throws ApiException, IOException { - return prepareListPaymentProfilesRequest(page, perPage, customerId).execute(); + final ListPaymentProfilesInput input) throws ApiException, IOException { + return prepareListPaymentProfilesRequest(input).execute(); } /** * Builds the ApiCall object for listPaymentProfiles. */ private ApiCall, ApiException> prepareListPaymentProfilesRequest( - final Integer page, - final Integer perPage, - final Integer customerId) throws IOException { + final ListPaymentProfilesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/payment_profiles.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("customer_id") - .value(customerId).isRequired(false)) + .value(input.getCustomerId()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java index 15ea81a2..1f01137f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java @@ -11,10 +11,9 @@ import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CreateProductFamilyRequest; -import com.maxio.advancedbilling.models.IncludeNotNull; -import com.maxio.advancedbilling.models.ListProductsInclude; +import com.maxio.advancedbilling.models.ListProductFamiliesInput; +import com.maxio.advancedbilling.models.ListProductsForProductFamilyInput; import com.maxio.advancedbilling.models.ProductFamilyResponse; import com.maxio.advancedbilling.models.ProductResponse; import io.apimatic.core.ApiCall; @@ -39,113 +38,49 @@ public ProductFamiliesController(GlobalConfiguration globalConfig) { /** * This method allows to retrieve a list of Products belonging to a Product Family. - * @param productFamilyId Required parameter: The Chargify id of the product family to which - * the product belongs - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query: `date_field=created_at`. - * @param startDate Optional parameter: 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. - * @param endDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param endDatetime Optional parameter: 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. - * @param includeArchived Optional parameter: Include archived products - * @param include Optional parameter: Allows including additional data in the response. Use in - * query `include=prepaid_product_price_point`. - * @param filterPrepaidProductPricePointProductPricePointId Optional parameter: 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 filterUseSiteExchangeRate Optional parameter: 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 input ListProductsForProductFamilyInput object containing request parameters * @return Returns the List of ProductResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listProductsForProductFamily( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListProductsForProductFamilyRequest(productFamilyId, page, perPage, dateField, - startDate, endDate, startDatetime, endDatetime, includeArchived, include, - filterPrepaidProductPricePointProductPricePointId, - filterUseSiteExchangeRate).execute(); + final ListProductsForProductFamilyInput input) throws ApiException, IOException { + return prepareListProductsForProductFamilyRequest(input).execute(); } /** * Builds the ApiCall object for listProductsForProductFamily. */ private ApiCall, ApiException> prepareListProductsForProductFamilyRequest( - final int productFamilyId, - final Integer page, - final Integer perPage, - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListProductsForProductFamilyInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/product_families/{product_family_id}/products.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("include_archived") - .value(includeArchived).isRequired(false)) + .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[prepaid_product_price_point][product_price_point_id]") - .value((filterPrepaidProductPricePointProductPricePointId != null) ? filterPrepaidProductPricePointProductPricePointId.value() : null).isRequired(false)) + .value((input.getFilterPrepaidProductPricePointProductPricePointId() != null) ? input.getFilterPrepaidProductPricePointProductPricePointId().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) - .templateParam(param -> param.key("product_family_id").value(productFamilyId).isRequired(false) + .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")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -203,62 +138,36 @@ private ApiCall prepareCreateProductFamilyR /** * This method allows to retrieve a list of Product Families for a site. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query: `date_field=created_at`. - * @param startDate Optional parameter: 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. - * @param endDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param endDatetime Optional parameter: 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. + * @param input ListProductFamiliesInput object containing request parameters * @return Returns the List of ProductFamilyResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listProductFamilies( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) throws ApiException, IOException { - return prepareListProductFamiliesRequest(dateField, startDate, endDate, startDatetime, - endDatetime).execute(); + final ListProductFamiliesInput input) throws ApiException, IOException { + return prepareListProductFamiliesRequest(input).execute(); } /** * Builds the ApiCall object for listProductFamilies. */ private ApiCall, ApiException> prepareListProductFamiliesRequest( - final BasicDateField dateField, - final String startDate, - final String endDate, - final String startDatetime, - final String endDatetime) throws IOException { + final ListProductFamiliesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/product_families.json") .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java index 094c166d..1c72305b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java @@ -13,20 +13,17 @@ import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.exceptions.ErrorMapResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.BulkCreateProductPricePointsRequest; import com.maxio.advancedbilling.models.BulkCreateProductPricePointsResponse; import com.maxio.advancedbilling.models.CreateProductCurrencyPricesRequest; import com.maxio.advancedbilling.models.CreateProductPricePointRequest; -import com.maxio.advancedbilling.models.IncludeNotNull; +import com.maxio.advancedbilling.models.ListAllProductPricePointsInput; +import com.maxio.advancedbilling.models.ListProductPricePointsInput; import com.maxio.advancedbilling.models.ListProductPricePointsResponse; -import com.maxio.advancedbilling.models.ListProductsPricePointsInclude; -import com.maxio.advancedbilling.models.PricePointType; import com.maxio.advancedbilling.models.ProductPricePointCurrencyPrice; import com.maxio.advancedbilling.models.ProductPricePointResponse; import com.maxio.advancedbilling.models.UpdateCurrencyPricesRequest; import com.maxio.advancedbilling.models.UpdateProductPricePointRequest; -import com.maxio.advancedbilling.models.containers.ListAllProductPricePointsDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -94,61 +91,35 @@ private ApiCall prepareCreateProductPri /** * Use this endpoint to retrieve a list of product price points. - * @param productId Required parameter: The id or handle of the product. When using the - * handle, it must be prefixed with `handle:` - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 10. The maximum allowed values is 200; any per_page - * value over 200 will be changed to 200. - * @param currencyPrices Optional parameter: When fetching a product's price points, 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. If the product price point is set to use_site_exchange_rate: true, it will - * return pricing based on the current exchange rate. If the flag is set to false, it - * will return all of the defined prices for each currency. - * @param filterType Optional parameter: Use in query: `filter[type]=catalog,default`. + * @param input ListProductPricePointsInput object containing request parameters * @return Returns the ListProductPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListProductPricePointsResponse listProductPricePoints( - final int productId, - final Integer page, - final Integer perPage, - final Boolean currencyPrices, - final List filterType) throws ApiException, IOException { - return prepareListProductPricePointsRequest(productId, page, perPage, currencyPrices, - filterType).execute(); + final ListProductPricePointsInput input) throws ApiException, IOException { + return prepareListProductPricePointsRequest(input).execute(); } /** * Builds the ApiCall object for listProductPricePoints. */ private ApiCall prepareListProductPricePointsRequest( - final int productId, - final Integer page, - final Integer perPage, - final Boolean currencyPrices, - final List filterType) throws IOException { + final ListProductPricePointsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/products/{product_id}/price_points.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 10).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("currency_prices") - .value(currencyPrices).isRequired(false)) + .value(input.getCurrencyPrices()).isRequired(false)) .queryParam(param -> param.key("filter[type]") - .value(PricePointType.toValue(filterType)).isRequired(false)) - .templateParam(param -> param.key("product_id").value(productId).isRequired(false) + .value(PricePointType.toValue(input.getFilterType())).isRequired(false)) + .templateParam(param -> param.key("product_id").value(input.getProductId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -539,110 +510,50 @@ private ApiCall, ApiException> prepareUpdat /** * This method allows retrieval of a list of Products Price Points belonging to a Site. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. - * @param filterArchivedAt Optional parameter: Allows fetching price points only if - * archived_at is present or not. Use in query: `filter[archived_at]=not_null`. - * @param filterDateField Optional parameter: The type of filter you would like to apply to - * your search. Use in query: `filter[date_field]=created_at`. - * @param filterEndDate Optional parameter: 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 filterEndDatetime Optional parameter: 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 filterIds Optional parameter: Allows fetching price points with matching id based on - * provided values. Use in query: `filter[ids]=1,2,3`. - * @param filterStartDate Optional parameter: 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 filterStartDatetime Optional parameter: 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 filterType Optional parameter: Allows fetching price points with matching type. Use - * in query: `filter[type]=catalog,custom`. - * @param include Optional parameter: Allows including additional data in the response. Use in - * query: `include=currency_prices`. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListAllProductPricePointsInput object containing request parameters * @return Returns the ListProductPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListProductPricePointsResponse listAllProductPricePoints( - final ListAllProductPricePointsDirection direction, - final IncludeNotNull filterArchivedAt, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final List filterIds, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListProductsPricePointsInclude include, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListAllProductPricePointsRequest(direction, filterArchivedAt, filterDateField, - filterEndDate, filterEndDatetime, filterIds, filterStartDate, filterStartDatetime, - filterType, include, page, perPage).execute(); + final ListAllProductPricePointsInput input) throws ApiException, IOException { + return prepareListAllProductPricePointsRequest(input).execute(); } /** * Builds the ApiCall object for listAllProductPricePoints. */ private ApiCall prepareListAllProductPricePointsRequest( - final ListAllProductPricePointsDirection direction, - final IncludeNotNull filterArchivedAt, - final BasicDateField filterDateField, - final String filterEndDate, - final String filterEndDatetime, - final List filterIds, - final String filterStartDate, - final String filterStartDatetime, - final PricePointType filterType, - final ListProductsPricePointsInclude include, - final Integer page, - final Integer perPage) throws IOException { + final ListAllProductPricePointsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/products_price_points.json") .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[archived_at]") - .value((filterArchivedAt != null) ? filterArchivedAt.value() : null).isRequired(false)) + .value((input.getFilterArchivedAt() != null) ? input.getFilterArchivedAt().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) + .value(input.getFilterEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[end_datetime]") - .value(filterEndDatetime).isRequired(false)) + .value(input.getFilterEndDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[ids]") - .value(filterIds).isRequired(false)) + .value(input.getFilterIds()).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[start_datetime]") - .value(filterStartDatetime).isRequired(false)) + .value(input.getFilterStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[type]") - .value((filterType != null) ? filterType.value() : null).isRequired(false)) + .value((input.getFilterType() != null) ? input.getFilterType().value() : null).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java index 266aac85..86c3e79f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java @@ -12,10 +12,8 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CreateOrUpdateProductRequest; -import com.maxio.advancedbilling.models.IncludeNotNull; -import com.maxio.advancedbilling.models.ListProductsInclude; +import com.maxio.advancedbilling.models.ListProductsInput; import com.maxio.advancedbilling.models.ProductResponse; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; @@ -248,109 +246,48 @@ private ApiCall prepareReadProductByHandleRequest /** * This method allows to retrieve a list of Products belonging to a Site. - * @param dateField Optional parameter: The type of filter you would like to apply to your - * search. Use in query: `date_field=created_at`. - * @param endDate Optional parameter: 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. - * @param endDatetime Optional parameter: 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. - * @param startDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param includeArchived Optional parameter: Include archived products. Use in query: - * `include_archived=true`. - * @param include Optional parameter: Allows including additional data in the response. Use in - * query `include=prepaid_product_price_point`. - * @param filterPrepaidProductPricePointProductPricePointId Optional parameter: 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 filterUseSiteExchangeRate Optional parameter: 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 input ListProductsInput object containing request parameters * @return Returns the List of ProductResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listProducts( - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Integer page, - final Integer perPage, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) throws ApiException, IOException { - return prepareListProductsRequest(dateField, endDate, endDatetime, startDate, startDatetime, - page, perPage, includeArchived, include, - filterPrepaidProductPricePointProductPricePointId, - filterUseSiteExchangeRate).execute(); + final ListProductsInput input) throws ApiException, IOException { + return prepareListProductsRequest(input).execute(); } /** * Builds the ApiCall object for listProducts. */ private ApiCall, ApiException> prepareListProductsRequest( - final BasicDateField dateField, - final String endDate, - final String endDatetime, - final String startDate, - final String startDatetime, - final Integer page, - final Integer perPage, - final Boolean includeArchived, - final ListProductsInclude include, - final IncludeNotNull filterPrepaidProductPricePointProductPricePointId, - final Boolean filterUseSiteExchangeRate) throws IOException { + final ListProductsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/products.json") .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("include_archived") - .value(includeArchived).isRequired(false)) + .value(input.getIncludeArchived()).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[prepaid_product_price_point][product_price_point_id]") - .value((filterPrepaidProductPricePointProductPricePointId != null) ? filterPrepaidProductPricePointProductPricePointId.value() : null).isRequired(false)) + .value((input.getFilterPrepaidProductPricePointProductPricePointId() != null) ? input.getFilterPrepaidProductPricePointProductPricePointId().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) + .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java index b7de8c9f..bf1373e0 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java @@ -15,11 +15,10 @@ import com.maxio.advancedbilling.exceptions.ProformaBadRequestErrorResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.CreateSubscriptionRequest; -import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.ListProformaInvoicesInput; import com.maxio.advancedbilling.models.ProformaInvoice; import com.maxio.advancedbilling.models.ProformaInvoicePreview; import com.maxio.advancedbilling.models.SignupProformaPreviewResponse; -import com.maxio.advancedbilling.models.Status; import com.maxio.advancedbilling.models.VoidInvoiceRequest; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; @@ -218,99 +217,51 @@ private ApiCall prepareCreateProformaInvoiceReque * breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. * To include breakdowns, pass the specific field as a key in the query with a value set to * `true`. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param startDate Optional parameter: The beginning date range for the invoice's Due Date, - * in the YYYY-MM-DD format. - * @param endDate Optional parameter: The ending date range for the invoice's Due Date, in the - * YYYY-MM-DD format. - * @param status Optional parameter: The current status of the invoice. Allowed Values: draft, - * open, paid, pending, voided - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param direction Optional parameter: The sort direction of the returned invoices. - * @param lineItems Optional parameter: Include line items data - * @param discounts Optional parameter: Include discounts data - * @param taxes Optional parameter: Include taxes data - * @param credits Optional parameter: Include credits data - * @param payments Optional parameter: Include payments data - * @param customFields Optional parameter: Include custom fields data + * @param input ListProformaInvoicesInput object containing request parameters * @return Returns the List of ProformaInvoice response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listProformaInvoices( - final String subscriptionId, - final String startDate, - final String endDate, - final Status status, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields) throws ApiException, IOException { - return prepareListProformaInvoicesRequest(subscriptionId, startDate, endDate, status, page, - perPage, direction, lineItems, discounts, taxes, credits, payments, - customFields).execute(); + final ListProformaInvoicesInput input) throws ApiException, IOException { + return prepareListProformaInvoicesRequest(input).execute(); } /** * Builds the ApiCall object for listProformaInvoices. */ private ApiCall, ApiException> prepareListProformaInvoicesRequest( - final String subscriptionId, - final String startDate, - final String endDate, - final Status status, - final Integer page, - final Integer perPage, - final Direction direction, - final Boolean lineItems, - final Boolean discounts, - final Boolean taxes, - final Boolean credits, - final Boolean payments, - final Boolean customFields) throws IOException { + final ListProformaInvoicesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/proforma_invoices.json") .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("status") - .value((status != null) ? status.value() : null).isRequired(false)) + .value((input.getStatus() != null) ? input.getStatus().value() : null).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : "desc").isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : "desc").isRequired(false)) .queryParam(param -> param.key("line_items") - .value((lineItems != null) ? lineItems : false).isRequired(false)) + .value(input.getLineItems()).isRequired(false)) .queryParam(param -> param.key("discounts") - .value((discounts != null) ? discounts : false).isRequired(false)) + .value(input.getDiscounts()).isRequired(false)) .queryParam(param -> param.key("taxes") - .value((taxes != null) ? taxes : false).isRequired(false)) + .value(input.getTaxes()).isRequired(false)) .queryParam(param -> param.key("credits") - .value((credits != null) ? credits : false).isRequired(false)) + .value(input.getCredits()).isRequired(false)) .queryParam(param -> param.key("payments") - .value((payments != null) ? payments : false).isRequired(false)) + .value(input.getPayments()).isRequired(false)) .queryParam(param -> param.key("custom_fields") - .value((customFields != null) ? customFields : false).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(input.getCustomFields()).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java index a2b7bc37..15e80d41 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java @@ -13,6 +13,7 @@ import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.CreateReasonCodeRequest; +import com.maxio.advancedbilling.models.ListReasonCodesInput; import com.maxio.advancedbilling.models.ReasonCodeResponse; import com.maxio.advancedbilling.models.ReasonCodesJsonResponse; import com.maxio.advancedbilling.models.UpdateReasonCodeRequest; @@ -88,40 +89,30 @@ private ApiCall prepareCreateReasonCodeRequest /** * This method gives a merchant the option to retrieve a list of all of the current churn codes * for a given site. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListReasonCodesInput object containing request parameters * @return Returns the List of ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listReasonCodes( - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListReasonCodesRequest(page, perPage).execute(); + final ListReasonCodesInput input) throws ApiException, IOException { + return prepareListReasonCodesRequest(input).execute(); } /** * Builds the ApiCall object for listReasonCodes. */ private ApiCall, ApiException> prepareListReasonCodesRequest( - final Integer page, - final Integer perPage) throws IOException { + final ListReasonCodesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/reason_codes.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java index a2e9b609..925b1b0d 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java @@ -11,6 +11,8 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.ListSaleRepItem; +import com.maxio.advancedbilling.models.ListSalesCommissionSettingsInput; +import com.maxio.advancedbilling.models.ListSalesRepsInput; import com.maxio.advancedbilling.models.SaleRep; import com.maxio.advancedbilling.models.SaleRepSettings; import io.apimatic.core.ApiCall; @@ -45,57 +47,36 @@ public SalesCommissionsController(GlobalConfiguration globalConfig) { * where the seller has the Advanced Analytics component enabled. For further information on * getting access to Advanced Analytics please contact Chargify support. > Note: The request is * at seller level, it means `<<subdomain>>` variable will be replaced by `app`. - * @param sellerId Required parameter: The Chargify id of your seller account - * @param authorization Optional parameter: For authorization use user API key. See details - * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). - * @param liveMode Optional parameter: This parameter indicates if records should be fetched - * from live mode sites. Default value is true. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. + * @param input ListSalesCommissionSettingsInput object containing request parameters * @return Returns the List of SaleRepSettings response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listSalesCommissionSettings( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListSalesCommissionSettingsRequest(sellerId, authorization, liveMode, page, - perPage).execute(); + final ListSalesCommissionSettingsInput input) throws ApiException, IOException { + return prepareListSalesCommissionSettingsRequest(input).execute(); } /** * Builds the ApiCall object for listSalesCommissionSettings. */ private ApiCall, ApiException> prepareListSalesCommissionSettingsRequest( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) throws IOException { + final ListSalesCommissionSettingsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/sellers/{seller_id}/sales_commission_settings.json") .queryParam(param -> param.key("live_mode") - .value(liveMode).isRequired(false)) + .value(input.getLiveMode()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) - .templateParam(param -> param.key("seller_id").value(sellerId) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("seller_id").value(input.getSellerId()) .shouldEncode(true)) .headerParam(param -> param.key("Authorization") - .value((authorization != null) ? authorization : "Bearer <>").isRequired(false)) + .value(input.getAuthorization()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) @@ -121,57 +102,36 @@ private ApiCall, ApiException> prepareListSalesCommissionS * where the seller has the Advanced Analytics component enabled. For further information on * getting access to Advanced Analytics please contact Chargify support. > Note: The request is * at seller level, it means `<<subdomain>>` variable will be replaced by `app`. - * @param sellerId Required parameter: The Chargify id of your seller account - * @param authorization Optional parameter: For authorization use user API key. See details - * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). - * @param liveMode Optional parameter: This parameter indicates if records should be fetched - * from live mode sites. Default value is true. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: This parameter indicates how many records to fetch in - * each request. Default value is 100. + * @param input ListSalesRepsInput object containing request parameters * @return Returns the List of ListSaleRepItem response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listSalesReps( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListSalesRepsRequest(sellerId, authorization, liveMode, page, - perPage).execute(); + final ListSalesRepsInput input) throws ApiException, IOException { + return prepareListSalesRepsRequest(input).execute(); } /** * Builds the ApiCall object for listSalesReps. */ private ApiCall, ApiException> prepareListSalesRepsRequest( - final String sellerId, - final String authorization, - final Boolean liveMode, - final Integer page, - final Integer perPage) throws IOException { + final ListSalesRepsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/sellers/{seller_id}/sales_reps.json") .queryParam(param -> param.key("live_mode") - .value(liveMode).isRequired(false)) + .value(input.getLiveMode()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 100).isRequired(false)) - .templateParam(param -> param.key("seller_id").value(sellerId) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("seller_id").value(input.getSellerId()) .shouldEncode(true)) .headerParam(param -> param.key("Authorization") - .value((authorization != null) ? authorization : "Bearer <>").isRequired(false)) + .value(input.getAuthorization()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java index ee1049fb..c21181d2 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java @@ -11,6 +11,7 @@ import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.CleanupScope; +import com.maxio.advancedbilling.models.ListChargifyJsPublicKeysInput; import com.maxio.advancedbilling.models.ListPublicKeysResponse; import com.maxio.advancedbilling.models.SiteResponse; import io.apimatic.core.ApiCall; @@ -40,7 +41,7 @@ public SitesController(GlobalConfiguration globalConfig) { * extremely relevant to this endpoint documentation. #### Relationship invoicing enabled If * site has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, * "whopays_enabled": true, "whopays_default_payer": "self" You can read more about these - * settings here: [Who Pays & Customer + * settings here: [Who Pays & Customer * Hierarchy](https://chargify.zendesk.com/hc/en-us/articles/4407746683291). * @return Returns the SiteResponse response from the API call * @throws ApiException Represents error response from the server. @@ -116,40 +117,30 @@ private ApiCall prepareClearSiteRequest( /** * This endpoint returns public keys used for Chargify.js. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListChargifyJsPublicKeysInput object containing request parameters * @return Returns the ListPublicKeysResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListPublicKeysResponse listChargifyJsPublicKeys( - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListChargifyJsPublicKeysRequest(page, perPage).execute(); + final ListChargifyJsPublicKeysInput input) throws ApiException, IOException { + return prepareListChargifyJsPublicKeysRequest(input).execute(); } /** * Builds the ApiCall object for listChargifyJsPublicKeys. */ private ApiCall prepareListChargifyJsPublicKeysRequest( - final Integer page, - final Integer perPage) throws IOException { + final ListChargifyJsPublicKeysInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/chargify_js_keys.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 2374dd30..7020eb40 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -23,19 +23,15 @@ import com.maxio.advancedbilling.models.CreateUsageRequest; import com.maxio.advancedbilling.models.CreditSchemeRequest; import com.maxio.advancedbilling.models.EBBEvent; -import com.maxio.advancedbilling.models.IncludeNotNull; -import com.maxio.advancedbilling.models.ListSubscriptionComponentsInclude; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsForSiteInput; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsInput; import com.maxio.advancedbilling.models.ListSubscriptionComponentsResponse; -import com.maxio.advancedbilling.models.ListSubscriptionComponentsSort; +import com.maxio.advancedbilling.models.ListUsagesInput; import com.maxio.advancedbilling.models.PreviewAllocationsRequest; import com.maxio.advancedbilling.models.SubscriptionComponentResponse; -import com.maxio.advancedbilling.models.SubscriptionListDateField; import com.maxio.advancedbilling.models.SubscriptionResponse; -import com.maxio.advancedbilling.models.SubscriptionState; import com.maxio.advancedbilling.models.UpdateAllocationExpirationDate; import com.maxio.advancedbilling.models.UsageResponse; -import com.maxio.advancedbilling.models.containers.ListSubscriptionComponentsDirection; -import com.maxio.advancedbilling.models.containers.ListSubscriptionComponentsForSiteDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -102,112 +98,51 @@ private ApiCall prepareReadSubscrip * This request will list a subscription's applied components. ## Archived Components When * requesting to list components for a given subscription, if the subscription contains * **archived** components they will be listed in the server response. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param dateField Optional parameter: The type of filter you'd like to apply to your search. - * Use in query `date_field=updated_at`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. - * @param endDate Optional parameter: 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. - * @param endDatetime Optional parameter: 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. - * @param pricePointIds Optional parameter: Allows fetching components allocation only if - * price point id is present. Use in query `price_point_ids=not_null`. - * @param productFamilyIds Optional parameter: Allows fetching components allocation with - * matching product family id based on provided ids. Use in query - * `product_family_ids=1,2,3`. - * @param sort Optional parameter: The attribute by which to sort. Use in query - * `sort=updated_at`. - * @param startDate Optional parameter: 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. - * @param startDatetime Optional parameter: 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. - * @param include Optional parameter: Allows including additional data in the response. Use in - * query `include=subscription`. - * @param filterUseSiteExchangeRate Optional parameter: Allows fetching components allocation - * with matching use_site_exchange_rate based on provided value. Use in query - * `filter[use_site_exchange_rate]=true`. - * @param filterCurrencies Optional parameter: Allows fetching components allocation with - * matching currency based on provided values. Use in query - * `filter[currencies]=EUR,USD`. + * @param input ListSubscriptionComponentsInput object containing request parameters * @return Returns the List of SubscriptionComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listSubscriptionComponents( - final String subscriptionId, - final SubscriptionListDateField dateField, - final ListSubscriptionComponentsDirection direction, - final String endDate, - final String endDatetime, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsSort sort, - final String startDate, - final String startDatetime, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies) throws ApiException, IOException { - return prepareListSubscriptionComponentsRequest(subscriptionId, dateField, direction, - endDate, endDatetime, pricePointIds, productFamilyIds, sort, startDate, - startDatetime, include, filterUseSiteExchangeRate, filterCurrencies).execute(); + final ListSubscriptionComponentsInput input) throws ApiException, IOException { + return prepareListSubscriptionComponentsRequest(input).execute(); } /** * Builds the ApiCall object for listSubscriptionComponents. */ private ApiCall, ApiException> prepareListSubscriptionComponentsRequest( - final String subscriptionId, - final SubscriptionListDateField dateField, - final ListSubscriptionComponentsDirection direction, - final String endDate, - final String endDatetime, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsSort sort, - final String startDate, - final String startDatetime, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies) throws IOException { + final ListSubscriptionComponentsInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/components.json") .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("price_point_ids") - .value((pricePointIds != null) ? pricePointIds.value() : null).isRequired(false)) + .value((input.getPricePointIds() != null) ? input.getPricePointIds().value() : null).isRequired(false)) .queryParam(param -> param.key("product_family_ids") - .value(productFamilyIds).isRequired(false)) + .value(input.getProductFamilyIds()).isRequired(false)) .queryParam(param -> param.key("sort") - .value((sort != null) ? sort.value() : null).isRequired(false)) + .value((input.getSort() != null) ? input.getSort().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) + .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .queryParam(param -> param.key("filter[currencies]") - .value(filterCurrencies).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(input.getFilterCurrencies()).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -789,79 +724,45 @@ private ApiCall prepareCreateUsageRequest( * This endpoint is not compatible with quantity-based components. ## Since Date and Until Date * Usage Note: The `since_date` and `until_date` attributes each default to midnight on the date * specified. For example, in order to list usages for January 20th, you would need to append - * the following to the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage + * the following to the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage * by Handle Use this endpoint to read the previously recorded components for a subscription. * You can now specify either the component id (integer) or the component handle prefixed by * "handle:" to specify the unique identifier for the component you are working with. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param componentId Required parameter: Either the Chargify id for the component or the - * component's handle prefixed by `handle:` - * @param sinceId Optional parameter: Returns usages with an id greater than or equal to the - * one specified - * @param maxId Optional parameter: Returns usages with an id less than or equal to the one - * specified - * @param sinceDate Optional parameter: Returns usages with a created_at date greater than or - * equal to midnight (12:00 AM) on the date specified. - * @param untilDate Optional parameter: Returns usages with a created_at date less than or - * equal to midnight (12:00 AM) on the date specified. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListUsagesInput object containing request parameters * @return Returns the List of UsageResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listUsages( - final String subscriptionId, - final int componentId, - final Integer sinceId, - final Integer maxId, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListUsagesRequest(subscriptionId, componentId, sinceId, maxId, sinceDate, - untilDate, page, perPage).execute(); + final ListUsagesInput input) throws ApiException, IOException { + return prepareListUsagesRequest(input).execute(); } /** * Builds the ApiCall object for listUsages. */ private ApiCall, ApiException> prepareListUsagesRequest( - final String subscriptionId, - final int componentId, - final Integer sinceId, - final Integer maxId, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage) throws IOException { + final ListUsagesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/components/{component_id}/usages.json") .queryParam(param -> param.key("since_id") - .value(sinceId).isRequired(false)) + .value(input.getSinceId()).isRequired(false)) .queryParam(param -> param.key("max_id") - .value(maxId).isRequired(false)) + .value(input.getMaxId()).isRequired(false)) .queryParam(param -> param.key("since_date") - .value(sinceDate).isRequired(false)) + .value(input.getSinceDate()).isRequired(false)) .queryParam(param -> param.key("until_date") - .value(untilDate).isRequired(false)) + .value(input.getUntilDate()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) - .templateParam(param -> param.key("component_id").value(componentId).isRequired(false) + .templateParam(param -> param.key("component_id").value(input.getComponentId()).isRequired(false) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) @@ -1080,191 +981,68 @@ private ApiCall prepareRecordEventsRequest( /** * This request will list components applied to each subscription. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param sort Optional parameter: The attribute by which to sort. Use in query: - * `sort=updated_at`. - * @param direction Optional parameter: Controls the order in which results are returned. Use - * in query `direction=asc`. - * @param dateField Optional parameter: The type of filter you'd like to apply to your search. - * Use in query: `date_field=updated_at`. - * @param startDate Optional parameter: 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`. - * @param startDatetime Optional parameter: 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`. - * @param endDate Optional parameter: 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. Use in query `end_date=2011-12-16`. - * @param endDatetime Optional parameter: 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. Use in query `end_datetime=2022-07-01 09:00:05`. - * @param subscriptionIds Optional parameter: Allows fetching components allocation with - * matching subscription id based on provided ids. Use in query - * `subscription_ids=1,2,3`. - * @param pricePointIds Optional parameter: Allows fetching components allocation only if - * price point id is present. Use in query `price_point_ids=not_null`. - * @param productFamilyIds Optional parameter: Allows fetching components allocation with - * matching product family id based on provided ids. Use in query - * `product_family_ids=1,2,3`. - * @param include Optional parameter: Allows including additional data in the response. Use in - * query `include=subscription`. - * @param filterUseSiteExchangeRate Optional parameter: Allows fetching components allocation - * with matching use_site_exchange_rate based on provided value. Use in query - * `filter[use_site_exchange_rate]=true`. - * @param filterCurrencies Optional parameter: Allows fetching components allocation with - * matching currency based on provided values. Use in query - * `filter[currencies]=USD,EUR`. - * @param filterSubscriptionStates Optional parameter: 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 filterSubscriptionDateField Optional parameter: 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 filterSubscriptionStartDate Optional parameter: 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 filterSubscriptionStartDatetime Optional parameter: 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 filterSubscriptionEndDate Optional parameter: 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 filterSubscriptionEndDatetime Optional parameter: 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 input ListSubscriptionComponentsForSiteInput object containing request parameters * @return Returns the ListSubscriptionComponentsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( - final Integer page, - final Integer perPage, - final ListSubscriptionComponentsSort sort, - final ListSubscriptionComponentsForSiteDirection direction, - final SubscriptionListDateField dateField, - final String startDate, - final String startDatetime, - final String endDate, - final String endDatetime, - final List subscriptionIds, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies, - final List filterSubscriptionStates, - final SubscriptionListDateField filterSubscriptionDateField, - final String filterSubscriptionStartDate, - final String filterSubscriptionStartDatetime, - final String filterSubscriptionEndDate, - final String filterSubscriptionEndDatetime) throws ApiException, IOException { - return prepareListSubscriptionComponentsForSiteRequest(page, perPage, sort, direction, - dateField, startDate, startDatetime, endDate, endDatetime, subscriptionIds, - pricePointIds, productFamilyIds, include, filterUseSiteExchangeRate, - filterCurrencies, filterSubscriptionStates, filterSubscriptionDateField, - filterSubscriptionStartDate, filterSubscriptionStartDatetime, - filterSubscriptionEndDate, filterSubscriptionEndDatetime).execute(); + final ListSubscriptionComponentsForSiteInput input) throws ApiException, IOException { + return prepareListSubscriptionComponentsForSiteRequest(input).execute(); } /** * Builds the ApiCall object for listSubscriptionComponentsForSite. */ private ApiCall prepareListSubscriptionComponentsForSiteRequest( - final Integer page, - final Integer perPage, - final ListSubscriptionComponentsSort sort, - final ListSubscriptionComponentsForSiteDirection direction, - final SubscriptionListDateField dateField, - final String startDate, - final String startDatetime, - final String endDate, - final String endDatetime, - final List subscriptionIds, - final IncludeNotNull pricePointIds, - final List productFamilyIds, - final ListSubscriptionComponentsInclude include, - final Boolean filterUseSiteExchangeRate, - final List filterCurrencies, - final List filterSubscriptionStates, - final SubscriptionListDateField filterSubscriptionDateField, - final String filterSubscriptionStartDate, - final String filterSubscriptionStartDatetime, - final String filterSubscriptionEndDate, - final String filterSubscriptionEndDatetime) throws IOException { + final ListSubscriptionComponentsForSiteInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions_components.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("sort") - .value((sort != null) ? sort.value() : null).isRequired(false)) + .value((input.getSort() != null) ? input.getSort().value() : null).isRequired(false)) .queryParam(param -> param.key("direction") - .value((direction != null) ? direction.value() : null).isRequired(false)) + .value((input.getDirection() != null) ? input.getDirection().value() : null).isRequired(false)) .queryParam(param -> param.key("date_field") - .value((dateField != null) ? dateField.value() : null).isRequired(false)) + .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") - .value(startDate).isRequired(false)) + .value(input.getStartDate()).isRequired(false)) .queryParam(param -> param.key("start_datetime") - .value(startDatetime).isRequired(false)) + .value(input.getStartDatetime()).isRequired(false)) .queryParam(param -> param.key("end_date") - .value(endDate).isRequired(false)) + .value(input.getEndDate()).isRequired(false)) .queryParam(param -> param.key("end_datetime") - .value(endDatetime).isRequired(false)) + .value(input.getEndDatetime()).isRequired(false)) .queryParam(param -> param.key("subscription_ids") - .value(subscriptionIds).isRequired(false)) + .value(input.getSubscriptionIds()).isRequired(false)) .queryParam(param -> param.key("price_point_ids") - .value((pricePointIds != null) ? pricePointIds.value() : null).isRequired(false)) + .value((input.getPricePointIds() != null) ? input.getPricePointIds().value() : null).isRequired(false)) .queryParam(param -> param.key("product_family_ids") - .value(productFamilyIds).isRequired(false)) + .value(input.getProductFamilyIds()).isRequired(false)) .queryParam(param -> param.key("include") - .value((include != null) ? include.value() : null).isRequired(false)) + .value((input.getInclude() != null) ? input.getInclude().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[use_site_exchange_rate]") - .value(filterUseSiteExchangeRate).isRequired(false)) + .value(input.getFilterUseSiteExchangeRate()).isRequired(false)) .queryParam(param -> param.key("filter[currencies]") - .value(filterCurrencies).isRequired(false)) + .value(input.getFilterCurrencies()).isRequired(false)) .queryParam(param -> param.key("filter[subscription][states]") - .value(SubscriptionState.toValue(filterSubscriptionStates)).isRequired(false)) + .value(SubscriptionState.toValue(input.getFilterSubscriptionStates())).isRequired(false)) .queryParam(param -> param.key("filter[subscription][date_field]") - .value((filterSubscriptionDateField != null) ? filterSubscriptionDateField.value() : null).isRequired(false)) + .value((input.getFilterSubscriptionDateField() != null) ? input.getFilterSubscriptionDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[subscription][start_date]") - .value(filterSubscriptionStartDate).isRequired(false)) + .value(input.getFilterSubscriptionStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[subscription][start_datetime]") - .value(filterSubscriptionStartDatetime).isRequired(false)) + .value(input.getFilterSubscriptionStartDatetime()).isRequired(false)) .queryParam(param -> param.key("filter[subscription][end_date]") - .value(filterSubscriptionEndDate).isRequired(false)) + .value(input.getFilterSubscriptionEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[subscription][end_datetime]") - .value(filterSubscriptionEndDatetime).isRequired(false)) + .value(input.getFilterSubscriptionEndDatetime()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java index a1ecda88..d492b501 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java @@ -14,7 +14,7 @@ import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.DeductServiceCreditRequest; import com.maxio.advancedbilling.models.IssueServiceCreditRequest; -import com.maxio.advancedbilling.models.ListSubscriptionGroupPrepaymentDateField; +import com.maxio.advancedbilling.models.ListPrepaymentsForSubscriptionGroupInput; import com.maxio.advancedbilling.models.ListSubscriptionGroupPrepaymentResponse; import com.maxio.advancedbilling.models.ServiceCredit; import com.maxio.advancedbilling.models.ServiceCreditResponse; @@ -89,67 +89,37 @@ private ApiCall prepareCreate /** * This request will list a subscription group's prepayments. - * @param uid Required parameter: The uid of the subscription group - * @param filterDateField Optional parameter: The type of filter you would like to apply to - * your search. Use in query: `filter[date_field]=created_at`. - * @param filterEndDate Optional parameter: 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 filterStartDate Optional parameter: 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 page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListPrepaymentsForSubscriptionGroupInput object containing request parameters * @return Returns the ListSubscriptionGroupPrepaymentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( - final String uid, - final ListSubscriptionGroupPrepaymentDateField filterDateField, - final String filterEndDate, - final String filterStartDate, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListPrepaymentsForSubscriptionGroupRequest(uid, filterDateField, - filterEndDate, filterStartDate, page, perPage).execute(); + final ListPrepaymentsForSubscriptionGroupInput input) throws ApiException, IOException { + return prepareListPrepaymentsForSubscriptionGroupRequest(input).execute(); } /** * Builds the ApiCall object for listPrepaymentsForSubscriptionGroup. */ private ApiCall prepareListPrepaymentsForSubscriptionGroupRequest( - final String uid, - final ListSubscriptionGroupPrepaymentDateField filterDateField, - final String filterEndDate, - final String filterStartDate, - final Integer page, - final Integer perPage) throws IOException { + final ListPrepaymentsForSubscriptionGroupInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscription_groups/{uid}/prepayments.json") .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) + .value(input.getFilterEndDate()).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) - .templateParam(param -> param.key("uid").value(uid) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("uid").value(input.getUid()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index b37e102b..2d4b73d8 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -19,6 +19,7 @@ import com.maxio.advancedbilling.models.CreateSubscriptionGroupRequest; import com.maxio.advancedbilling.models.DeleteSubscriptionGroupResponse; import com.maxio.advancedbilling.models.FullSubscriptionGroupResponse; +import com.maxio.advancedbilling.models.ListSubscriptionGroupsInput; import com.maxio.advancedbilling.models.ListSubscriptionGroupsResponse; import com.maxio.advancedbilling.models.SubscriptionGroupResponse; import com.maxio.advancedbilling.models.SubscriptionGroupSignupRequest; @@ -138,47 +139,32 @@ private ApiCall prepareCreateSubscripti * balance information for the subscription groups is not returned by default. If this * information is desired, the `include[]=account_balances` parameter must be provided with the * request. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param include Optional parameter: A list of additional information to include in the - * response. The following values are supported: - `account_balances`: Account balance - * information for the subscription groups. Use in query: `include[]=account_balances` + * @param input ListSubscriptionGroupsInput object containing request parameters * @return Returns the ListSubscriptionGroupsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public ListSubscriptionGroupsResponse listSubscriptionGroups( - final Integer page, - final Integer perPage, - final String include) throws ApiException, IOException { - return prepareListSubscriptionGroupsRequest(page, perPage, include).execute(); + final ListSubscriptionGroupsInput input) throws ApiException, IOException { + return prepareListSubscriptionGroupsRequest(input).execute(); } /** * Builds the ApiCall object for listSubscriptionGroups. */ private ApiCall prepareListSubscriptionGroupsRequest( - final Integer page, - final Integer perPage, - final String include) throws IOException { + final ListSubscriptionGroupsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscription_groups.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("include") - .value(include).isRequired(false)) + .value(input.getInclude()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index c946a6f0..7fd9e841 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -15,11 +15,11 @@ import com.maxio.advancedbilling.exceptions.RefundPrepaymentBaseErrorsResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.AccountBalances; -import com.maxio.advancedbilling.models.BasicDateField; import com.maxio.advancedbilling.models.CreatePrepaymentRequest; import com.maxio.advancedbilling.models.CreatePrepaymentResponse; import com.maxio.advancedbilling.models.DeductServiceCreditRequest; import com.maxio.advancedbilling.models.IssueServiceCreditRequest; +import com.maxio.advancedbilling.models.ListPrepaymentsInput; import com.maxio.advancedbilling.models.PrepaymentResponse; import com.maxio.advancedbilling.models.PrepaymentsResponse; import com.maxio.advancedbilling.models.RefundPrepaymentRequest; @@ -129,68 +129,37 @@ private ApiCall prepareCreatePrepaymentR /** * This request will list a subscription's prepayments. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param filterDateField Optional parameter: 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 filterStartDate Optional parameter: 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 filterEndDate Optional parameter: 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 input ListPrepaymentsInput object containing request parameters * @return Returns the PrepaymentsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public PrepaymentsResponse listPrepayments( - final String subscriptionId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterStartDate, - final String filterEndDate) throws ApiException, IOException { - return prepareListPrepaymentsRequest(subscriptionId, page, perPage, filterDateField, - filterStartDate, filterEndDate).execute(); + final ListPrepaymentsInput input) throws ApiException, IOException { + return prepareListPrepaymentsRequest(input).execute(); } /** * Builds the ApiCall object for listPrepayments. */ private ApiCall prepareListPrepaymentsRequest( - final String subscriptionId, - final Integer page, - final Integer perPage, - final BasicDateField filterDateField, - final String filterStartDate, - final String filterEndDate) throws IOException { + final ListPrepaymentsInput input) throws IOException { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/prepayments.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("filter[date_field]") - .value((filterDateField != null) ? filterDateField.value() : null).isRequired(false)) + .value((input.getFilterDateField() != null) ? input.getFilterDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("filter[start_date]") - .value(filterStartDate).isRequired(false)) + .value(input.getFilterStartDate()).isRequired(false)) .queryParam(param -> param.key("filter[end_date]") - .value(filterEndDate).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(input.getFilterEndDate()).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java index 26b84fd6..10a57038 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java @@ -11,6 +11,7 @@ import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; import com.maxio.advancedbilling.http.request.HttpMethod; +import com.maxio.advancedbilling.models.ListSubscriptionNotesInput; import com.maxio.advancedbilling.models.SubscriptionNoteResponse; import com.maxio.advancedbilling.models.UpdateSubscriptionNoteRequest; import io.apimatic.core.ApiCall; @@ -119,44 +120,31 @@ private ApiCall prepareDeleteSubscriptionNoteRequest( /** * Use this method to retrieve a list of Notes associated with a Subscription. The response will * be an array of Notes. - * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. + * @param input ListSubscriptionNotesInput object containing request parameters * @return Returns the List of SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listSubscriptionNotes( - final String subscriptionId, - final Integer page, - final Integer perPage) throws ApiException, IOException { - return prepareListSubscriptionNotesRequest(subscriptionId, page, perPage).execute(); + final ListSubscriptionNotesInput input) throws ApiException, IOException { + return prepareListSubscriptionNotesRequest(input).execute(); } /** * Builds the ApiCall object for listSubscriptionNotes. */ private ApiCall, ApiException> prepareListSubscriptionNotesRequest( - final String subscriptionId, - final Integer page, - final Integer perPage) throws IOException { + final ListSubscriptionNotesInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/subscriptions/{subscription_id}/notes.json") .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) - .templateParam(param -> param.key("subscription_id").value(subscriptionId) + .value(input.getPerPage()).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(input.getSubscriptionId()) .shouldEncode(true)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java index cbbdf742..286ffdc5 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java @@ -60,7 +60,7 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) { * attribute to authenticate. Attach callback_url param to this URL if you want to be notified * about the result of 3D Secure authentication. Attach redirect_url param to this URL if you * want to redirect a customer back to your page after 3D Secure authentication. Example: - * https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com + * https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com * will do a POST request to https://localhost:4000 after payment is authenticated and will * redirect a customer to https://yourpage.com after 3DS authentication.", "action_link": * "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242" } ``` @@ -76,7 +76,7 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) { * `redirect_url` or `callback_url`. The final URL that you send a customer to to complete 3D * Secure may resemble the following, where the first half is the `action_link` and the second * half contains a `redirect_url` and `callback_url`: - * `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` + * `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` * ### Example Redirect Flow You may wish to redirect customers to different pages depending on * whether their SCA was performed successfully. Here's an example flow to use as a reference: * 1. Create a migration via API; it requires 3DS 2. You receive a `gateway_payment_id` in the diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java index b2c59612..683b7288 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -135,18 +135,18 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * bank account is being passed, the payment attributes should be changed to * `bank_account_attributes`. ```json { "subscription": { "product_handle": "pro-plan", * "customer_attributes": { "first_name": "Joe", "last_name": "Smith", "email": - * "j.smith@example.com" }, "credit_card_attributes": { "chargify_token": + * "j.smith{@literal @}example.com" }, "credit_card_attributes": { "chargify_token": * "tok_cwhvpfcnbtgkd8nfkzf9dnjn", "payment_type": "credit_card" } } } ``` ## Subscription with * vault token If you already have a customer and card stored in your payment gateway, you may * create a subscription with a `vault_token`. Providing the last_four, card type and expiration * date will allow the card to be displayed properly in the Chargify UI. ```json { * "subscription": { "product_handle": "pro-plan", "customer_attributes": { "first_name": "Joe", - * "last_name": "Smith", "email": "j.smith@example.com" }, "credit_card_attributes": { + * "last_name": "Smith", "email": "j.smith{@literal @}example.com" }, "credit_card_attributes": { * first_name: "Joe, last_name: "Smith", card_type: "visa", expiration_month: "05", * expiration_year: "2025", last_four: "1234", vault_token: "12345abc", current_vault: * "braintree_blue" } } ``` ## Subscription with Credit Card ```json "subscription": { * "product_handle": "basic", "customer_attributes": { "first_name": "Joe", "last_name": "Blow", - * "email": "joe@example.com", "zip": "02120", "state": "MA", "reference": "XYZ", "phone": + * "email": "joe{@literal @}example.com", "zip": "02120", "state": "MA", "reference": "XYZ", "phone": * "(617) 111 - 0000", "organization": "Acme", "country": "US", "city": "Boston", "address_2": * null, "address": "123 Mass Ave." }, "credit_card_attributes": { "last_name": "Smith", * "first_name": "Joe", "full_number": "4111111111111111", "expiration_year": "2021", @@ -154,7 +154,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * "billing_country": "US", "billing_city": "Boston", "billing_address_2": null, * "billing_address": "123 Mass Ave." } } ``` ## Subscription with ACH as Payment Profile * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": { - * "first_name": "Joe", "last_name": "Blow", "email": "joe@example.com", "zip": "02120", + * "first_name": "Joe", "last_name": "Blow", "email": "joe{@literal @}example.com", "zip": "02120", * "state": "MA", "reference": "XYZ", "phone": "(617) 111 - 0000", "organization": "Acme", * "country": "US", "city": "Boston", "address_2": null, "address": "123 Mass Ave." }, * "bank_account_attributes": { "bank_name": "Best Bank", "bank_routing_number": "021000089", @@ -162,14 +162,14 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * "bank_account_holder_type": "business", "payment_type": "bank_account" } } } ``` ## * Subscription with PayPal payment profile ### With the nonce from Braintree JS ```json { * "subscription": { "product_handle":"test-product-b", "customer_attributes": { - * "first_name":"Amelia", "last_name":"Johnson", "email":"amelia@example.com", + * "first_name":"Amelia", "last_name":"Johnson", "email":"amelia{@literal @}example.com", * "organization":"My Awesome Company" }, "payment_profile_attributes":{ "paypal_email": - * "amelia@example.com", "current_vault": "braintree_blue", "payment_method_nonce":"abc123", + * "amelia{@literal @}example.com", "current_vault": "braintree_blue", "payment_method_nonce":"abc123", * "payment_type":"paypal_account" } } ``` ### With the Braintree Customer ID as the vault * token: ```json { "subscription": { "product_handle":"test-product-b", "customer_attributes": - * { "first_name":"Amelia", "last_name":"Johnson", "email":"amelia@example.com", + * { "first_name":"Amelia", "last_name":"Johnson", "email":"amelia{@literal @}example.com", * "organization":"My Awesome Company" }, "payment_profile_attributes":{ "paypal_email": - * "amelia@example.com", "current_vault": "braintree_blue", "vault_token":"58271347", + * "amelia{@literal @}example.com", "current_vault": "braintree_blue", "vault_token":"58271347", * "payment_type":"paypal_account" } } ``` ## Subscription using GoCardless Bank Number These * examples creates a customer, bank account and mandate in GoCardless. For more information on * GoCardless, please view the following two resources: + [Payment Profiles via API for @@ -181,14 +181,14 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * + [Using Chargify.js with GoCardless - full * example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": { - * "first_name": "Jane", "last_name": "Doe", "email": "jd@chargify.test" }, + * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" }, * "bank_account_attributes": { "bank_name": "Royal Bank of France", "bank_account_number": * "0000000", "bank_routing_number": "0003", "bank_branch_code": "00006", "payment_type": * "bank_account", "billing_address": "20 Place de la Gare", "billing_city": "Colombes", * "billing_state": "Île-de-France", "billing_zip": "92700", "billing_country": "FR" } } } ``` * ## Subscription using GoCardless IBAN Number ```json { "subscription": { "product_handle": * "gold-product", "customer_attributes": { "first_name": "Jane", "last_name": "Doe", "email": - * "jd@chargify.test" }, "bank_account_attributes": { "bank_name": "French Bank", "bank_iban": + * "jd{@literal @}chargify.test" }, "bank_account_attributes": { "bank_name": "French Bank", "bank_iban": * "FR1420041010050500013M02606", "payment_type": "bank_account", "billing_address": "20 Place * de la Gare", "billing_city": "Colombes", "billing_state": "Île-de-France", "billing_zip": * "92700", "billing_country": "FR" } } } ``` ## Subscription using Stripe SEPA Direct Debit For @@ -202,7 +202,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * + [Using Chargify.js with Stripe SEPA Direct Debit - full * example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": { - * "first_name": "Jane", "last_name": "Doe", "email": "jd@chargify.test" }, + * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" }, * "bank_account_attributes": { "bank_name": "Test Bank", "bank_iban": "DE89370400440532013000", * "payment_type": "bank_account" } } } ``` ## Subscription using Stripe BECS Direct Debit For * more information on Stripe Direct Debit, please view the following two resources: + [Payment @@ -215,7 +215,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * + [Using Chargify.js with Stripe BECS Direct Debit - full * example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-becs-direct-debit-stripe-gateway) * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": { - * "first_name": "Jane", "last_name": "Doe", "email": "jd@chargify.test" }, + * "first_name": "Jane", "last_name": "Doe", "email": "jd{@literal @}chargify.test" }, * "bank_account_attributes": { "bank_name": "Test Bank", "bank_branch_code": "000000", * "bank_account_number": "000123456", "payment_type": "bank_account" } } } ``` ## 3D Secure - * Stripe It may happen that a payment needs 3D Secure Authentication when the subscription is @@ -228,7 +228,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * attribute to authenticate. Attach callback_url param to this URL if you want to be notified * about the result of 3D Secure authentication. Attach redirect_url param to this URL if you * want to redirect a customer back to your page after 3D Secure authentication. Example: - * https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com + * https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com * will do a POST request to https://localhost:4000 after payment is authenticated and will * redirect a customer to https://yourpage.com after 3DS authentication.", "action_link": * "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242" } ``` @@ -244,7 +244,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * `redirect_url` or `callback_url`. The final URL that you send a customer to to complete 3D * Secure may resemble the following, where the first half is the `action_link` and the second * half contains a `redirect_url` and `callback_url`: - * `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` + * `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` * ## 3D Secure - Checkout It may happen that a payment needs 3D Secure Authentication when the * subscription is created; this is referred to in our help docs as a [post-authentication * flow](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405177432077#psd2-flows-pre-authentication-and-post-authentication). @@ -256,7 +256,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * be notified about the result of 3D Secure authentication. Attach redirect_url param to this * URL if you want to redirect a customer back to your page after 3D Secure authentication. * Example: - * https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com + * https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com * will do a POST request to https://localhost:4000 after payment is authenticated and will * redirect a customer to https://yourpage.com after 3DS authentication.", "action_link": * "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123" } @@ -272,7 +272,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * notified about the result, use `redirect_url` or `callback_url`. The final URL that you send * a customer to complete 3D Secure may resemble the following, where the first half is the * `action_link` and the second half contains a `redirect_url` and `callback_url`: - * `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` + * `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` * ### Example Redirect Flow You may wish to redirect customers to different pages depending on * whether their SCA was performed successfully. Here's an example flow to use as a reference: * 1. Create a subscription via API; it requires 3DS 2. You receive a `gateway_payment_id` in @@ -324,7 +324,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * equivalent and will work as input to `next_billing_at`: ``` Aug 06 2030 11:34:00 -0400 Aug 06 * 2030 11:34 -0400 2030-08-06T11:34:00-04:00 8/6/2030 11:34:00 EDT 8/6/2030 8:34:00 PDT * 2030-08-06T15:34:00Z ``` You may also pass just a date, in which case we will assume the time - * to be noon ``` 2010-08-06 ``` ## Subscription Hierarchies & WhoPays When subscription groups + * to be noon ``` 2010-08-06 ``` ## Subscription Hierarchies & WhoPays When subscription groups * were first added to our Relationship Invoicing architecture, to group together invoices for * related subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they * were designed to consist of a primary and a collection of group members. The primary would @@ -393,7 +393,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * Additional urls that can be provided: `return_refund_policy_url`, `delivery_policy_url` and * `secure_checkout_policy_url`. ```json "subscription": { "product_handle": "gold-product", * "customer_attributes": { "first_name": "Jane", "last_name": "Doe", "email": - * "jd@chargify.test" }, "agreement_acceptance": { "ip_address": "1.2.3.4", "terms_url": + * "jd{@literal @}chargify.test" }, "agreement_acceptance": { "ip_address": "1.2.3.4", "terms_url": * "https://terms.url", "privacy_policy_url": "https://privacy_policy.url", * "return_refund_policy_url": "https://return_refund_policy.url", "delivery_policy_url": * "https://delivery_policy.url", "secure_checkout_policy_url": @@ -406,7 +406,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * with the following nested parameters: `agreement_terms`, `authorizer_first_name`, * `authorizer_last_name` and `ip_address`. Each of them is required. ```json "subscription": { * "product_handle": "gold-product", "customer_attributes": { "first_name": "Jane", "last_name": - * "Doe", "email": "jd@chargify.test" }, "bank_account_attributes": { "bank_name": "Test Bank", + * "Doe", "email": "jd{@literal @}chargify.test" }, "bank_account_attributes": { "bank_name": "Test Bank", * "bank_routing_number": "021000089", "bank_account_number": "111111111111", * "bank_account_type": "checking", "bank_account_holder_type": "business", "payment_type": * "bank_account" }, "ach_agreement": { "agreement_terms": "ACH agreement terms", @@ -610,7 +610,7 @@ private ApiCall prepareUpdateSubscriptionReq * include[]=self_service_page_token parameter must be provided with the request. * @param subscriptionId Required parameter: The Chargify id of the subscription * @param include Optional parameter: Allows including additional data in the response. Use in - * query: `include[]=coupons&include[]=self_service_page_token`. + * query: `include[]=coupons&include[]=self_service_page_token`. * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -755,13 +755,13 @@ private ApiCall prepareReadSubscriptionByRef * in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may * also delete the customer record and/or payment profiles by passing `cascade` parameters. For * example, to delete just the customer record, the query params would be: - * `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, + * `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, * please contact support to discuss your use case. ### Delete customer and payment profile The - * query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile`. + * query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile`. * @param subscriptionId Required parameter: The Chargify id of the subscription * @param ack Required parameter: id of the customer. * @param cascade Optional parameter: Options are "customer" or "payment_profile". Use in - * query: `cascade[]=customer&cascade[]=payment_profile`. + * query: `cascade[]=customer&cascade[]=payment_profile`. * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ diff --git a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java index e9650413..769c245f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java @@ -16,12 +16,11 @@ import com.maxio.advancedbilling.models.EnableWebhooksResponse; import com.maxio.advancedbilling.models.Endpoint; import com.maxio.advancedbilling.models.EndpointResponse; +import com.maxio.advancedbilling.models.ListWebhooksInput; import com.maxio.advancedbilling.models.ReplayWebhooksRequest; import com.maxio.advancedbilling.models.ReplayWebhooksResponse; import com.maxio.advancedbilling.models.UpdateEndpointRequest; -import com.maxio.advancedbilling.models.WebhookOrder; import com.maxio.advancedbilling.models.WebhookResponse; -import com.maxio.advancedbilling.models.WebhookStatus; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -58,69 +57,40 @@ public WebhooksController(GlobalConfiguration globalConfig) { * payloads](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405357509645-Webhooks-Reference#events) * ## List Webhooks for a Site This method allows you to fetch data about webhooks. You can pass * query parameters if you want to filter webhooks. - * @param status Optional parameter: Webhooks with matching status would be returned. - * @param sinceDate Optional parameter: Format YYYY-MM-DD. Returns Webhooks with the - * created_at date greater than or equal to the one specified. - * @param untilDate Optional parameter: Format YYYY-MM-DD. Returns Webhooks with the - * created_at date less than or equal to the one specified. - * @param page Optional parameter: 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`. - * @param perPage Optional parameter: 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`. - * @param order Optional parameter: The order in which the Webhooks are returned. - * @param subscription Optional parameter: The Chargify id of a subscription you'd like to - * filter for + * @param input ListWebhooksInput object containing request parameters * @return Returns the List of WebhookResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. */ public List listWebhooks( - final WebhookStatus status, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage, - final WebhookOrder order, - final Integer subscription) throws ApiException, IOException { - return prepareListWebhooksRequest(status, sinceDate, untilDate, page, perPage, order, - subscription).execute(); + final ListWebhooksInput input) throws ApiException, IOException { + return prepareListWebhooksRequest(input).execute(); } /** * Builds the ApiCall object for listWebhooks. */ private ApiCall, ApiException> prepareListWebhooksRequest( - final WebhookStatus status, - final String sinceDate, - final String untilDate, - final Integer page, - final Integer perPage, - final WebhookOrder order, - final Integer subscription) throws IOException { + final ListWebhooksInput input) throws IOException { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.ENUM_DEFAULT.value()) .path("/webhooks.json") .queryParam(param -> param.key("status") - .value((status != null) ? status.value() : null).isRequired(false)) + .value((input.getStatus() != null) ? input.getStatus().value() : null).isRequired(false)) .queryParam(param -> param.key("since_date") - .value(sinceDate).isRequired(false)) + .value(input.getSinceDate()).isRequired(false)) .queryParam(param -> param.key("until_date") - .value(untilDate).isRequired(false)) + .value(input.getUntilDate()).isRequired(false)) .queryParam(param -> param.key("page") - .value((page != null) ? page : 1).isRequired(false)) + .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") - .value((perPage != null) ? perPage : 20).isRequired(false)) + .value(input.getPerPage()).isRequired(false)) .queryParam(param -> param.key("order") - .value((order != null) ? order.value() : null).isRequired(false)) + .value((input.getOrder() != null) ? input.getOrder().value() : null).isRequired(false)) .queryParam(param -> param.key("subscription") - .value(subscription).isRequired(false)) + .value(input.getSubscription()).isRequired(false)) .headerParam(param -> param.key("accept").value("application/json")) .authenticationKey(BaseController.AUTHENTICATION_KEY) .httpMethod(HttpMethod.GET)) diff --git a/src/main/java/com/maxio/advancedbilling/http/Headers.java b/src/main/java/com/maxio/advancedbilling/http/Headers.java index 6c3cc965..d144d541 100644 --- a/src/main/java/com/maxio/advancedbilling/http/Headers.java +++ b/src/main/java/com/maxio/advancedbilling/http/Headers.java @@ -182,6 +182,7 @@ public void add(String headerName, List values) { * Neither headerName nor values can be null. * @param headerName The header name to add the value against. * @param value The value to add. + * @return The current instance after adding the provided header name and value. */ public Headers createHeader(String headerName, String value) { add(headerName, value); diff --git a/src/main/java/com/maxio/advancedbilling/models/ActivateSubscriptionRequest.java b/src/main/java/com/maxio/advancedbilling/models/ActivateSubscriptionRequest.java index 8fedc0f4..fea0b2c8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ActivateSubscriptionRequest.java +++ b/src/main/java/com/maxio/advancedbilling/models/ActivateSubscriptionRequest.java @@ -34,8 +34,10 @@ public ActivateSubscriptionRequest( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param revertOnFailure Boolean value for revertOnFailure. */ + protected ActivateSubscriptionRequest(OptionalNullable revertOnFailure) { this.revertOnFailure = revertOnFailure; } diff --git a/src/main/java/com/maxio/advancedbilling/models/Allocation.java b/src/main/java/com/maxio/advancedbilling/models/Allocation.java index 2e41442e..aacedaea 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Allocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/Allocation.java @@ -95,8 +95,25 @@ public Allocation( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param componentId Integer value for componentId. + * @param subscriptionId Integer value for subscriptionId. + * @param quantity Integer value for quantity. + * @param previousQuantity Integer value for previousQuantity. + * @param memo String value for memo. + * @param timestamp String value for timestamp. + * @param prorationUpgradeScheme String value for prorationUpgradeScheme. + * @param prorationDowngradeScheme String value for prorationDowngradeScheme. + * @param pricePointId Integer value for pricePointId. + * @param pricePointName String value for pricePointName. + * @param pricePointHandle String value for pricePointHandle. + * @param previousPricePointId Integer value for previousPricePointId. + * @param accrueCharge Boolean value for accrueCharge. + * @param upgradeCharge String value for upgradeCharge. + * @param downgradeCredit String value for downgradeCredit. + * @param payment AllocationPayment2 value for payment. */ + protected Allocation(Integer componentId, Integer subscriptionId, Integer quantity, Integer previousQuantity, OptionalNullable memo, String timestamp, String prorationUpgradeScheme, String prorationDowngradeScheme, Integer pricePointId, diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java index 138a3882..586cee95 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java @@ -86,8 +86,23 @@ public AllocationPreviewItem( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param componentId Integer value for componentId. + * @param subscriptionId Integer value for subscriptionId. + * @param quantity Double value for quantity. + * @param previousQuantity Integer value for previousQuantity. + * @param memo String value for memo. + * @param timestamp String value for timestamp. + * @param prorationUpgradeScheme String value for prorationUpgradeScheme. + * @param prorationDowngradeScheme String value for prorationDowngradeScheme. + * @param accrueCharge Boolean value for accrueCharge. + * @param upgradeCharge String value for upgradeCharge. + * @param downgradeCredit String value for downgradeCredit. + * @param pricePointId Integer value for pricePointId. + * @param previousPricePointId Integer value for previousPricePointId. + * @param componentHandle String value for componentHandle. */ + protected AllocationPreviewItem(Integer componentId, Integer subscriptionId, Double quantity, Integer previousQuantity, String memo, OptionalNullable timestamp, String prorationUpgradeScheme, String prorationDowngradeScheme, Boolean accrueCharge, diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java b/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java index d2e826e7..22257598 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java @@ -42,8 +42,12 @@ public AllocationSettings( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param upgradeCharge String value for upgradeCharge. + * @param downgradeCredit String value for downgradeCredit. + * @param accrueCharge Boolean value for accrueCharge. */ + protected AllocationSettings(OptionalNullable upgradeCharge, OptionalNullable downgradeCredit, Boolean accrueCharge) { this.upgradeCharge = upgradeCharge; diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccount.java b/src/main/java/com/maxio/advancedbilling/models/BankAccount.java index c3d6e480..f5f281ce 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccount.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccount.java @@ -119,8 +119,31 @@ public BankAccount( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param customerId Integer value for customerId. + * @param currentVault BankAccountVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param bankName String value for bankName. + * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. + * @param bankAccountType String value for bankAccountType. + * @param bankAccountHolderType String value for bankAccountHolderType. + * @param paymentType String value for paymentType. + * @param verified Boolean value for verified. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected BankAccount(Integer id, String firstName, String lastName, Integer customerId, BankAccountVault currentVault, String vaultToken, String billingAddress, String billingCity, String billingState, String billingZip, String billingCountry, diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java index 647dda6b..dcd39d80 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java @@ -121,8 +121,31 @@ public BankAccountPaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param customerId Integer value for customerId. + * @param currentVault BankAccountVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param bankName String value for bankName. + * @param bankAccountType String value for bankAccountType. + * @param bankAccountHolderType String value for bankAccountHolderType. + * @param paymentType String value for paymentType. + * @param verified Boolean value for verified. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected BankAccountPaymentProfile(String maskedBankRoutingNumber, String maskedBankAccountNumber, Integer id, String firstName, String lastName, Integer customerId, BankAccountVault currentVault, String vaultToken, diff --git a/src/main/java/com/maxio/advancedbilling/models/BatchJob.java b/src/main/java/com/maxio/advancedbilling/models/BatchJob.java index b1be1a5e..785c54a2 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BatchJob.java +++ b/src/main/java/com/maxio/advancedbilling/models/BatchJob.java @@ -50,8 +50,14 @@ public BatchJob( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param finishedAt String value for finishedAt. + * @param rowCount Integer value for rowCount. + * @param createdAt String value for createdAt. + * @param completed String value for completed. */ + protected BatchJob(Integer id, OptionalNullable finishedAt, OptionalNullable rowCount, OptionalNullable createdAt, String completed) { diff --git a/src/main/java/com/maxio/advancedbilling/models/BillingAddress.java b/src/main/java/com/maxio/advancedbilling/models/BillingAddress.java index 41ea800d..fcac3522 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BillingAddress.java +++ b/src/main/java/com/maxio/advancedbilling/models/BillingAddress.java @@ -54,8 +54,15 @@ public BillingAddress( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param street String value for street. + * @param line2 String value for line2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. */ + protected BillingAddress(OptionalNullable street, OptionalNullable line2, OptionalNullable city, OptionalNullable state, OptionalNullable zip, OptionalNullable country) { diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java index d7e8dd7c..ab080ccb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Component.java +++ b/src/main/java/com/maxio/advancedbilling/models/Component.java @@ -155,8 +155,40 @@ public Component( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param handle String value for handle. + * @param pricingScheme String value for pricingScheme. + * @param unitName String value for unitName. + * @param unitPrice String value for unitPrice. + * @param productFamilyId Integer value for productFamilyId. + * @param productFamilyName String value for productFamilyName. + * @param pricePerUnitInCents Integer value for pricePerUnitInCents. + * @param kind ComponentKind value for kind. + * @param archived Boolean value for archived. + * @param taxable Boolean value for taxable. + * @param description String value for description. + * @param defaultPricePointId Integer value for defaultPricePointId. + * @param prices List of ComponentPrice value for prices. + * @param pricePointCount Integer value for pricePointCount. + * @param pricePointsUrl String value for pricePointsUrl. + * @param defaultPricePointName String value for defaultPricePointName. + * @param taxCode String value for taxCode. + * @param recurring Boolean value for recurring. + * @param upgradeCharge String value for upgradeCharge. + * @param downgradeCredit String value for downgradeCredit. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param archivedAt String value for archivedAt. + * @param hideDateRangeOnInvoice Boolean value for hideDateRangeOnInvoice. + * @param allowFractionalQuantities Boolean value for allowFractionalQuantities. + * @param itemCategory ItemCategory value for itemCategory. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param accountingCode String value for accountingCode. + * @param eventBasedBillingMetricId Integer value for eventBasedBillingMetricId. */ + protected Component(Integer id, String name, String handle, OptionalNullable pricingScheme, String unitName, OptionalNullable unitPrice, Integer productFamilyId, String productFamilyName, diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentCostData.java b/src/main/java/com/maxio/advancedbilling/models/ComponentCostData.java index 5cfbc182..0fb11455 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentCostData.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentCostData.java @@ -60,8 +60,16 @@ public ComponentCostData( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param componentCodeId Integer value for componentCodeId. + * @param pricePointId Integer value for pricePointId. + * @param productId Integer value for productId. + * @param quantity String value for quantity. + * @param amount String value for amount. + * @param pricingScheme ComponentCostDataPricingScheme value for pricingScheme. + * @param tiers List of ComponentCostDataRateTier value for tiers. */ + protected ComponentCostData(OptionalNullable componentCodeId, Integer pricePointId, Integer productId, String quantity, String amount, ComponentCostDataPricingScheme pricingScheme, List tiers) { diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentCostDataRateTier.java b/src/main/java/com/maxio/advancedbilling/models/ComponentCostDataRateTier.java index ef2d28af..f4a18d2b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentCostDataRateTier.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentCostDataRateTier.java @@ -50,8 +50,14 @@ public ComponentCostDataRateTier( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param startingQuantity Integer value for startingQuantity. + * @param endingQuantity Integer value for endingQuantity. + * @param quantity String value for quantity. + * @param unitPrice String value for unitPrice. + * @param amount String value for amount. */ + protected ComponentCostDataRateTier(Integer startingQuantity, OptionalNullable endingQuantity, String quantity, String unitPrice, String amount) { diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPrice.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPrice.java index 373ff6a5..55c8bd90 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPrice.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPrice.java @@ -62,8 +62,17 @@ public ComponentPrice( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param componentId Integer value for componentId. + * @param startingQuantity Integer value for startingQuantity. + * @param endingQuantity Integer value for endingQuantity. + * @param unitPrice String value for unitPrice. + * @param pricePointId Integer value for pricePointId. + * @param formattedUnitPrice String value for formattedUnitPrice. + * @param segmentId Integer value for segmentId. */ + protected ComponentPrice(Integer id, Integer componentId, Integer startingQuantity, OptionalNullable endingQuantity, String unitPrice, Integer pricePointId, String formattedUnitPrice, OptionalNullable segmentId) { diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java index 72a4f967..2aab79be 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java @@ -88,8 +88,23 @@ public ComponentPricePoint( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param type PricePointType value for type. + * @param mDefault Boolean value for mDefault. + * @param name String value for name. + * @param pricingScheme String value for pricingScheme. + * @param componentId Integer value for componentId. + * @param handle String value for handle. + * @param archivedAt String value for archivedAt. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param prices List of ComponentPricePointPrice value for prices. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param subscriptionId Integer value for subscriptionId. + * @param taxIncluded Boolean value for taxIncluded. */ + protected ComponentPricePoint(Integer id, PricePointType type, Boolean mDefault, String name, String pricingScheme, Integer componentId, String handle, OptionalNullable archivedAt, String createdAt, String updatedAt, diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointPrice.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointPrice.java index 04c7248f..88817a62 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointPrice.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointPrice.java @@ -62,8 +62,17 @@ public ComponentPricePointPrice( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param componentId Integer value for componentId. + * @param startingQuantity Integer value for startingQuantity. + * @param endingQuantity Integer value for endingQuantity. + * @param unitPrice String value for unitPrice. + * @param pricePointId Integer value for pricePointId. + * @param formattedUnitPrice String value for formattedUnitPrice. + * @param segmentId Integer value for segmentId. */ + protected ComponentPricePointPrice(Integer id, Integer componentId, Integer startingQuantity, OptionalNullable endingQuantity, String unitPrice, Integer pricePointId, String formattedUnitPrice, OptionalNullable segmentId) { diff --git a/src/main/java/com/maxio/advancedbilling/models/Coupon.java b/src/main/java/com/maxio/advancedbilling/models/Coupon.java index 6210a99d..8709fb07 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Coupon.java +++ b/src/main/java/com/maxio/advancedbilling/models/Coupon.java @@ -148,8 +148,38 @@ public Coupon( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Double value for id. + * @param name String value for name. + * @param code String value for code. + * @param description String value for description. + * @param amount Double value for amount. + * @param amountInCents Integer value for amountInCents. + * @param productFamilyId Integer value for productFamilyId. + * @param productFamilyName String value for productFamilyName. + * @param startDate String value for startDate. + * @param endDate String value for endDate. + * @param percentage Double value for percentage. + * @param recurring Boolean value for recurring. + * @param recurringScheme RecurringScheme value for recurringScheme. + * @param durationPeriodCount Integer value for durationPeriodCount. + * @param durationInterval Integer value for durationInterval. + * @param durationIntervalUnit String value for durationIntervalUnit. + * @param durationIntervalSpan String value for durationIntervalSpan. + * @param allowNegativeBalance Boolean value for allowNegativeBalance. + * @param archivedAt String value for archivedAt. + * @param conversionLimit String value for conversionLimit. + * @param stackable Boolean value for stackable. + * @param compoundingStrategy CouponCompoundingStrategy value for compoundingStrategy. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param discountType DiscountType value for discountType. + * @param excludeMidPeriodAllocations Boolean value for excludeMidPeriodAllocations. + * @param applyOnCancelAtEndOfPeriod Boolean value for applyOnCancelAtEndOfPeriod. + * @param couponRestrictions List of CouponRestriction value for couponRestrictions. */ + protected Coupon(Double id, String name, String code, String description, OptionalNullable amount, OptionalNullable amountInCents, Integer productFamilyId, String productFamilyName, String startDate, diff --git a/src/main/java/com/maxio/advancedbilling/models/CouponRestriction.java b/src/main/java/com/maxio/advancedbilling/models/CouponRestriction.java index 946808ad..46c5a906 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CouponRestriction.java +++ b/src/main/java/com/maxio/advancedbilling/models/CouponRestriction.java @@ -50,8 +50,14 @@ public CouponRestriction( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param itemType RestrictionType value for itemType. + * @param itemId Integer value for itemId. + * @param name String value for name. + * @param handle String value for handle. */ + protected CouponRestriction(Integer id, RestrictionType itemType, Integer itemId, String name, OptionalNullable handle) { this.id = id; diff --git a/src/main/java/com/maxio/advancedbilling/models/CouponUsage.java b/src/main/java/com/maxio/advancedbilling/models/CouponUsage.java index 230f83e0..56d54f5b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CouponUsage.java +++ b/src/main/java/com/maxio/advancedbilling/models/CouponUsage.java @@ -58,8 +58,16 @@ public CouponUsage( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param signups Integer value for signups. + * @param savings Integer value for savings. + * @param savingsInCents Integer value for savingsInCents. + * @param revenue Integer value for revenue. + * @param revenueInCents Integer value for revenueInCents. */ + protected CouponUsage(Integer id, String name, Integer signups, OptionalNullable savings, OptionalNullable savingsInCents, OptionalNullable revenue, Integer revenueInCents) { diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java index d05c9f23..2af6a001 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java @@ -67,8 +67,18 @@ public CreateAllocation( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param quantity double value for quantity. + * @param componentId Integer value for componentId. + * @param memo String value for memo. + * @param prorationDowngradeScheme String value for prorationDowngradeScheme. + * @param prorationUpgradeScheme String value for prorationUpgradeScheme. + * @param accrueCharge Boolean value for accrueCharge. + * @param downgradeCredit CreditType1 value for downgradeCredit. + * @param upgradeCharge CreditType1 value for upgradeCharge. + * @param pricePointId CreateAllocationPricePointId value for pricePointId. */ + protected CreateAllocation(double quantity, Integer componentId, String memo, String prorationDowngradeScheme, String prorationUpgradeScheme, Boolean accrueCharge, CreditType1 downgradeCredit, CreditType1 upgradeCharge, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateCustomer.java b/src/main/java/com/maxio/advancedbilling/models/CreateCustomer.java index a269b0ff..0756b514 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateCustomer.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateCustomer.java @@ -102,8 +102,27 @@ public CreateCustomer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param email String value for email. + * @param ccEmails String value for ccEmails. + * @param organization String value for organization. + * @param reference String value for reference. + * @param address String value for address. + * @param address2 String value for address2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. + * @param phone String value for phone. + * @param locale String value for locale. + * @param vatNumber String value for vatNumber. + * @param taxExempt Boolean value for taxExempt. + * @param taxExemptReason String value for taxExemptReason. + * @param parentId Integer value for parentId. */ + protected CreateCustomer(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, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateFlatAmountCoupon.java b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateFlatAmountCoupon.java index e4f07187..19b78558 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateFlatAmountCoupon.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdateFlatAmountCoupon.java @@ -116,7 +116,7 @@ public void setName(String name) { /** * Getter for Code. * may contain uppercase alphanumeric characters and these special characters (which allow for - * email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” + * email addresses to be used): “%”, “{@literal @}”, “+”, “-”, “_”, and “.” * @return Returns the String */ @JsonGetter("code") @@ -127,7 +127,7 @@ public String getCode() { /** * Setter for Code. * may contain uppercase alphanumeric characters and these special characters (which allow for - * email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” + * email addresses to be used): “%”, “{@literal @}”, “+”, “-”, “_”, and “.” * @param code Value for String */ @JsonSetter("code") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdatePercentageCoupon.java b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdatePercentageCoupon.java index af8cecf6..916b0f34 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdatePercentageCoupon.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateOrUpdatePercentageCoupon.java @@ -117,7 +117,7 @@ public void setName(String name) { /** * Getter for Code. * may contain uppercase alphanumeric characters and these special characters (which allow for - * email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” + * email addresses to be used): “%”, “{@literal @}”, “+”, “-”, “_”, and “.” * @return Returns the String */ @JsonGetter("code") @@ -128,7 +128,7 @@ public String getCode() { /** * Setter for Code. * may contain uppercase alphanumeric characters and these special characters (which allow for - * email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” + * email addresses to be used): “%”, “{@literal @}”, “+”, “-”, “_”, and “.” * @param code Value for String */ @JsonSetter("code") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java index 998f7ac3..33f9ae7c 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreatePaymentProfile.java @@ -161,8 +161,41 @@ public CreatePaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param chargifyToken String value for chargifyToken. + * @param id Integer value for id. + * @param paymentType PaymentType value for paymentType. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param maskedCardNumber String value for maskedCardNumber. + * @param fullNumber String value for fullNumber. + * @param cardType CardType value for cardType. + * @param expirationMonth CreatePaymentProfileExpirationMonth value for expirationMonth. + * @param expirationYear CreatePaymentProfileExpirationYear value for expirationYear. + * @param billingAddress String value for billingAddress. + * @param billingAddress2 String value for billingAddress2. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingCountry String value for billingCountry. + * @param billingZip String value for billingZip. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param customerVaultToken String value for customerVaultToken. + * @param customerId Integer value for customerId. + * @param paypalEmail String value for paypalEmail. + * @param paymentMethodNonce String value for paymentMethodNonce. + * @param gatewayHandle String value for gatewayHandle. + * @param cvv String value for cvv. + * @param bankName String value for bankName. + * @param bankIban String value for bankIban. + * @param bankRoutingNumber String value for bankRoutingNumber. + * @param bankAccountNumber String value for bankAccountNumber. + * @param bankBranchCode String value for bankBranchCode. + * @param bankAccountType String value for bankAccountType. + * @param bankAccountHolderType String value for bankAccountHolderType. + * @param lastFour String value for lastFour. */ + protected CreatePaymentProfile(String chargifyToken, Integer id, PaymentType paymentType, String firstName, String lastName, String maskedCardNumber, String fullNumber, CardType cardType, CreatePaymentProfileExpirationMonth expirationMonth, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateProductFamily.java b/src/main/java/com/maxio/advancedbilling/models/CreateProductFamily.java index 1f62f0d8..e7cb8918 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateProductFamily.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateProductFamily.java @@ -38,8 +38,11 @@ public CreateProductFamily( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param name String value for name. + * @param description String value for description. */ + protected CreateProductFamily(String name, OptionalNullable description) { this.name = name; this.description = description; diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java index 16a329cb..aff78bf7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java @@ -240,8 +240,62 @@ public CreateSubscription( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param productHandle String value for productHandle. + * @param productId String value for productId. + * @param productPricePointHandle String value for productPricePointHandle. + * @param productPricePointId String value for productPricePointId. + * @param customPrice CustomPriceUsedForSubscriptionCreateUpdate value for customPrice. + * @param couponCode String value for couponCode. + * @param couponCodes List of String value for couponCodes. + * @param paymentCollectionMethod PaymentCollectionMethod value for paymentCollectionMethod. + * @param receivesInvoiceEmails String value for receivesInvoiceEmails. + * @param netTerms String value for netTerms. + * @param customerId Integer value for customerId. + * @param nextBillingAt String value for nextBillingAt. + * @param initialBillingAt String value for initialBillingAt. + * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. + * @param salesRepId Integer value for salesRepId. + * @param paymentProfileId Integer value for paymentProfileId. + * @param reference String value for reference. + * @param customerAttributes CustomerAttributes value for customerAttributes. + * @param paymentProfileAttributes PaymentProfileAttributes value for + * paymentProfileAttributes. + * @param creditCardAttributes PaymentProfileAttributes value for creditCardAttributes. + * @param bankAccountAttributes BankAccountAttributes value for bankAccountAttributes. + * @param components List of CreateSubscriptionComponents value for components. + * @param calendarBilling CalendarBilling value for calendarBilling. + * @param metafields Map of String, value for metafields. + * @param customerReference String value for customerReference. + * @param group CreateSubscriptionGroup2 value for group. + * @param ref String value for ref. + * @param cancellationMessage String value for cancellationMessage. + * @param cancellationMethod String value for cancellationMethod. + * @param currency String value for currency. + * @param expiresAt String value for expiresAt. + * @param expirationTracksNextBillingChange String value for + * expirationTracksNextBillingChange. + * @param agreementTerms String value for agreementTerms. + * @param authorizerFirstName String value for authorizerFirstName. + * @param authorizerLastName String value for authorizerLastName. + * @param calendarBillingFirstCharge String value for calendarBillingFirstCharge. + * @param reasonCode String value for reasonCode. + * @param productChangeDelayed Boolean value for productChangeDelayed. + * @param offerId CreateSubscriptionOfferId value for offerId. + * @param prepaidSubscriptionConfiguration UpsertPrepaidConfiguration value for + * prepaidSubscriptionConfiguration. + * @param previousBillingAt String value for previousBillingAt. + * @param importMrr Boolean value for importMrr. + * @param canceledAt String value for canceledAt. + * @param activatedAt String value for activatedAt. + * @param agreementAcceptance AgreementAcceptance value for agreementAcceptance. + * @param achAgreement ACHAgreement value for achAgreement. + * @param dunningCommunicationDelayEnabled Boolean value for dunningCommunicationDelayEnabled. + * @param dunningCommunicationDelayTimeZone String value for + * dunningCommunicationDelayTimeZone. + * @param skipBillingManifestTaxes Boolean value for skipBillingManifestTaxes. */ + protected CreateSubscription(String productHandle, String productId, String productPricePointHandle, String productPricePointId, CustomPriceUsedForSubscriptionCreateUpdate customPrice, String couponCode, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreatedPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreatedPaymentProfile.java index 7c9e44da..b6732ac1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreatedPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreatedPaymentProfile.java @@ -134,8 +134,35 @@ public CreatedPaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param maskedCardNumber String value for maskedCardNumber. + * @param cardType String value for cardType. + * @param expirationMonth Integer value for expirationMonth. + * @param expirationYear Integer value for expirationYear. + * @param customerId Integer value for customerId. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param paymentType String value for paymentType. + * @param bankName String value for bankName. + * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. + * @param bankAccountType String value for bankAccountType. + * @param bankAccountHolderType String value for bankAccountHolderType. + * @param verified Boolean value for verified. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected CreatedPaymentProfile(Integer id, String firstName, String lastName, OptionalNullable maskedCardNumber, String cardType, Integer expirationMonth, Integer expirationYear, Integer customerId, CurrentVault currentVault, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java index 7335215c..7e94af7d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java @@ -116,8 +116,30 @@ public CreditCardPaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param maskedCardNumber String value for maskedCardNumber. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param cardType CardType1 value for cardType. + * @param expirationMonth Integer value for expirationMonth. + * @param expirationYear Integer value for expirationYear. + * @param customerId Integer value for customerId. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param paymentType String value for paymentType. + * @param disabled Boolean value for disabled. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected CreditCardPaymentProfile(String maskedCardNumber, Integer id, String firstName, String lastName, CardType1 cardType, Integer expirationMonth, Integer expirationYear, Integer customerId, CurrentVault currentVault, String vaultToken, String billingAddress, diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java b/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java index 9d5bf83f..08a83bda 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditNoteLineItem.java @@ -94,8 +94,25 @@ public CreditNoteLineItem( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param uid String value for uid. + * @param title String value for title. + * @param description String value for description. + * @param quantity String value for quantity. + * @param unitPrice String value for unitPrice. + * @param subtotalAmount String value for subtotalAmount. + * @param discountAmount String value for discountAmount. + * @param taxAmount String value for taxAmount. + * @param totalAmount String value for totalAmount. + * @param tieredUnitPrice Boolean value for tieredUnitPrice. + * @param periodRangeStart String value for periodRangeStart. + * @param periodRangeEnd String value for periodRangeEnd. + * @param productId Integer value for productId. + * @param productVersion Integer value for productVersion. + * @param componentId Integer value for componentId. + * @param pricePointId Integer value for pricePointId. */ + protected CreditNoteLineItem(String uid, String title, String description, String quantity, String unitPrice, String subtotalAmount, String discountAmount, String taxAmount, String totalAmount, Boolean tieredUnitPrice, String periodRangeStart, diff --git a/src/main/java/com/maxio/advancedbilling/models/Customer.java b/src/main/java/com/maxio/advancedbilling/models/Customer.java index 81bcb34c..bbdd844e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Customer.java +++ b/src/main/java/com/maxio/advancedbilling/models/Customer.java @@ -138,8 +138,36 @@ public Customer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param email String value for email. + * @param ccEmails String value for ccEmails. + * @param organization String value for organization. + * @param reference String value for reference. + * @param id Integer value for id. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param address String value for address. + * @param address2 String value for address2. + * @param city String value for city. + * @param state String value for state. + * @param stateName String value for stateName. + * @param zip String value for zip. + * @param country String value for country. + * @param countryName String value for countryName. + * @param phone String value for phone. + * @param verified Boolean value for verified. + * @param portalCustomerCreatedAt String value for portalCustomerCreatedAt. + * @param portalInviteLastSentAt String value for portalInviteLastSentAt. + * @param portalInviteLastAcceptedAt String value for portalInviteLastAcceptedAt. + * @param taxExempt Boolean value for taxExempt. + * @param vatNumber String value for vatNumber. + * @param parentId Integer value for parentId. + * @param locale String value for locale. + * @param defaultSubscriptionGroupUid String value for defaultSubscriptionGroupUid. */ + protected Customer(String firstName, String lastName, String email, OptionalNullable ccEmails, OptionalNullable organization, OptionalNullable reference, Integer id, String createdAt, String updatedAt, @@ -249,7 +277,7 @@ public void setEmail(String email) { /** * Internal Getter for CcEmails. * A comma-separated list of emails that should be cc’d on all customer communications (i.e. - * “joe@example.com, sue@example.com”) + * “joe{@literal @}example.com, sue{@literal @}example.com”) * @return Returns the Internal String */ @JsonGetter("cc_emails") @@ -262,7 +290,7 @@ protected OptionalNullable internalGetCcEmails() { /** * Getter for CcEmails. * A comma-separated list of emails that should be cc’d on all customer communications (i.e. - * “joe@example.com, sue@example.com”) + * “joe{@literal @}example.com, sue{@literal @}example.com”) * @return Returns the String */ public String getCcEmails() { @@ -272,7 +300,7 @@ public String getCcEmails() { /** * Setter for CcEmails. * A comma-separated list of emails that should be cc’d on all customer communications (i.e. - * “joe@example.com, sue@example.com”) + * “joe{@literal @}example.com, sue{@literal @}example.com”) * @param ccEmails Value for String */ @JsonSetter("cc_emails") @@ -283,7 +311,7 @@ public void setCcEmails(String ccEmails) { /** * UnSetter for CcEmails. * A comma-separated list of emails that should be cc’d on all customer communications (i.e. - * “joe@example.com, sue@example.com”) + * “joe{@literal @}example.com, sue{@literal @}example.com”) */ public void unsetCcEmails() { ccEmails = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/Customer1.java b/src/main/java/com/maxio/advancedbilling/models/Customer1.java index 9a10037c..188667ed 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Customer1.java +++ b/src/main/java/com/maxio/advancedbilling/models/Customer1.java @@ -58,8 +58,16 @@ public Customer1( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param chargifyId Integer value for chargifyId. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param organization String value for organization. + * @param email String value for email. + * @param vatNumber String value for vatNumber. + * @param reference String value for reference. */ + protected Customer1(Integer chargifyId, String firstName, String lastName, OptionalNullable organization, String email, OptionalNullable vatNumber, OptionalNullable reference) { diff --git a/src/main/java/com/maxio/advancedbilling/models/CustomerAttributes.java b/src/main/java/com/maxio/advancedbilling/models/CustomerAttributes.java index 0cb7034b..72b70b7d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CustomerAttributes.java +++ b/src/main/java/com/maxio/advancedbilling/models/CustomerAttributes.java @@ -103,8 +103,27 @@ public CustomerAttributes( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param email String value for email. + * @param ccEmails String value for ccEmails. + * @param organization String value for organization. + * @param reference String value for reference. + * @param address String value for address. + * @param address2 String value for address2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. + * @param phone String value for phone. + * @param verified Boolean value for verified. + * @param taxExempt Boolean value for taxExempt. + * @param vatNumber String value for vatNumber. + * @param metafields Map of String, value for metafields. + * @param parentId Integer value for parentId. */ + protected CustomerAttributes(String firstName, String lastName, String email, String ccEmails, String organization, String reference, String address, OptionalNullable address2, String city, String state, String zip, diff --git a/src/main/java/com/maxio/advancedbilling/models/DunningStepData.java b/src/main/java/com/maxio/advancedbilling/models/DunningStepData.java index bf533356..d2204d3e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/DunningStepData.java +++ b/src/main/java/com/maxio/advancedbilling/models/DunningStepData.java @@ -62,8 +62,17 @@ public DunningStepData( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param dayThreshold int value for dayThreshold. + * @param action String value for action. + * @param sendEmail boolean value for sendEmail. + * @param sendBccEmail boolean value for sendBccEmail. + * @param sendSms boolean value for sendSms. + * @param emailBody String value for emailBody. + * @param emailSubject String value for emailSubject. + * @param smsBody String value for smsBody. */ + protected DunningStepData(int dayThreshold, String action, boolean sendEmail, boolean sendBccEmail, boolean sendSms, OptionalNullable emailBody, OptionalNullable emailSubject, OptionalNullable smsBody) { diff --git a/src/main/java/com/maxio/advancedbilling/models/GetOneTimeTokenPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/GetOneTimeTokenPaymentProfile.java index 3de62ed8..6f0732f9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/GetOneTimeTokenPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/GetOneTimeTokenPaymentProfile.java @@ -114,8 +114,30 @@ public GetOneTimeTokenPaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param maskedCardNumber String value for maskedCardNumber. + * @param cardType String value for cardType. + * @param expirationMonth double value for expirationMonth. + * @param expirationYear double value for expirationYear. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingCountry String value for billingCountry. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param paymentType String value for paymentType. + * @param disabled boolean value for disabled. + * @param siteGatewaySettingId int value for siteGatewaySettingId. + * @param id String value for id. + * @param customerId String value for customerId. + * @param billingAddress2 String value for billingAddress2. + * @param customerVaultToken String value for customerVaultToken. + * @param gatewayHandle String value for gatewayHandle. */ + protected GetOneTimeTokenPaymentProfile(String firstName, String lastName, String maskedCardNumber, String cardType, double expirationMonth, double expirationYear, CurrentVault currentVault, String vaultToken, String billingAddress, String billingCity, diff --git a/src/main/java/com/maxio/advancedbilling/models/Invoice.java b/src/main/java/com/maxio/advancedbilling/models/Invoice.java index d3074c64..109bbc2f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Invoice.java +++ b/src/main/java/com/maxio/advancedbilling/models/Invoice.java @@ -242,8 +242,61 @@ public Invoice( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param uid String value for uid. + * @param siteId Integer value for siteId. + * @param customerId Integer value for customerId. + * @param subscriptionId Integer value for subscriptionId. + * @param number String value for number. + * @param sequenceNumber Integer value for sequenceNumber. + * @param transactionTime LocalDateTime value for transactionTime. + * @param createdAt LocalDateTime value for createdAt. + * @param updatedAt LocalDateTime value for updatedAt. + * @param issueDate String value for issueDate. + * @param dueDate String value for dueDate. + * @param paidDate String value for paidDate. + * @param status Status value for status. + * @param role String value for role. + * @param parentInvoiceId Integer value for parentInvoiceId. + * @param collectionMethod String value for collectionMethod. + * @param paymentInstructions String value for paymentInstructions. + * @param currency String value for currency. + * @param consolidationLevel InvoiceConsolidationLevel value for consolidationLevel. + * @param parentInvoiceUid String value for parentInvoiceUid. + * @param subscriptionGroupId Integer value for subscriptionGroupId. + * @param parentInvoiceNumber Integer value for parentInvoiceNumber. + * @param groupPrimarySubscriptionId Integer value for groupPrimarySubscriptionId. + * @param productName String value for productName. + * @param productFamilyName String value for productFamilyName. + * @param seller InvoiceSeller value for seller. + * @param customer InvoiceCustomer value for customer. + * @param payer InvoicePayer value for payer. + * @param recipientEmails List of String value for recipientEmails. + * @param netTerms Integer value for netTerms. + * @param memo String value for memo. + * @param billingAddress InvoiceAddress value for billingAddress. + * @param shippingAddress InvoiceAddress value for shippingAddress. + * @param subtotalAmount String value for subtotalAmount. + * @param discountAmount String value for discountAmount. + * @param taxAmount String value for taxAmount. + * @param totalAmount String value for totalAmount. + * @param creditAmount String value for creditAmount. + * @param refundAmount String value for refundAmount. + * @param paidAmount String value for paidAmount. + * @param dueAmount String value for dueAmount. + * @param lineItems List of InvoiceLineItem value for lineItems. + * @param discounts List of InvoiceDiscount value for discounts. + * @param taxes List of InvoiceTax value for taxes. + * @param credits List of InvoiceCredit value for credits. + * @param refunds List of InvoiceRefund value for refunds. + * @param payments List of InvoicePayment value for payments. + * @param customFields List of InvoiceCustomField value for customFields. + * @param displaySettings InvoiceDisplaySettings value for displaySettings. + * @param publicUrl String value for publicUrl. + * @param previousBalanceData InvoicePreviousBalance value for previousBalanceData. */ + protected Invoice(Integer id, String uid, Integer siteId, Integer customerId, Integer subscriptionId, String number, Integer sequenceNumber, LocalDateTime transactionTime, LocalDateTime createdAt, LocalDateTime updatedAt, diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceAddress.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceAddress.java index 01837222..d0cd6b52 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceAddress.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceAddress.java @@ -54,8 +54,15 @@ public InvoiceAddress( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param street String value for street. + * @param line2 String value for line2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. */ + protected InvoiceAddress(OptionalNullable street, OptionalNullable line2, OptionalNullable city, OptionalNullable state, OptionalNullable zip, OptionalNullable country) { diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceCustomer.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceCustomer.java index 979f9af6..fb60dbdd 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceCustomer.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceCustomer.java @@ -58,8 +58,16 @@ public InvoiceCustomer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param chargifyId Integer value for chargifyId. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param organization String value for organization. + * @param email String value for email. + * @param vatNumber String value for vatNumber. + * @param reference String value for reference. */ + protected InvoiceCustomer(Integer chargifyId, String firstName, String lastName, OptionalNullable organization, String email, OptionalNullable vatNumber, OptionalNullable reference) { diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscount.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscount.java index c8416be1..6b0bce87 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscount.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceDiscount.java @@ -79,8 +79,21 @@ public InvoiceDiscount( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param uid String value for uid. + * @param title String value for title. + * @param description String value for description. + * @param code String value for code. + * @param sourceType String value for sourceType. + * @param sourceId Integer value for sourceId. + * @param discountType String value for discountType. + * @param percentage String value for percentage. + * @param eligibleAmount String value for eligibleAmount. + * @param discountAmount String value for discountAmount. + * @param transactionId Integer value for transactionId. + * @param lineItemBreakouts List of InvoiceDiscountBreakout value for lineItemBreakouts. */ + protected InvoiceDiscount(String uid, String title, OptionalNullable description, String code, String sourceType, Integer sourceId, String discountType, String percentage, String eligibleAmount, String discountAmount, Integer transactionId, diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java index 72c18e6c..57f62379 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItem.java @@ -115,8 +115,30 @@ public InvoiceLineItem( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param uid String value for uid. + * @param title String value for title. + * @param description String value for description. + * @param quantity String value for quantity. + * @param unitPrice String value for unitPrice. + * @param subtotalAmount String value for subtotalAmount. + * @param discountAmount String value for discountAmount. + * @param taxAmount String value for taxAmount. + * @param totalAmount String value for totalAmount. + * @param tieredUnitPrice Boolean value for tieredUnitPrice. + * @param periodRangeStart String value for periodRangeStart. + * @param periodRangeEnd String value for periodRangeEnd. + * @param transactionId Integer value for transactionId. + * @param productId Integer value for productId. + * @param productVersion Integer value for productVersion. + * @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 productPricePointId Integer value for productPricePointId. + * @param customItem Boolean value for customItem. */ + protected InvoiceLineItem(String uid, String title, String description, String quantity, String unitPrice, String subtotalAmount, String discountAmount, String taxAmount, String totalAmount, Boolean tieredUnitPrice, String periodRangeStart, diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItemEventData.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItemEventData.java index bebcbe17..1d6cd380 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItemEventData.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceLineItemEventData.java @@ -111,8 +111,29 @@ public InvoiceLineItemEventData( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param uid String value for uid. + * @param title String value for title. + * @param description String value for description. + * @param quantity Integer value for quantity. + * @param quantityDelta Integer value for quantityDelta. + * @param unitPrice String value for unitPrice. + * @param periodRangeStart String value for periodRangeStart. + * @param periodRangeEnd String value for periodRangeEnd. + * @param amount String value for amount. + * @param lineReferences String value for lineReferences. + * @param pricingDetailsIndex Integer value for pricingDetailsIndex. + * @param pricingDetails List of InvoiceLineItemPricingDetail value for pricingDetails. + * @param taxCode String value for taxCode. + * @param taxAmount String value for taxAmount. + * @param productId Integer value for productId. + * @param productPricePointId Integer value for productPricePointId. + * @param pricePointId Integer value for pricePointId. + * @param componentId Integer value for componentId. + * @param billingScheduleItemId Integer value for billingScheduleItemId. + * @param customItem Boolean value for customItem. */ + protected InvoiceLineItemEventData(String uid, String title, String description, Integer quantity, OptionalNullable quantityDelta, String unitPrice, String periodRangeStart, String periodRangeEnd, String amount, String lineReferences, diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoicePayer.java b/src/main/java/com/maxio/advancedbilling/models/InvoicePayer.java index 25b84aa4..a0b3b964 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoicePayer.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoicePayer.java @@ -54,8 +54,15 @@ public InvoicePayer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param chargifyId Integer value for chargifyId. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param organization String value for organization. + * @param email String value for email. + * @param vatNumber String value for vatNumber. */ + protected InvoicePayer(Integer chargifyId, String firstName, String lastName, OptionalNullable organization, String email, OptionalNullable vatNumber) { diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoicePayment.java b/src/main/java/com/maxio/advancedbilling/models/InvoicePayment.java index a2e4242b..c9460379 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoicePayment.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoicePayment.java @@ -70,8 +70,19 @@ public InvoicePayment( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param transactionTime String value for transactionTime. + * @param memo String value for memo. + * @param originalAmount String value for originalAmount. + * @param appliedAmount String value for appliedAmount. + * @param paymentMethod InvoicePaymentMethod value for paymentMethod. + * @param transactionId Integer value for transactionId. + * @param prepayment Boolean value for prepayment. + * @param gatewayHandle String value for gatewayHandle. + * @param gatewayUsed String value for gatewayUsed. + * @param gatewayTransactionId String value for gatewayTransactionId. */ + protected InvoicePayment(String transactionTime, String memo, String originalAmount, String appliedAmount, InvoicePaymentMethod paymentMethod, Integer transactionId, Boolean prepayment, OptionalNullable gatewayHandle, String gatewayUsed, diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethod.java b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethod.java index c7498e13..319ba38b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethod.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoicePaymentMethod.java @@ -62,8 +62,17 @@ public InvoicePaymentMethod( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param details String value for details. + * @param kind String value for kind. + * @param memo String value for memo. + * @param type String value for type. + * @param cardBrand String value for cardBrand. + * @param cardExpiration String value for cardExpiration. + * @param lastFour String value for lastFour. + * @param maskedCardNumber String value for maskedCardNumber. */ + protected InvoicePaymentMethod(String details, String kind, String memo, String type, String cardBrand, String cardExpiration, OptionalNullable lastFour, String maskedCardNumber) { diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceRefund.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceRefund.java index 3e2be0f5..ca6f06a0 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceRefund.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceRefund.java @@ -54,8 +54,15 @@ public InvoiceRefund( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param transactionId Integer value for transactionId. + * @param paymentId Integer value for paymentId. + * @param memo String value for memo. + * @param originalAmount String value for originalAmount. + * @param appliedAmount String value for appliedAmount. + * @param gatewayTransactionId String value for gatewayTransactionId. */ + protected InvoiceRefund(Integer transactionId, Integer paymentId, String memo, String originalAmount, String appliedAmount, OptionalNullable gatewayTransactionId) { diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceSeller.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceSeller.java index 01cf7cdd..c4971aff 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceSeller.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceSeller.java @@ -46,8 +46,13 @@ public InvoiceSeller( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param name String value for name. + * @param address InvoiceAddress value for address. + * @param phone String value for phone. + * @param logoUrl String value for logoUrl. */ + protected InvoiceSeller(String name, InvoiceAddress address, String phone, OptionalNullable logoUrl) { this.name = name; diff --git a/src/main/java/com/maxio/advancedbilling/models/InvoiceTax.java b/src/main/java/com/maxio/advancedbilling/models/InvoiceTax.java index 1f75163e..97c1d0d4 100644 --- a/src/main/java/com/maxio/advancedbilling/models/InvoiceTax.java +++ b/src/main/java/com/maxio/advancedbilling/models/InvoiceTax.java @@ -76,8 +76,21 @@ public InvoiceTax( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param uid String value for uid. + * @param title String value for title. + * @param description String value for description. + * @param sourceType String value for sourceType. + * @param sourceId Integer value for sourceId. + * @param percentage String value for percentage. + * @param taxableAmount String value for taxableAmount. + * @param taxAmount String value for taxAmount. + * @param transactionId Integer value for transactionId. + * @param lineItemBreakouts List of InvoiceTaxBreakout value for lineItemBreakouts. + * @param taxComponentBreakouts List of InvoiceTaxComponentBreakout value for + * taxComponentBreakouts. */ + protected InvoiceTax(String uid, String title, OptionalNullable description, String sourceType, Integer sourceId, String percentage, String taxableAmount, String taxAmount, Integer transactionId, List lineItemBreakouts, diff --git a/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java new file mode 100644 index 00000000..de8c9f2d --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListAllComponentPricePointsInput.java @@ -0,0 +1,557 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListAllComponentPricePointsInputDirection; +import java.util.List; + +/** + * This is a model class for ListAllComponentPricePointsInput type. + */ +public class ListAllComponentPricePointsInput { + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private ListComponentsPricePointsInclude include; + private Integer page; + private Integer perPage; + private String filterStartDate; + private String filterStartDatetime; + private PricePointType filterType; + private ListAllComponentPricePointsInputDirection direction; + private List filterIds; + private IncludeNotNull filterArchivedAt; + + /** + * Default constructor. + */ + public ListAllComponentPricePointsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param filterDateField BasicDateField value for filterDateField. + * @param filterEndDate String value for filterEndDate. + * @param filterEndDatetime String value for filterEndDatetime. + * @param include ListComponentsPricePointsInclude value for include. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param filterStartDate String value for filterStartDate. + * @param filterStartDatetime String value for filterStartDatetime. + * @param filterType PricePointType value for filterType. + * @param direction ListAllComponentPricePointsInputDirection value for direction. + * @param filterIds List of Integer value for filterIds. + * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. + */ + public ListAllComponentPricePointsInput( + BasicDateField filterDateField, + String filterEndDate, + String filterEndDatetime, + ListComponentsPricePointsInclude include, + Integer page, + Integer perPage, + String filterStartDate, + String filterStartDatetime, + PricePointType filterType, + ListAllComponentPricePointsInputDirection direction, + List filterIds, + IncludeNotNull filterArchivedAt) { + this.filterDateField = filterDateField; + this.filterEndDate = filterEndDate; + this.filterEndDatetime = filterEndDatetime; + 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String 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 String + */ + @JsonGetter("filter[end_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_datetime]") + public void setFilterEndDatetime(String filterEndDatetime) { + this.filterEndDatetime = filterEndDatetime; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query: `include=currency_prices`. + * @return Returns the ListComponentsPricePointsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListComponentsPricePointsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query: `include=currency_prices`. + * @param include Value for ListComponentsPricePointsInclude + */ + @JsonSetter("include") + public void setInclude(ListComponentsPricePointsInclude include) { + this.include = include; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + 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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String 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 String + */ + @JsonGetter("filter[start_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_datetime]") + public void setFilterStartDatetime(String filterStartDatetime) { + this.filterStartDatetime = filterStartDatetime; + } + + /** + * Getter for FilterType. + * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. + * @return Returns the PricePointType + */ + @JsonGetter("filter[type]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PricePointType getFilterType() { + return filterType; + } + + /** + * Setter for FilterType. + * Allows fetching price points with matching type. Use in query: `filter[type]=custom,catalog`. + * @param filterType Value for PricePointType + */ + @JsonSetter("filter[type]") + public void setFilterType(PricePointType filterType) { + this.filterType = filterType; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListAllComponentPricePointsInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListAllComponentPricePointsInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListAllComponentPricePointsInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListAllComponentPricePointsInputDirection direction) { + this.direction = 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 + */ + @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 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; + } + + /** + * Converts this ListAllComponentPricePointsInput into string format. + * @return String representation of this class + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListAllComponentPricePointsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListAllComponentPricePointsInput.Builder} object + */ + 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()); + return builder; + } + + /** + * Class to build instances of {@link ListAllComponentPricePointsInput}. + */ + public static class Builder { + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private ListComponentsPricePointsInclude include; + private Integer page = 1; + private Integer perPage = 20; + private String filterStartDate; + private String filterStartDatetime; + private PricePointType filterType; + private ListAllComponentPricePointsInputDirection 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; + } + + /** + * Setter for filterEndDate. + * @param filterEndDate String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Setter for filterEndDatetime. + * @param filterEndDatetime String value for filterEndDatetime. + * @return Builder + */ + public Builder filterEndDatetime(String filterEndDatetime) { + this.filterEndDatetime = filterEndDatetime; + return this; + } + + /** + * Setter for include. + * @param include ListComponentsPricePointsInclude value for include. + * @return Builder + */ + public Builder include(ListComponentsPricePointsInclude include) { + this.include = include; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for filterStartDate. + * @param filterStartDate String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for filterStartDatetime. + * @param filterStartDatetime String value for filterStartDatetime. + * @return Builder + */ + public Builder filterStartDatetime(String filterStartDatetime) { + this.filterStartDatetime = filterStartDatetime; + return this; + } + + /** + * Setter for filterType. + * @param filterType PricePointType value for filterType. + * @return Builder + */ + public Builder filterType(PricePointType filterType) { + this.filterType = filterType; + return this; + } + + /** + * Setter for direction. + * @param direction ListAllComponentPricePointsInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListAllComponentPricePointsInputDirection direction) { + this.direction = direction; + 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 filterArchivedAt. + * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. + * @return Builder + */ + public Builder filterArchivedAt(IncludeNotNull filterArchivedAt) { + this.filterArchivedAt = filterArchivedAt; + return this; + } + + /** + * Builds a new {@link ListAllComponentPricePointsInput} object using the set fields. + * @return {@link ListAllComponentPricePointsInput} + */ + public ListAllComponentPricePointsInput build() { + return new ListAllComponentPricePointsInput(filterDateField, filterEndDate, + filterEndDatetime, include, page, perPage, filterStartDate, filterStartDatetime, + filterType, direction, filterIds, filterArchivedAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java new file mode 100644 index 00000000..6544494e --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListAllProductPricePointsInput.java @@ -0,0 +1,557 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListAllProductPricePointsInputDirection; +import java.util.List; + +/** + * This is a model class for ListAllProductPricePointsInput type. + */ +public class ListAllProductPricePointsInput { + private ListAllProductPricePointsInputDirection direction; + private IncludeNotNull filterArchivedAt; + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private List filterIds; + private String filterStartDate; + private String filterStartDatetime; + private PricePointType filterType; + private ListProductsPricePointsInclude include; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListAllProductPricePointsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param direction ListAllProductPricePointsInputDirection value for direction. + * @param filterArchivedAt IncludeNotNull value for filterArchivedAt. + * @param filterDateField BasicDateField value for filterDateField. + * @param filterEndDate String value for filterEndDate. + * @param filterEndDatetime String value for filterEndDatetime. + * @param filterIds List of Integer value for filterIds. + * @param filterStartDate String value for filterStartDate. + * @param filterStartDatetime String value for filterStartDatetime. + * @param filterType PricePointType value for filterType. + * @param include ListProductsPricePointsInclude value for include. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListAllProductPricePointsInput( + ListAllProductPricePointsInputDirection direction, + IncludeNotNull filterArchivedAt, + BasicDateField filterDateField, + String filterEndDate, + String filterEndDatetime, + List filterIds, + String filterStartDate, + String filterStartDatetime, + PricePointType filterType, + 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.include = include; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListAllProductPricePointsInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListAllProductPricePointsInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListAllProductPricePointsInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListAllProductPricePointsInputDirection direction) { + this.direction = 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 + */ + @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; + } + + /** + * 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String 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 String + */ + @JsonGetter("filter[end_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_datetime]") + public void setFilterEndDatetime(String 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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String 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 String + */ + @JsonGetter("filter[start_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_datetime]") + public void setFilterStartDatetime(String filterStartDatetime) { + this.filterStartDatetime = filterStartDatetime; + } + + /** + * Getter for FilterType. + * Allows fetching price points with matching type. Use in query: `filter[type]=catalog,custom`. + * @return Returns the PricePointType + */ + @JsonGetter("filter[type]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PricePointType getFilterType() { + return filterType; + } + + /** + * Setter for FilterType. + * Allows fetching price points with matching type. Use in query: `filter[type]=catalog,custom`. + * @param filterType Value for PricePointType + */ + @JsonSetter("filter[type]") + public void setFilterType(PricePointType filterType) { + this.filterType = filterType; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query: `include=currency_prices`. + * @return Returns the ListProductsPricePointsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListProductsPricePointsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query: `include=currency_prices`. + * @param include Value for ListProductsPricePointsInclude + */ + @JsonSetter("include") + public void setInclude(ListProductsPricePointsInclude include) { + this.include = include; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListAllProductPricePointsInput into string format. + * @return String representation of this class + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListAllProductPricePointsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListAllProductPricePointsInput.Builder} object + */ + 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()) + .include(getInclude()) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListAllProductPricePointsInput}. + */ + public static class Builder { + private ListAllProductPricePointsInputDirection direction; + private IncludeNotNull filterArchivedAt; + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private List filterIds; + private String filterStartDate; + private String filterStartDatetime; + private PricePointType filterType; + private ListProductsPricePointsInclude include; + private Integer page = 1; + private Integer perPage = 20; + + + + /** + * Setter for direction. + * @param direction ListAllProductPricePointsInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListAllProductPricePointsInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * 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 String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Setter for filterEndDatetime. + * @param filterEndDatetime String value for filterEndDatetime. + * @return Builder + */ + public Builder filterEndDatetime(String 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 String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for filterStartDatetime. + * @param filterStartDatetime String value for filterStartDatetime. + * @return Builder + */ + public Builder filterStartDatetime(String filterStartDatetime) { + this.filterStartDatetime = filterStartDatetime; + return this; + } + + /** + * Setter for filterType. + * @param filterType PricePointType value for filterType. + * @return Builder + */ + public Builder filterType(PricePointType filterType) { + this.filterType = filterType; + return this; + } + + /** + * Setter for include. + * @param include ListProductsPricePointsInclude value for include. + * @return Builder + */ + public Builder include(ListProductsPricePointsInclude include) { + this.include = include; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListAllProductPricePointsInput} object using the set fields. + * @return {@link ListAllProductPricePointsInput} + */ + public ListAllProductPricePointsInput build() { + return new ListAllProductPricePointsInput(direction, filterArchivedAt, filterDateField, + filterEndDate, filterEndDatetime, filterIds, filterStartDate, + filterStartDatetime, filterType, include, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListChargifyJsPublicKeysInput.java b/src/main/java/com/maxio/advancedbilling/models/ListChargifyJsPublicKeysInput.java new file mode 100644 index 00000000..93c9f7b7 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListChargifyJsPublicKeysInput.java @@ -0,0 +1,152 @@ +/* + * 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; + +/** + * This is a model class for ListChargifyJsPublicKeysInput type. + */ +public class ListChargifyJsPublicKeysInput { + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListChargifyJsPublicKeysInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListChargifyJsPublicKeysInput( + Integer page, + Integer perPage) { + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListChargifyJsPublicKeysInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListChargifyJsPublicKeysInput [" + "page=" + page + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ListChargifyJsPublicKeysInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListChargifyJsPublicKeysInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListChargifyJsPublicKeysInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListChargifyJsPublicKeysInput} object using the set fields. + * @return {@link ListChargifyJsPublicKeysInput} + */ + public ListChargifyJsPublicKeysInput build() { + return new ListChargifyJsPublicKeysInput(page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentPricePointsInput.java new file mode 100644 index 00000000..c3d8e86a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentPricePointsInput.java @@ -0,0 +1,277 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListComponentPricePointsInput type. + */ +public class ListComponentPricePointsInput { + private int componentId; + private Boolean currencyPrices; + private Integer page; + private Integer perPage; + private List filterType; + + /** + * Default constructor. + */ + public ListComponentPricePointsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param componentId int value for componentId. + * @param currencyPrices Boolean value for currencyPrices. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param filterType List of PricePointType value for filterType. + */ + public ListComponentPricePointsInput( + int componentId, + Boolean currencyPrices, + Integer page, + Integer perPage, + List filterType) { + this.componentId = componentId; + this.currencyPrices = currencyPrices; + this.page = page; + this.perPage = perPage; + this.filterType = filterType; + } + + /** + * Getter for ComponentId. + * The Chargify id of the component + * @return Returns the int + */ + @JsonGetter("component_id") + public int getComponentId() { + return componentId; + } + + /** + * Setter for ComponentId. + * The Chargify id of the component + * @param componentId Value for int + */ + @JsonSetter("component_id") + public void setComponentId(int componentId) { + this.componentId = componentId; + } + + /** + * Getter for CurrencyPrices. + * Include an array of currency price data + * @return Returns the Boolean + */ + @JsonGetter("currency_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCurrencyPrices() { + return currencyPrices; + } + + /** + * Setter for CurrencyPrices. + * Include an array of currency price data + * @param currencyPrices Value for Boolean + */ + @JsonSetter("currency_prices") + public void setCurrencyPrices(Boolean currencyPrices) { + this.currencyPrices = currencyPrices; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for FilterType. + * Use in query: `filter[type]=catalog,default`. + * @return Returns the List of PricePointType + */ + @JsonGetter("filter[type]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilterType() { + return filterType; + } + + /** + * Setter for FilterType. + * Use in query: `filter[type]=catalog,default`. + * @param filterType Value for List of PricePointType + */ + @JsonSetter("filter[type]") + public void setFilterType(List filterType) { + this.filterType = filterType; + } + + /** + * Converts this ListComponentPricePointsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListComponentPricePointsInput [" + "componentId=" + componentId + + ", currencyPrices=" + currencyPrices + ", page=" + page + ", perPage=" + perPage + + ", filterType=" + filterType + "]"; + } + + /** + * Builds a new {@link ListComponentPricePointsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListComponentPricePointsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(componentId) + .currencyPrices(getCurrencyPrices()) + .page(getPage()) + .perPage(getPerPage()) + .filterType(getFilterType()); + return builder; + } + + /** + * Class to build instances of {@link ListComponentPricePointsInput}. + */ + public static class Builder { + private int componentId; + private Boolean currencyPrices; + private Integer page = 1; + private Integer perPage = 20; + private List filterType; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param componentId int value for componentId. + */ + public Builder(int componentId) { + this.componentId = componentId; + } + + /** + * Setter for componentId. + * @param componentId int value for componentId. + * @return Builder + */ + public Builder componentId(int componentId) { + this.componentId = componentId; + return this; + } + + /** + * Setter for currencyPrices. + * @param currencyPrices Boolean value for currencyPrices. + * @return Builder + */ + public Builder currencyPrices(Boolean currencyPrices) { + this.currencyPrices = currencyPrices; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + 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; + } + + /** + * Builds a new {@link ListComponentPricePointsInput} object using the set fields. + * @return {@link ListComponentPricePointsInput} + */ + public ListComponentPricePointsInput build() { + return new ListComponentPricePointsInput(componentId, currencyPrices, page, perPage, + filterType); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java new file mode 100644 index 00000000..d3f3db7a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsForProductFamilyInput.java @@ -0,0 +1,527 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListComponentsForProductFamilyInput type. + */ +public class ListComponentsForProductFamilyInput { + private int productFamilyId; + private Boolean includeArchived; + private List filterIds; + private Integer page; + private Integer perPage; + private BasicDateField dateField; + private String endDate; + private String endDatetime; + private String startDate; + private String startDatetime; + private Boolean filterUseSiteExchangeRate; + + /** + * Default constructor. + */ + public ListComponentsForProductFamilyInput() { + page = 1; + perPage = 20; + } + + /** + * 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 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, + BasicDateField dateField, + String endDate, + String endDatetime, + String startDate, + String startDatetime, + Boolean filterUseSiteExchangeRate) { + this.productFamilyId = productFamilyId; + this.includeArchived = includeArchived; + this.filterIds = filterIds; + this.page = page; + this.perPage = perPage; + this.dateField = dateField; + this.endDate = endDate; + this.endDatetime = endDatetime; + this.startDate = startDate; + this.startDatetime = startDatetime; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for ProductFamilyId. + * The Chargify id of the product family + * @return Returns the int + */ + @JsonGetter("product_family_id") + public int getProductFamilyId() { + return productFamilyId; + } + + /** + * Setter for ProductFamilyId. + * The Chargify id of the product family + * @param productFamilyId Value for int + */ + @JsonSetter("product_family_id") + public void setProductFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Getter for IncludeArchived. + * Include archived items. + * @return Returns the Boolean + */ + @JsonGetter("include_archived") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getIncludeArchived() { + return includeArchived; + } + + /** + * Setter for IncludeArchived. + * Include archived items. + * @param includeArchived Value for Boolean + */ + @JsonSetter("include_archived") + 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. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query + * `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 + * `date_field=created_at`. + * @param dateField Value for BasicDateField + */ + @JsonSetter("date_field") + public void setDateField(BasicDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for EndDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for StartDate. + * 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. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for StartDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("start_datetime") + 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 + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListComponentsForProductFamilyInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListComponentsForProductFamilyInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(productFamilyId) + .includeArchived(getIncludeArchived()) + .filterIds(getFilterIds()) + .page(getPage()) + .perPage(getPerPage()) + .dateField(getDateField()) + .endDate(getEndDate()) + .endDatetime(getEndDatetime()) + .startDate(getStartDate()) + .startDatetime(getStartDatetime()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListComponentsForProductFamilyInput}. + */ + public static class Builder { + private int productFamilyId; + private Boolean includeArchived; + private List filterIds; + private Integer page = 1; + private Integer perPage = 20; + private BasicDateField dateField; + private String endDate; + private String endDatetime; + private String startDate; + private String startDatetime; + private Boolean filterUseSiteExchangeRate; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param productFamilyId int value for productFamilyId. + */ + public Builder(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Setter for productFamilyId. + * @param productFamilyId int value for productFamilyId. + * @return Builder + */ + public Builder productFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + return this; + } + + /** + * Setter for includeArchived. + * @param includeArchived Boolean value for includeArchived. + * @return Builder + */ + public Builder includeArchived(Boolean includeArchived) { + this.includeArchived = 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. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for dateField. + * @param dateField BasicDateField value for dateField. + * @return Builder + */ + public Builder dateField(BasicDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java new file mode 100644 index 00000000..5a834aea --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListComponentsInput.java @@ -0,0 +1,477 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListComponentsInput type. + */ +public class ListComponentsInput { + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private Boolean includeArchived; + private Integer page; + private Integer perPage; + private List filterIds; + private Boolean filterUseSiteExchangeRate; + + /** + * Default constructor. + */ + public ListComponentsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param dateField BasicDateField value for dateField. + * @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 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. + */ + public ListComponentsInput( + BasicDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime, + Boolean includeArchived, + Integer page, + Integer perPage, + List filterIds, + Boolean filterUseSiteExchangeRate) { + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.includeArchived = includeArchived; + this.page = page; + this.perPage = perPage; + this.filterIds = filterIds; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. + * @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. + * @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 components + * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 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 String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 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 + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for IncludeArchived. + * Include archived items + * @return Returns the Boolean + */ + @JsonGetter("include_archived") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getIncludeArchived() { + return includeArchived; + } + + /** + * Setter for IncludeArchived. + * Include archived items + * @param includeArchived Value for Boolean + */ + @JsonSetter("include_archived") + public void setIncludeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = 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 + */ + @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,3`. + * @param filterIds Value for List of String + */ + @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; + } + + /** + * Converts this ListComponentsInput into string format. + * @return String representation of this class + */ + @Override + 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 + "]"; + } + + /** + * Builds a new {@link ListComponentsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListComponentsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .includeArchived(getIncludeArchived()) + .page(getPage()) + .perPage(getPerPage()) + .filterIds(getFilterIds()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListComponentsInput}. + */ + public static class Builder { + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private Boolean includeArchived; + private Integer page = 1; + private Integer perPage = 20; + private List filterIds; + private Boolean filterUseSiteExchangeRate; + + + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for includeArchived. + * @param includeArchived Boolean value for includeArchived. + * @return Builder + */ + public Builder includeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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. + * @return Builder + */ + public Builder filterUseSiteExchangeRate(Boolean filterUseSiteExchangeRate) { + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + return this; + } + + /** + * Builds a new {@link ListComponentsInput} object using the set fields. + * @return {@link ListComponentsInput} + */ + public ListComponentsInput build() { + return new ListComponentsInput(dateField, startDate, endDate, startDatetime, + endDatetime, includeArchived, page, perPage, filterIds, + filterUseSiteExchangeRate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponSubcodesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponSubcodesInput.java new file mode 100644 index 00000000..68cf1c03 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponSubcodesInput.java @@ -0,0 +1,200 @@ +/* + * 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; + +/** + * This is a model class for ListCouponSubcodesInput type. + */ +public class ListCouponSubcodesInput { + private int couponId; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListCouponSubcodesInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param couponId int value for couponId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListCouponSubcodesInput( + int couponId, + Integer page, + Integer perPage) { + this.couponId = couponId; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for CouponId. + * The Chargify id of the coupon + * @return Returns the int + */ + @JsonGetter("coupon_id") + public int getCouponId() { + return couponId; + } + + /** + * Setter for CouponId. + * The Chargify id of the coupon + * @param couponId Value for int + */ + @JsonSetter("coupon_id") + public void setCouponId(int couponId) { + this.couponId = couponId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListCouponSubcodesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListCouponSubcodesInput [" + "couponId=" + couponId + ", page=" + page + + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ListCouponSubcodesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCouponSubcodesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(couponId) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListCouponSubcodesInput}. + */ + public static class Builder { + private int couponId; + private Integer page = 1; + private Integer perPage = 20; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param couponId int value for couponId. + */ + public Builder(int couponId) { + this.couponId = couponId; + } + + /** + * Setter for couponId. + * @param couponId int value for couponId. + * @return Builder + */ + public Builder couponId(int couponId) { + this.couponId = couponId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListCouponSubcodesInput} object using the set fields. + * @return {@link ListCouponSubcodesInput} + */ + public ListCouponSubcodesInput build() { + return new ListCouponSubcodesInput(couponId, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java new file mode 100644 index 00000000..30754b39 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsForProductFamilyInput.java @@ -0,0 +1,578 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListCouponsForProductFamilyInput type. + */ +public class ListCouponsForProductFamilyInput { + private int productFamilyId; + private Integer page; + private Integer perPage; + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private String filterStartDate; + private String filterStartDatetime; + private List filterIds; + private List filterCodes; + private Boolean currencyPrices; + private Boolean filterUseSiteExchangeRate; + + /** + * Default constructor. + */ + public ListCouponsForProductFamilyInput() { + page = 1; + perPage = 30; + } + + /** + * Initialization constructor. + * @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 String value for filterEndDate. + * @param filterEndDatetime String value for filterEndDatetime. + * @param filterStartDate String value for filterStartDate. + * @param filterStartDatetime String value for filterStartDatetime. + * @param filterIds List of Integer value for filterIds. + * @param filterCodes List of String value for filterCodes. + * @param currencyPrices Boolean value for currencyPrices. + * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. + */ + public ListCouponsForProductFamilyInput( + int productFamilyId, + Integer page, + Integer perPage, + BasicDateField filterDateField, + String filterEndDate, + String filterEndDatetime, + String filterStartDate, + String filterStartDatetime, + List filterIds, + List filterCodes, + Boolean currencyPrices, + Boolean filterUseSiteExchangeRate) { + 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.currencyPrices = currencyPrices; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for ProductFamilyId. + * The Chargify id of the product family to which the coupon belongs + * @return Returns the int + */ + @JsonGetter("product_family_id") + public int getProductFamilyId() { + return productFamilyId; + } + + /** + * Setter for ProductFamilyId. + * The Chargify id of the product family to which the coupon belongs + * @param productFamilyId Value for int + */ + @JsonSetter("product_family_id") + public void setProductFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = 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 + */ + @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 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String 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 String + */ + @JsonGetter("filter[end_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_datetime]") + public void setFilterEndDatetime(String 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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String 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 String + */ + @JsonGetter("filter[start_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_datetime]") + public void setFilterStartDatetime(String 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; + } + + /** + * Getter for CurrencyPrices. + * 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`. + * @return Returns the Boolean + */ + @JsonGetter("currency_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCurrencyPrices() { + return currencyPrices; + } + + /** + * Setter for CurrencyPrices. + * 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`. + * @param currencyPrices Value for Boolean + */ + @JsonSetter("currency_prices") + 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 + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListCouponsForProductFamilyInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCouponsForProductFamilyInput.Builder} object + */ + 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()); + return builder; + } + + /** + * Class to build instances of {@link ListCouponsForProductFamilyInput}. + */ + public static class Builder { + private int productFamilyId; + private Integer page = 1; + private Integer perPage = 30; + private BasicDateField filterDateField; + private String filterEndDate; + private String filterEndDatetime; + private String filterStartDate; + private String filterStartDatetime; + private List filterIds; + private List filterCodes; + private Boolean currencyPrices; + private Boolean filterUseSiteExchangeRate; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param productFamilyId int value for productFamilyId. + */ + public Builder(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Setter for productFamilyId. + * @param productFamilyId int value for productFamilyId. + * @return Builder + */ + public Builder productFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + 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 String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Setter for filterEndDatetime. + * @param filterEndDatetime String value for filterEndDatetime. + * @return Builder + */ + public Builder filterEndDatetime(String filterEndDatetime) { + this.filterEndDatetime = filterEndDatetime; + return this; + } + + /** + * Setter for filterStartDate. + * @param filterStartDate String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for filterStartDatetime. + * @param filterStartDatetime String value for filterStartDatetime. + * @return Builder + */ + public Builder filterStartDatetime(String 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; + return this; + } + + /** + * Setter for currencyPrices. + * @param currencyPrices Boolean value for currencyPrices. + * @return Builder + */ + public Builder currencyPrices(Boolean currencyPrices) { + this.currencyPrices = 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java new file mode 100644 index 00000000..60cfa048 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCouponsInput.java @@ -0,0 +1,748 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListCouponsInput type. + */ +public class ListCouponsInput { + private Integer page; + private Integer perPage; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private List filterIds; + private List filterCodes; + private Boolean currencyPrices; + private String filterEndDate; + private String filterEndDatetime; + private String filterStartDate; + private String filterStartDatetime; + private BasicDateField filterDateField; + private Boolean filterUseSiteExchangeRate; + + /** + * Default constructor. + */ + public ListCouponsInput() { + page = 1; + perPage = 30; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param dateField BasicDateField value for dateField. + * @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 filterIds List of Integer value for filterIds. + * @param filterCodes List of String value for filterCodes. + * @param currencyPrices Boolean value for currencyPrices. + * @param filterEndDate String value for filterEndDate. + * @param filterEndDatetime String value for filterEndDatetime. + * @param filterStartDate String value for filterStartDate. + * @param filterStartDatetime String value for filterStartDatetime. + * @param filterDateField BasicDateField value for filterDateField. + * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. + */ + public ListCouponsInput( + Integer page, + Integer perPage, + BasicDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime, + List filterIds, + List filterCodes, + Boolean currencyPrices, + String filterEndDate, + String filterEndDatetime, + String filterStartDate, + String filterStartDatetime, + BasicDateField filterDateField, + Boolean filterUseSiteExchangeRate) { + 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.currencyPrices = currencyPrices; + this.filterEndDate = filterEndDate; + this.filterEndDatetime = filterEndDatetime; + this.filterStartDate = filterStartDate; + this.filterStartDatetime = filterStartDatetime; + this.filterDateField = filterDateField; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = 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 + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public BasicDateField getDateField() { + return dateField; + } + + /** + * 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 + */ + @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 String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("start_date") + public void setStartDate(String 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 String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String 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; + } + + /** + * Getter for CurrencyPrices. + * 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`. + * @return Returns the Boolean + */ + @JsonGetter("currency_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCurrencyPrices() { + return currencyPrices; + } + + /** + * Setter for CurrencyPrices. + * 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`. + * @param currencyPrices Value for Boolean + */ + @JsonSetter("currency_prices") + 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String 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 String + */ + @JsonGetter("filter[end_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_datetime]") + public void setFilterEndDatetime(String 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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String 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 String + */ + @JsonGetter("filter[start_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_datetime]") + public void setFilterStartDatetime(String 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 + + "]"; + } + + /** + * Builds a new {@link ListCouponsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCouponsInput.Builder} object + */ + 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()); + return builder; + } + + /** + * Class to build instances of {@link ListCouponsInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 30; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private List filterIds; + private List filterCodes; + private Boolean currencyPrices; + private String filterEndDate; + private String filterEndDatetime; + private String filterStartDate; + private String filterStartDatetime; + private BasicDateField filterDateField; + private Boolean filterUseSiteExchangeRate; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String 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. + * @return Builder + */ + public Builder filterCodes(List filterCodes) { + this.filterCodes = filterCodes; + return this; + } + + /** + * Setter for currencyPrices. + * @param currencyPrices Boolean value for currencyPrices. + * @return Builder + */ + public Builder currencyPrices(Boolean currencyPrices) { + this.currencyPrices = currencyPrices; + return this; + } + + /** + * Setter for filterEndDate. + * @param filterEndDate String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Setter for filterEndDatetime. + * @param filterEndDatetime String value for filterEndDatetime. + * @return Builder + */ + public Builder filterEndDatetime(String filterEndDatetime) { + this.filterEndDatetime = filterEndDatetime; + return this; + } + + /** + * Setter for filterStartDate. + * @param filterStartDate String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for filterStartDatetime. + * @param filterStartDatetime String value for filterStartDatetime. + * @return Builder + */ + public Builder filterStartDatetime(String 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCreditNotesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCreditNotesInput.java new file mode 100644 index 00000000..2c37cedf --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCreditNotesInput.java @@ -0,0 +1,383 @@ +/* + * 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; + +/** + * This is a model class for ListCreditNotesInput type. + */ +public class ListCreditNotesInput { + private Integer subscriptionId; + private Integer page; + private Integer perPage; + private Boolean lineItems; + private Boolean discounts; + private Boolean taxes; + private Boolean refunds; + private Boolean applications; + + /** + * Default constructor. + */ + public ListCreditNotesInput() { + page = 1; + perPage = 20; + lineItems = false; + discounts = false; + taxes = false; + refunds = false; + applications = false; + } + + /** + * Initialization constructor. + * @param subscriptionId Integer value for subscriptionId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param lineItems Boolean value for lineItems. + * @param discounts Boolean value for discounts. + * @param taxes Boolean value for taxes. + * @param refunds Boolean value for refunds. + * @param applications Boolean value for applications. + */ + public ListCreditNotesInput( + Integer subscriptionId, + Integer page, + Integer perPage, + Boolean lineItems, + Boolean discounts, + Boolean taxes, + Boolean refunds, + Boolean applications) { + this.subscriptionId = subscriptionId; + this.page = page; + this.perPage = perPage; + this.lineItems = lineItems; + this.discounts = discounts; + this.taxes = taxes; + this.refunds = refunds; + this.applications = applications; + } + + /** + * Getter for SubscriptionId. + * The subscription's Chargify id + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The subscription's Chargify id + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for LineItems. + * Include line items data + * @return Returns the Boolean + */ + @JsonGetter("line_items") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getLineItems() { + return lineItems; + } + + /** + * Setter for LineItems. + * Include line items data + * @param lineItems Value for Boolean + */ + @JsonSetter("line_items") + public void setLineItems(Boolean lineItems) { + this.lineItems = lineItems; + } + + /** + * Getter for Discounts. + * Include discounts data + * @return Returns the Boolean + */ + @JsonGetter("discounts") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDiscounts() { + return discounts; + } + + /** + * Setter for Discounts. + * Include discounts data + * @param discounts Value for Boolean + */ + @JsonSetter("discounts") + public void setDiscounts(Boolean discounts) { + this.discounts = discounts; + } + + /** + * Getter for Taxes. + * Include taxes data + * @return Returns the Boolean + */ + @JsonGetter("taxes") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxes() { + return taxes; + } + + /** + * Setter for Taxes. + * Include taxes data + * @param taxes Value for Boolean + */ + @JsonSetter("taxes") + public void setTaxes(Boolean taxes) { + this.taxes = taxes; + } + + /** + * Getter for Refunds. + * Include refunds data + * @return Returns the Boolean + */ + @JsonGetter("refunds") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getRefunds() { + return refunds; + } + + /** + * Setter for Refunds. + * Include refunds data + * @param refunds Value for Boolean + */ + @JsonSetter("refunds") + public void setRefunds(Boolean refunds) { + this.refunds = refunds; + } + + /** + * Getter for Applications. + * Include applications data + * @return Returns the Boolean + */ + @JsonGetter("applications") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getApplications() { + return applications; + } + + /** + * Setter for Applications. + * Include applications data + * @param applications Value for Boolean + */ + @JsonSetter("applications") + public void setApplications(Boolean applications) { + this.applications = applications; + } + + /** + * Converts this ListCreditNotesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListCreditNotesInput [" + "subscriptionId=" + subscriptionId + ", page=" + page + + ", perPage=" + perPage + ", lineItems=" + lineItems + ", discounts=" + discounts + + ", taxes=" + taxes + ", refunds=" + refunds + ", applications=" + applications + + "]"; + } + + /** + * Builds a new {@link ListCreditNotesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCreditNotesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .subscriptionId(getSubscriptionId()) + .page(getPage()) + .perPage(getPerPage()) + .lineItems(getLineItems()) + .discounts(getDiscounts()) + .taxes(getTaxes()) + .refunds(getRefunds()) + .applications(getApplications()); + return builder; + } + + /** + * Class to build instances of {@link ListCreditNotesInput}. + */ + public static class Builder { + private Integer subscriptionId; + private Integer page = 1; + private Integer perPage = 20; + private Boolean lineItems = false; + private Boolean discounts = false; + private Boolean taxes = false; + private Boolean refunds = false; + private Boolean applications = false; + + + + /** + * Setter for subscriptionId. + * @param subscriptionId Integer value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for lineItems. + * @param lineItems Boolean value for lineItems. + * @return Builder + */ + public Builder lineItems(Boolean lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * Setter for discounts. + * @param discounts Boolean value for discounts. + * @return Builder + */ + public Builder discounts(Boolean discounts) { + this.discounts = discounts; + return this; + } + + /** + * Setter for taxes. + * @param taxes Boolean value for taxes. + * @return Builder + */ + public Builder taxes(Boolean taxes) { + this.taxes = taxes; + return this; + } + + /** + * Setter for refunds. + * @param refunds Boolean value for refunds. + * @return Builder + */ + public Builder refunds(Boolean refunds) { + this.refunds = refunds; + return this; + } + + /** + * Setter for applications. + * @param applications Boolean value for applications. + * @return Builder + */ + public Builder applications(Boolean applications) { + this.applications = applications; + return this; + } + + /** + * Builds a new {@link ListCreditNotesInput} object using the set fields. + * @return {@link ListCreditNotesInput} + */ + public ListCreditNotesInput build() { + return new ListCreditNotesInput(subscriptionId, page, perPage, lineItems, discounts, + taxes, refunds, applications); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListCustomersInput.java b/src/main/java/com/maxio/advancedbilling/models/ListCustomersInput.java new file mode 100644 index 00000000..d80ef798 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListCustomersInput.java @@ -0,0 +1,440 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListCustomersInputDirection; + +/** + * This is a model class for ListCustomersInput type. + */ +public class ListCustomersInput { + private ListCustomersInputDirection direction; + private Integer page; + private Integer perPage; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private String q; + + /** + * Default constructor. + */ + public ListCustomersInput() { + page = 1; + perPage = 50; + } + + /** + * Initialization constructor. + * @param direction ListCustomersInputDirection value for direction. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param dateField BasicDateField value for dateField. + * @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 q String value for q. + */ + public ListCustomersInput( + ListCustomersInputDirection direction, + Integer page, + Integer perPage, + BasicDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime, + String q) { + this.direction = direction; + this.page = page; + this.perPage = perPage; + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.q = q; + } + + /** + * Getter for Direction. + * Direction to sort customers by time of creation + * @return Returns the ListCustomersInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListCustomersInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Direction to sort customers by time of creation + * @param direction Value for ListCustomersInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListCustomersInputDirection direction) { + this.direction = direction; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 50. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. Use in + * query `per_page=200`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 50. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. Use in + * query `per_page=200`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `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: + * `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 subscriptions + * with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions + * 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 String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions + * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions + * with a timestamp up to and including 11:59:59PM in your site’s time zone on the date + * specified. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 subscriptions 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 String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 subscriptions 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 subscriptions 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 String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 subscriptions 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 String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for Q. + * A search query by which to filter customers (can be an email, an ID, a reference, + * organization) + * @return Returns the String + */ + @JsonGetter("q") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getQ() { + return q; + } + + /** + * Setter for Q. + * A search query by which to filter customers (can be an email, an ID, a reference, + * organization) + * @param q Value for String + */ + @JsonSetter("q") + public void setQ(String q) { + this.q = q; + } + + /** + * Converts this ListCustomersInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListCustomersInput [" + "direction=" + direction + ", page=" + page + ", perPage=" + + perPage + ", dateField=" + dateField + ", startDate=" + startDate + ", endDate=" + + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + + ", q=" + q + "]"; + } + + /** + * Builds a new {@link ListCustomersInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListCustomersInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .direction(getDirection()) + .page(getPage()) + .perPage(getPerPage()) + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .q(getQ()); + return builder; + } + + /** + * Class to build instances of {@link ListCustomersInput}. + */ + public static class Builder { + private ListCustomersInputDirection direction; + private Integer page = 1; + private Integer perPage = 50; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private String q; + + + + /** + * Setter for direction. + * @param direction ListCustomersInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListCustomersInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for q. + * @param q String value for q. + * @return Builder + */ + public Builder q(String q) { + this.q = q; + return this; + } + + /** + * Builds a new {@link ListCustomersInput} object using the set fields. + * @return {@link ListCustomersInput} + */ + public ListCustomersInput build() { + return new ListCustomersInput(direction, page, perPage, dateField, startDate, endDate, + startDatetime, endDatetime, q); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListEventsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListEventsInput.java new file mode 100644 index 00000000..333e3a81 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListEventsInput.java @@ -0,0 +1,511 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListEventsInput type. + */ +public class ListEventsInput { + private Integer page; + private Integer perPage; + private Integer sinceId; + private Integer maxId; + private Direction direction; + private List filter; + private ListEventsDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + + /** + * Default constructor. + */ + public ListEventsInput() { + page = 1; + perPage = 20; + direction = Direction.DESC; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param sinceId Integer value for sinceId. + * @param maxId Integer value for maxId. + * @param direction Direction value for direction. + * @param filter List of EventType value for filter. + * @param dateField ListEventsDateField value for dateField. + * @param startDate String value for startDate. + * @param endDate String value for endDate. + * @param startDatetime String value for startDatetime. + * @param endDatetime String value for endDatetime. + */ + public ListEventsInput( + Integer page, + Integer perPage, + Integer sinceId, + Integer maxId, + Direction direction, + List filter, + ListEventsDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime) { + this.page = page; + this.perPage = perPage; + this.sinceId = sinceId; + this.maxId = maxId; + this.direction = direction; + this.filter = filter; + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("since_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSinceId() { + return sinceId; + } + + /** + * Setter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @param sinceId Value for Integer + */ + @JsonSetter("since_id") + public void setSinceId(Integer sinceId) { + this.sinceId = sinceId; + } + + /** + * Getter for MaxId. + * Returns events with an id less than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("max_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getMaxId() { + return maxId; + } + + /** + * Setter for MaxId. + * Returns events with an id less than or equal to the one specified + * @param maxId Value for Integer + */ + @JsonSetter("max_id") + public void setMaxId(Integer maxId) { + this.maxId = maxId; + } + + /** + * Getter for Direction. + * The sort direction of the returned events. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * The sort direction of the returned events. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Getter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @return Returns the List of EventType + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilter() { + return filter; + } + + /** + * Setter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @param filter Value for List of EventType + */ + @JsonSetter("filter") + public void setFilter(List filter) { + this.filter = filter; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. + * @return Returns the ListEventsDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListEventsDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you would like to apply to your search. + * @param dateField Value for ListEventsDateField + */ + @JsonSetter("date_field") + public void setDateField(ListEventsDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDate. + * 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. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 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 String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 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 String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Converts this ListEventsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListEventsInput [" + "page=" + page + ", perPage=" + perPage + ", sinceId=" + + sinceId + ", maxId=" + maxId + ", direction=" + direction + ", filter=" + filter + + ", dateField=" + dateField + ", startDate=" + startDate + ", endDate=" + endDate + + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + "]"; + } + + /** + * Builds a new {@link ListEventsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListEventsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()) + .sinceId(getSinceId()) + .maxId(getMaxId()) + .direction(getDirection()) + .filter(getFilter()) + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()); + return builder; + } + + /** + * Class to build instances of {@link ListEventsInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + private Integer sinceId; + private Integer maxId; + private Direction direction = Direction.DESC; + private List filter; + private ListEventsDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for sinceId. + * @param sinceId Integer value for sinceId. + * @return Builder + */ + public Builder sinceId(Integer sinceId) { + this.sinceId = sinceId; + return this; + } + + /** + * Setter for maxId. + * @param maxId Integer value for maxId. + * @return Builder + */ + public Builder maxId(Integer maxId) { + this.maxId = maxId; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Setter for filter. + * @param filter List of EventType value for filter. + * @return Builder + */ + public Builder filter(List filter) { + this.filter = filter; + return this; + } + + /** + * Setter for dateField. + * @param dateField ListEventsDateField value for dateField. + * @return Builder + */ + public Builder dateField(ListEventsDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Builds a new {@link ListEventsInput} object using the set fields. + * @return {@link ListEventsInput} + */ + public ListEventsInput build() { + return new ListEventsInput(page, perPage, sinceId, maxId, direction, filter, dateField, + startDate, endDate, startDatetime, endDatetime); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListExportedInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListExportedInvoicesInput.java new file mode 100644 index 00000000..39aa0289 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListExportedInvoicesInput.java @@ -0,0 +1,198 @@ +/* + * 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; + +/** + * This is a model class for ListExportedInvoicesInput type. + */ +public class ListExportedInvoicesInput { + private String batchId; + private Integer perPage; + private Integer page; + + /** + * Default constructor. + */ + public ListExportedInvoicesInput() { + perPage = 100; + page = 1; + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + * @param perPage Integer value for perPage. + * @param page Integer value for page. + */ + public ListExportedInvoicesInput( + String batchId, + Integer perPage, + Integer page) { + this.batchId = batchId; + this.perPage = perPage; + this.page = page; + } + + /** + * Getter for BatchId. + * Id of a Batch Job. + * @return Returns the String + */ + @JsonGetter("batch_id") + public String getBatchId() { + return batchId; + } + + /** + * Setter for BatchId. + * Id of a Batch Job. + * @param batchId Value for String + */ + @JsonSetter("batch_id") + public void setBatchId(String batchId) { + this.batchId = batchId; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Converts this ListExportedInvoicesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListExportedInvoicesInput [" + "batchId=" + batchId + ", perPage=" + perPage + + ", page=" + page + "]"; + } + + /** + * Builds a new {@link ListExportedInvoicesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListExportedInvoicesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(batchId) + .perPage(getPerPage()) + .page(getPage()); + return builder; + } + + /** + * Class to build instances of {@link ListExportedInvoicesInput}. + */ + public static class Builder { + private String batchId; + private Integer perPage = 100; + private Integer page = 1; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + */ + public Builder(String batchId) { + this.batchId = batchId; + } + + /** + * Setter for batchId. + * @param batchId String value for batchId. + * @return Builder + */ + public Builder batchId(String batchId) { + this.batchId = batchId; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Builds a new {@link ListExportedInvoicesInput} object using the set fields. + * @return {@link ListExportedInvoicesInput} + */ + public ListExportedInvoicesInput build() { + return new ListExportedInvoicesInput(batchId, perPage, page); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListExportedProformaInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListExportedProformaInvoicesInput.java new file mode 100644 index 00000000..defc6d47 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListExportedProformaInvoicesInput.java @@ -0,0 +1,198 @@ +/* + * 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; + +/** + * This is a model class for ListExportedProformaInvoicesInput type. + */ +public class ListExportedProformaInvoicesInput { + private String batchId; + private Integer perPage; + private Integer page; + + /** + * Default constructor. + */ + public ListExportedProformaInvoicesInput() { + perPage = 100; + page = 1; + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + * @param perPage Integer value for perPage. + * @param page Integer value for page. + */ + public ListExportedProformaInvoicesInput( + String batchId, + Integer perPage, + Integer page) { + this.batchId = batchId; + this.perPage = perPage; + this.page = page; + } + + /** + * Getter for BatchId. + * Id of a Batch Job. + * @return Returns the String + */ + @JsonGetter("batch_id") + public String getBatchId() { + return batchId; + } + + /** + * Setter for BatchId. + * Id of a Batch Job. + * @param batchId Value for String + */ + @JsonSetter("batch_id") + public void setBatchId(String batchId) { + this.batchId = batchId; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Converts this ListExportedProformaInvoicesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListExportedProformaInvoicesInput [" + "batchId=" + batchId + ", perPage=" + perPage + + ", page=" + page + "]"; + } + + /** + * Builds a new {@link ListExportedProformaInvoicesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListExportedProformaInvoicesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(batchId) + .perPage(getPerPage()) + .page(getPage()); + return builder; + } + + /** + * Class to build instances of {@link ListExportedProformaInvoicesInput}. + */ + public static class Builder { + private String batchId; + private Integer perPage = 100; + private Integer page = 1; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + */ + public Builder(String batchId) { + this.batchId = batchId; + } + + /** + * Setter for batchId. + * @param batchId String value for batchId. + * @return Builder + */ + public Builder batchId(String batchId) { + this.batchId = batchId; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Builds a new {@link ListExportedProformaInvoicesInput} object using the set fields. + * @return {@link ListExportedProformaInvoicesInput} + */ + public ListExportedProformaInvoicesInput build() { + return new ListExportedProformaInvoicesInput(batchId, perPage, page); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListExportedSubscriptionsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListExportedSubscriptionsInput.java new file mode 100644 index 00000000..fc56d9a7 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListExportedSubscriptionsInput.java @@ -0,0 +1,198 @@ +/* + * 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; + +/** + * This is a model class for ListExportedSubscriptionsInput type. + */ +public class ListExportedSubscriptionsInput { + private String batchId; + private Integer perPage; + private Integer page; + + /** + * Default constructor. + */ + public ListExportedSubscriptionsInput() { + perPage = 100; + page = 1; + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + * @param perPage Integer value for perPage. + * @param page Integer value for page. + */ + public ListExportedSubscriptionsInput( + String batchId, + Integer perPage, + Integer page) { + this.batchId = batchId; + this.perPage = perPage; + this.page = page; + } + + /** + * Getter for BatchId. + * Id of a Batch Job. + * @return Returns the String + */ + @JsonGetter("batch_id") + public String getBatchId() { + return batchId; + } + + /** + * Setter for BatchId. + * Id of a Batch Job. + * @param batchId Value for String + */ + @JsonSetter("batch_id") + public void setBatchId(String batchId) { + this.batchId = batchId; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 10000; any per_page value over 10000 will be changed to 10000. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Converts this ListExportedSubscriptionsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListExportedSubscriptionsInput [" + "batchId=" + batchId + ", perPage=" + perPage + + ", page=" + page + "]"; + } + + /** + * Builds a new {@link ListExportedSubscriptionsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListExportedSubscriptionsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(batchId) + .perPage(getPerPage()) + .page(getPage()); + return builder; + } + + /** + * Class to build instances of {@link ListExportedSubscriptionsInput}. + */ + public static class Builder { + private String batchId; + private Integer perPage = 100; + private Integer page = 1; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param batchId String value for batchId. + */ + public Builder(String batchId) { + this.batchId = batchId; + } + + /** + * Setter for batchId. + * @param batchId String value for batchId. + * @return Builder + */ + public Builder batchId(String batchId) { + this.batchId = batchId; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Builds a new {@link ListExportedSubscriptionsInput} object using the set fields. + * @return {@link ListExportedSubscriptionsInput} + */ + public ListExportedSubscriptionsInput build() { + return new ListExportedSubscriptionsInput(batchId, perPage, page); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListInvoiceEventsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListInvoiceEventsInput.java new file mode 100644 index 00000000..ccfac808 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListInvoiceEventsInput.java @@ -0,0 +1,352 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListInvoiceEventsInput type. + */ +public class ListInvoiceEventsInput { + private String sinceDate; + private Integer sinceId; + private Integer page; + private Integer perPage; + private String invoiceUid; + private String withChangeInvoiceStatus; + private List eventTypes; + + /** + * Default constructor. + */ + public ListInvoiceEventsInput() { + page = 1; + perPage = 100; + } + + /** + * Initialization constructor. + * @param sinceDate String value for sinceDate. + * @param sinceId Integer value for sinceId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param invoiceUid String value for invoiceUid. + * @param withChangeInvoiceStatus String value for withChangeInvoiceStatus. + * @param eventTypes List of InvoiceEventType value for eventTypes. + */ + public ListInvoiceEventsInput( + String sinceDate, + Integer sinceId, + Integer page, + Integer perPage, + String invoiceUid, + String withChangeInvoiceStatus, + List eventTypes) { + this.sinceDate = sinceDate; + this.sinceId = sinceId; + this.page = page; + this.perPage = perPage; + this.invoiceUid = invoiceUid; + this.withChangeInvoiceStatus = withChangeInvoiceStatus; + this.eventTypes = eventTypes; + } + + /** + * Getter for SinceDate. + * The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns + * data from the beginning of the day). of the event from which you want to start the search. + * All the events before the `since_date` timestamp are not returned in the response. + * @return Returns the String + */ + @JsonGetter("since_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSinceDate() { + return sinceDate; + } + + /** + * Setter for SinceDate. + * The timestamp in a format `YYYY-MM-DD T HH:MM:SS Z`, or `YYYY-MM-DD`(in this case, it returns + * data from the beginning of the day). of the event from which you want to start the search. + * All the events before the `since_date` timestamp are not returned in the response. + * @param sinceDate Value for String + */ + @JsonSetter("since_date") + public void setSinceDate(String sinceDate) { + this.sinceDate = sinceDate; + } + + /** + * Getter for SinceId. + * The ID of the event from which you want to start the search(ID is not included. e.g. if ID is + * set to 2, then all events with ID 3 and more will be shown) This parameter is not used if + * since_date is defined. + * @return Returns the Integer + */ + @JsonGetter("since_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSinceId() { + return sinceId; + } + + /** + * Setter for SinceId. + * The ID of the event from which you want to start the search(ID is not included. e.g. if ID is + * set to 2, then all events with ID 3 and more will be shown) This parameter is not used if + * since_date is defined. + * @param sinceId Value for Integer + */ + @JsonSetter("since_id") + public void setSinceId(Integer sinceId) { + this.sinceId = sinceId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for InvoiceUid. + * Providing an invoice_uid allows for scoping of the invoice events to a single invoice or + * credit note. + * @return Returns the String + */ + @JsonGetter("invoice_uid") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getInvoiceUid() { + return invoiceUid; + } + + /** + * Setter for InvoiceUid. + * Providing an invoice_uid allows for scoping of the invoice events to a single invoice or + * credit note. + * @param invoiceUid Value for String + */ + @JsonSetter("invoice_uid") + public void setInvoiceUid(String invoiceUid) { + this.invoiceUid = invoiceUid; + } + + /** + * Getter for WithChangeInvoiceStatus. + * Use this parameter if you want to fetch also invoice events with change_invoice_status type. + * @return Returns the String + */ + @JsonGetter("with_change_invoice_status") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getWithChangeInvoiceStatus() { + return withChangeInvoiceStatus; + } + + /** + * Setter for WithChangeInvoiceStatus. + * Use this parameter if you want to fetch also invoice events with change_invoice_status type. + * @param withChangeInvoiceStatus Value for String + */ + @JsonSetter("with_change_invoice_status") + public void setWithChangeInvoiceStatus(String withChangeInvoiceStatus) { + this.withChangeInvoiceStatus = withChangeInvoiceStatus; + } + + /** + * Getter for EventTypes. + * Filter results by event_type. Supply a comma separated list of event types (listed above). + * Use in query: `event_types=void_invoice,void_remainder`. + * @return Returns the List of InvoiceEventType + */ + @JsonGetter("event_types") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getEventTypes() { + return eventTypes; + } + + /** + * Setter for EventTypes. + * Filter results by event_type. Supply a comma separated list of event types (listed above). + * Use in query: `event_types=void_invoice,void_remainder`. + * @param eventTypes Value for List of InvoiceEventType + */ + @JsonSetter("event_types") + public void setEventTypes(List eventTypes) { + this.eventTypes = eventTypes; + } + + /** + * Converts this ListInvoiceEventsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListInvoiceEventsInput [" + "sinceDate=" + sinceDate + ", sinceId=" + sinceId + + ", page=" + page + ", perPage=" + perPage + ", invoiceUid=" + invoiceUid + + ", withChangeInvoiceStatus=" + withChangeInvoiceStatus + ", eventTypes=" + + eventTypes + "]"; + } + + /** + * Builds a new {@link ListInvoiceEventsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListInvoiceEventsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .sinceDate(getSinceDate()) + .sinceId(getSinceId()) + .page(getPage()) + .perPage(getPerPage()) + .invoiceUid(getInvoiceUid()) + .withChangeInvoiceStatus(getWithChangeInvoiceStatus()) + .eventTypes(getEventTypes()); + return builder; + } + + /** + * Class to build instances of {@link ListInvoiceEventsInput}. + */ + public static class Builder { + private String sinceDate; + private Integer sinceId; + private Integer page = 1; + private Integer perPage = 100; + private String invoiceUid; + private String withChangeInvoiceStatus; + private List eventTypes; + + + + /** + * Setter for sinceDate. + * @param sinceDate String value for sinceDate. + * @return Builder + */ + public Builder sinceDate(String sinceDate) { + this.sinceDate = sinceDate; + return this; + } + + /** + * Setter for sinceId. + * @param sinceId Integer value for sinceId. + * @return Builder + */ + public Builder sinceId(Integer sinceId) { + this.sinceId = sinceId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for invoiceUid. + * @param invoiceUid String value for invoiceUid. + * @return Builder + */ + public Builder invoiceUid(String invoiceUid) { + this.invoiceUid = invoiceUid; + return this; + } + + /** + * Setter for withChangeInvoiceStatus. + * @param withChangeInvoiceStatus String value for withChangeInvoiceStatus. + * @return Builder + */ + public Builder withChangeInvoiceStatus(String withChangeInvoiceStatus) { + this.withChangeInvoiceStatus = withChangeInvoiceStatus; + return this; + } + + /** + * Setter for eventTypes. + * @param eventTypes List of InvoiceEventType value for eventTypes. + * @return Builder + */ + public Builder eventTypes(List eventTypes) { + this.eventTypes = eventTypes; + return this; + } + + /** + * Builds a new {@link ListInvoiceEventsInput} object using the set fields. + * @return {@link ListInvoiceEventsInput} + */ + public ListInvoiceEventsInput build() { + return new ListInvoiceEventsInput(sinceDate, sinceId, page, perPage, invoiceUid, + withChangeInvoiceStatus, eventTypes); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListInvoiceSegmentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListInvoiceSegmentsInput.java new file mode 100644 index 00000000..54f688c3 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListInvoiceSegmentsInput.java @@ -0,0 +1,238 @@ +/* + * 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; + +/** + * This is a model class for ListInvoiceSegmentsInput type. + */ +public class ListInvoiceSegmentsInput { + private String invoiceUid; + private Integer page; + private Integer perPage; + private Direction direction; + + /** + * Default constructor. + */ + public ListInvoiceSegmentsInput() { + page = 1; + perPage = 20; + direction = Direction.ASC; + } + + /** + * Initialization constructor. + * @param invoiceUid String value for invoiceUid. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param direction Direction value for direction. + */ + public ListInvoiceSegmentsInput( + String invoiceUid, + Integer page, + Integer perPage, + Direction direction) { + this.invoiceUid = invoiceUid; + this.page = page; + this.perPage = perPage; + this.direction = direction; + } + + /** + * Getter for InvoiceUid. + * The unique identifier of the consolidated invoice + * @return Returns the String + */ + @JsonGetter("invoice_uid") + public String getInvoiceUid() { + return invoiceUid; + } + + /** + * Setter for InvoiceUid. + * The unique identifier of the consolidated invoice + * @param invoiceUid Value for String + */ + @JsonSetter("invoice_uid") + public void setInvoiceUid(String invoiceUid) { + this.invoiceUid = invoiceUid; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * Sort direction of the returned segments. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Sort direction of the returned segments. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Converts this ListInvoiceSegmentsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListInvoiceSegmentsInput [" + "invoiceUid=" + invoiceUid + ", page=" + page + + ", perPage=" + perPage + ", direction=" + direction + "]"; + } + + /** + * Builds a new {@link ListInvoiceSegmentsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListInvoiceSegmentsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(invoiceUid) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()); + return builder; + } + + /** + * Class to build instances of {@link ListInvoiceSegmentsInput}. + */ + public static class Builder { + private String invoiceUid; + private Integer page = 1; + private Integer perPage = 20; + private Direction direction = Direction.ASC; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param invoiceUid String value for invoiceUid. + */ + public Builder(String invoiceUid) { + this.invoiceUid = invoiceUid; + } + + /** + * Setter for invoiceUid. + * @param invoiceUid String value for invoiceUid. + * @return Builder + */ + public Builder invoiceUid(String invoiceUid) { + this.invoiceUid = invoiceUid; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Builds a new {@link ListInvoiceSegmentsInput} object using the set fields. + * @return {@link ListInvoiceSegmentsInput} + */ + public ListInvoiceSegmentsInput build() { + return new ListInvoiceSegmentsInput(invoiceUid, page, perPage, direction); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java new file mode 100644 index 00000000..1fef578e --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java @@ -0,0 +1,946 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListInvoicesInput type. + */ +public class ListInvoicesInput { + private String startDate; + private String endDate; + private Status status; + private Integer subscriptionId; + private String subscriptionGroupUid; + private Integer page; + private Integer perPage; + private Direction direction; + private Boolean lineItems; + private Boolean discounts; + private Boolean taxes; + private Boolean credits; + private Boolean payments; + private Boolean customFields; + private Boolean refunds; + private InvoiceDateField dateField; + private String startDatetime; + private String endDatetime; + private List customerIds; + private List number; + private List productIds; + private InvoiceSortField sort; + + /** + * Default constructor. + */ + public ListInvoicesInput() { + page = 1; + perPage = 20; + direction = Direction.DESC; + lineItems = false; + discounts = false; + taxes = false; + credits = false; + payments = false; + customFields = false; + refunds = false; + dateField = InvoiceDateField.DUE_DATE; + sort = InvoiceSortField.NUMBER; + } + + /** + * Initialization constructor. + * @param startDate String value for startDate. + * @param endDate String value for endDate. + * @param status Status value for status. + * @param subscriptionId Integer value for subscriptionId. + * @param subscriptionGroupUid String value for subscriptionGroupUid. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param direction Direction value for direction. + * @param lineItems Boolean value for lineItems. + * @param discounts Boolean value for discounts. + * @param taxes Boolean value for taxes. + * @param credits Boolean value for credits. + * @param payments Boolean value for payments. + * @param customFields Boolean value for customFields. + * @param refunds Boolean value for refunds. + * @param dateField InvoiceDateField value for dateField. + * @param startDatetime String value for startDatetime. + * @param endDatetime String value for endDatetime. + * @param customerIds List of Integer value for customerIds. + * @param number List of String value for number. + * @param productIds List of Integer value for productIds. + * @param sort InvoiceSortField value for sort. + */ + public ListInvoicesInput( + String startDate, + String endDate, + Status status, + Integer subscriptionId, + String subscriptionGroupUid, + Integer page, + Integer perPage, + Direction direction, + Boolean lineItems, + Boolean discounts, + Boolean taxes, + Boolean credits, + Boolean payments, + Boolean customFields, + Boolean refunds, + InvoiceDateField dateField, + String startDatetime, + String endDatetime, + List customerIds, + List number, + List productIds, + InvoiceSortField sort) { + this.startDate = startDate; + this.endDate = endDate; + this.status = status; + this.subscriptionId = subscriptionId; + this.subscriptionGroupUid = subscriptionGroupUid; + this.page = page; + this.perPage = perPage; + this.direction = direction; + this.lineItems = lineItems; + this.discounts = discounts; + this.taxes = taxes; + this.credits = credits; + this.payments = payments; + this.customFields = customFields; + this.refunds = refunds; + this.dateField = dateField; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.customerIds = customerIds; + this.number = number; + this.productIds = productIds; + this.sort = sort; + } + + /** + * Getter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices 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 String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns invoices with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for Status. + * The current status of the invoice. Allowed Values: draft, open, paid, pending, voided + * @return Returns the Status + */ + @JsonGetter("status") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Status getStatus() { + return status; + } + + /** + * Setter for Status. + * The current status of the invoice. Allowed Values: draft, open, paid, pending, voided + * @param status Value for Status + */ + @JsonSetter("status") + public void setStatus(Status status) { + this.status = status; + } + + /** + * Getter for SubscriptionId. + * The subscription's ID. + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The subscription's ID. + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for SubscriptionGroupUid. + * The UID of the subscription group you want to fetch consolidated invoices for. This will + * return a paginated list of consolidated invoices for the specified group. + * @return Returns the String + */ + @JsonGetter("subscription_group_uid") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSubscriptionGroupUid() { + return subscriptionGroupUid; + } + + /** + * Setter for SubscriptionGroupUid. + * The UID of the subscription group you want to fetch consolidated invoices for. This will + * return a paginated list of consolidated invoices for the specified group. + * @param subscriptionGroupUid Value for String + */ + @JsonSetter("subscription_group_uid") + public void setSubscriptionGroupUid(String subscriptionGroupUid) { + this.subscriptionGroupUid = subscriptionGroupUid; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * The sort direction of the returned invoices. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * The sort direction of the returned invoices. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Getter for LineItems. + * Include line items data + * @return Returns the Boolean + */ + @JsonGetter("line_items") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getLineItems() { + return lineItems; + } + + /** + * Setter for LineItems. + * Include line items data + * @param lineItems Value for Boolean + */ + @JsonSetter("line_items") + public void setLineItems(Boolean lineItems) { + this.lineItems = lineItems; + } + + /** + * Getter for Discounts. + * Include discounts data + * @return Returns the Boolean + */ + @JsonGetter("discounts") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDiscounts() { + return discounts; + } + + /** + * Setter for Discounts. + * Include discounts data + * @param discounts Value for Boolean + */ + @JsonSetter("discounts") + public void setDiscounts(Boolean discounts) { + this.discounts = discounts; + } + + /** + * Getter for Taxes. + * Include taxes data + * @return Returns the Boolean + */ + @JsonGetter("taxes") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxes() { + return taxes; + } + + /** + * Setter for Taxes. + * Include taxes data + * @param taxes Value for Boolean + */ + @JsonSetter("taxes") + public void setTaxes(Boolean taxes) { + this.taxes = taxes; + } + + /** + * Getter for Credits. + * Include credits data + * @return Returns the Boolean + */ + @JsonGetter("credits") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCredits() { + return credits; + } + + /** + * Setter for Credits. + * Include credits data + * @param credits Value for Boolean + */ + @JsonSetter("credits") + public void setCredits(Boolean credits) { + this.credits = credits; + } + + /** + * Getter for Payments. + * Include payments data + * @return Returns the Boolean + */ + @JsonGetter("payments") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getPayments() { + return payments; + } + + /** + * Setter for Payments. + * Include payments data + * @param payments Value for Boolean + */ + @JsonSetter("payments") + public void setPayments(Boolean payments) { + this.payments = payments; + } + + /** + * Getter for CustomFields. + * Include custom fields data + * @return Returns the Boolean + */ + @JsonGetter("custom_fields") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCustomFields() { + return customFields; + } + + /** + * Setter for CustomFields. + * Include custom fields data + * @param customFields Value for Boolean + */ + @JsonSetter("custom_fields") + public void setCustomFields(Boolean customFields) { + this.customFields = customFields; + } + + /** + * Getter for Refunds. + * Include refunds data + * @return Returns the Boolean + */ + @JsonGetter("refunds") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getRefunds() { + return refunds; + } + + /** + * Setter for Refunds. + * Include refunds data + * @param refunds Value for Boolean + */ + @JsonSetter("refunds") + public void setRefunds(Boolean refunds) { + this.refunds = refunds; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query + * `date_field=issue_date`. + * @return Returns the InvoiceDateField + */ + @JsonGetter("date_field") + @JsonInclude(JsonInclude.Include.NON_NULL) + public InvoiceDateField getDateField() { + return dateField; + } + + /** + * Setter for DateField. + * The type of filter you would like to apply to your search. Use in query + * `date_field=issue_date`. + * @param dateField Value for InvoiceDateField + */ + @JsonSetter("date_field") + public void setDateField(InvoiceDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for StartDatetime. + * The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. + * Returns invoices 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. Allowed to be used only along with date_field set to + * created_at or updated_at. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 invoices 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. Allowed to be used only along with date_field set to + * created_at or updated_at. + * @param startDatetime Value for String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 invoices 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. Allowed to be used only along with date_field set to + * created_at or updated_at. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 invoices 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. Allowed to be used only along with date_field set to + * created_at or updated_at. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for CustomerIds. + * Allows fetching invoices with matching customer id based on provided values. Use in query + * `customer_ids=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("customer_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCustomerIds() { + return customerIds; + } + + /** + * Setter for CustomerIds. + * Allows fetching invoices with matching customer id based on provided values. Use in query + * `customer_ids=1,2,3`. + * @param customerIds Value for List of Integer + */ + @JsonSetter("customer_ids") + public void setCustomerIds(List customerIds) { + this.customerIds = customerIds; + } + + /** + * Getter for Number. + * Allows fetching invoices with matching invoice number based on provided values. Use in query + * `number=1234,1235`. + * @return Returns the List of String + */ + @JsonGetter("number") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getNumber() { + return number; + } + + /** + * Setter for Number. + * Allows fetching invoices with matching invoice number based on provided values. Use in query + * `number=1234,1235`. + * @param number Value for List of String + */ + @JsonSetter("number") + public void setNumber(List number) { + this.number = number; + } + + /** + * Getter for ProductIds. + * Allows fetching invoices with matching line items product ids based on provided values. Use + * in query `product_ids=23,34`. + * @return Returns the List of Integer + */ + @JsonGetter("product_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getProductIds() { + return productIds; + } + + /** + * Setter for ProductIds. + * Allows fetching invoices with matching line items product ids based on provided values. Use + * in query `product_ids=23,34`. + * @param productIds Value for List of Integer + */ + @JsonSetter("product_ids") + public void setProductIds(List productIds) { + this.productIds = productIds; + } + + /** + * Getter for Sort. + * Allows specification of the order of the returned list. Use in query `sort=total_amount`. + * @return Returns the InvoiceSortField + */ + @JsonGetter("sort") + @JsonInclude(JsonInclude.Include.NON_NULL) + public InvoiceSortField getSort() { + return sort; + } + + /** + * Setter for Sort. + * Allows specification of the order of the returned list. Use in query `sort=total_amount`. + * @param sort Value for InvoiceSortField + */ + @JsonSetter("sort") + public void setSort(InvoiceSortField sort) { + this.sort = sort; + } + + /** + * Converts this ListInvoicesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListInvoicesInput [" + "startDate=" + startDate + ", endDate=" + endDate + + ", status=" + status + ", subscriptionId=" + subscriptionId + + ", subscriptionGroupUid=" + subscriptionGroupUid + ", page=" + page + ", perPage=" + + perPage + ", direction=" + direction + ", lineItems=" + lineItems + ", discounts=" + + discounts + ", taxes=" + taxes + ", credits=" + credits + ", payments=" + payments + + ", customFields=" + customFields + ", refunds=" + refunds + ", dateField=" + + dateField + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + + ", customerIds=" + customerIds + ", number=" + number + ", productIds=" + + productIds + ", sort=" + sort + "]"; + } + + /** + * Builds a new {@link ListInvoicesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListInvoicesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .startDate(getStartDate()) + .endDate(getEndDate()) + .status(getStatus()) + .subscriptionId(getSubscriptionId()) + .subscriptionGroupUid(getSubscriptionGroupUid()) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()) + .lineItems(getLineItems()) + .discounts(getDiscounts()) + .taxes(getTaxes()) + .credits(getCredits()) + .payments(getPayments()) + .customFields(getCustomFields()) + .refunds(getRefunds()) + .dateField(getDateField()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .customerIds(getCustomerIds()) + .number(getNumber()) + .productIds(getProductIds()) + .sort(getSort()); + return builder; + } + + /** + * Class to build instances of {@link ListInvoicesInput}. + */ + public static class Builder { + private String startDate; + private String endDate; + private Status status; + private Integer subscriptionId; + private String subscriptionGroupUid; + private Integer page = 1; + private Integer perPage = 20; + private Direction direction = Direction.DESC; + private Boolean lineItems = false; + private Boolean discounts = false; + private Boolean taxes = false; + private Boolean credits = false; + private Boolean payments = false; + private Boolean customFields = false; + private Boolean refunds = false; + private InvoiceDateField dateField = InvoiceDateField.DUE_DATE; + private String startDatetime; + private String endDatetime; + private List customerIds; + private List number; + private List productIds; + private InvoiceSortField sort = InvoiceSortField.NUMBER; + + + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for status. + * @param status Status value for status. + * @return Builder + */ + public Builder status(Status status) { + this.status = status; + return this; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId Integer value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for subscriptionGroupUid. + * @param subscriptionGroupUid String value for subscriptionGroupUid. + * @return Builder + */ + public Builder subscriptionGroupUid(String subscriptionGroupUid) { + this.subscriptionGroupUid = subscriptionGroupUid; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Setter for lineItems. + * @param lineItems Boolean value for lineItems. + * @return Builder + */ + public Builder lineItems(Boolean lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * Setter for discounts. + * @param discounts Boolean value for discounts. + * @return Builder + */ + public Builder discounts(Boolean discounts) { + this.discounts = discounts; + return this; + } + + /** + * Setter for taxes. + * @param taxes Boolean value for taxes. + * @return Builder + */ + public Builder taxes(Boolean taxes) { + this.taxes = taxes; + return this; + } + + /** + * Setter for credits. + * @param credits Boolean value for credits. + * @return Builder + */ + public Builder credits(Boolean credits) { + this.credits = credits; + return this; + } + + /** + * Setter for payments. + * @param payments Boolean value for payments. + * @return Builder + */ + public Builder payments(Boolean payments) { + this.payments = payments; + return this; + } + + /** + * Setter for customFields. + * @param customFields Boolean value for customFields. + * @return Builder + */ + public Builder customFields(Boolean customFields) { + this.customFields = customFields; + return this; + } + + /** + * Setter for refunds. + * @param refunds Boolean value for refunds. + * @return Builder + */ + public Builder refunds(Boolean refunds) { + this.refunds = refunds; + return this; + } + + /** + * Setter for dateField. + * @param dateField InvoiceDateField value for dateField. + * @return Builder + */ + public Builder dateField(InvoiceDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for customerIds. + * @param customerIds List of Integer value for customerIds. + * @return Builder + */ + public Builder customerIds(List customerIds) { + this.customerIds = customerIds; + return this; + } + + /** + * Setter for number. + * @param number List of String value for number. + * @return Builder + */ + public Builder number(List number) { + this.number = number; + return this; + } + + /** + * Setter for productIds. + * @param productIds List of Integer value for productIds. + * @return Builder + */ + public Builder productIds(List productIds) { + this.productIds = productIds; + return this; + } + + /** + * Setter for sort. + * @param sort InvoiceSortField value for sort. + * @return Builder + */ + public Builder sort(InvoiceSortField sort) { + this.sort = sort; + return this; + } + + /** + * Builds a new {@link ListInvoicesInput} object using the set fields. + * @return {@link ListInvoicesInput} + */ + public ListInvoicesInput build() { + return new ListInvoicesInput(startDate, endDate, status, subscriptionId, + subscriptionGroupUid, page, perPage, direction, lineItems, discounts, taxes, + credits, payments, customFields, refunds, dateField, startDatetime, endDatetime, + customerIds, number, productIds, sort); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java new file mode 100644 index 00000000..818c9d93 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListMetadataInput.java @@ -0,0 +1,522 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListMetadataInputDirection; +import java.util.List; + +/** + * This is a model class for ListMetadataInput type. + */ +public class ListMetadataInput { + private ResourceType resourceType; + private Integer page; + private Integer perPage; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private Boolean withDeleted; + private List resourceIds; + private ListMetadataInputDirection direction; + + /** + * Default constructor. + */ + public ListMetadataInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param dateField BasicDateField value for dateField. + * @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 withDeleted Boolean value for withDeleted. + * @param resourceIds List of Integer value for resourceIds. + * @param direction ListMetadataInputDirection value for direction. + */ + public ListMetadataInput( + ResourceType resourceType, + Integer page, + Integer perPage, + BasicDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime, + Boolean withDeleted, + List resourceIds, + ListMetadataInputDirection direction) { + this.resourceType = resourceType; + this.page = page; + this.perPage = perPage; + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.withDeleted = withDeleted; + this.resourceIds = resourceIds; + this.direction = direction; + } + + /** + * Getter for ResourceType. + * the resource type to which the metafields belong + * @return Returns the ResourceType + */ + @JsonGetter("resource_type") + public ResourceType getResourceType() { + return resourceType; + } + + /** + * Setter for ResourceType. + * the resource type to which the metafields belong + * @param resourceType Value for ResourceType + */ + @JsonSetter("resource_type") + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. + * @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. + * @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 metadata with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The start date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata 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 String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The end date (format YYYY-MM-DD) with which to filter the date_field. Returns metadata with a + * timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 metadata 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 String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 metadata 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 metadata 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 String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 metadata 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 String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for WithDeleted. + * Allow to fetch deleted metadata. + * @return Returns the Boolean + */ + @JsonGetter("with_deleted") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getWithDeleted() { + return withDeleted; + } + + /** + * Setter for WithDeleted. + * Allow to fetch deleted metadata. + * @param withDeleted Value for Boolean + */ + @JsonSetter("with_deleted") + public void setWithDeleted(Boolean withDeleted) { + this.withDeleted = withDeleted; + } + + /** + * Getter for ResourceIds. + * Allow to fetch metadata for multiple records based on provided ids. Use in query: + * `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. + * @return Returns the List of Integer + */ + @JsonGetter("resource_ids[]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getResourceIds() { + return resourceIds; + } + + /** + * Setter for ResourceIds. + * Allow to fetch metadata for multiple records based on provided ids. Use in query: + * `resource_ids[]=122&resource_ids[]=123&resource_ids[]=124`. + * @param resourceIds Value for List of Integer + */ + @JsonSetter("resource_ids[]") + public void setResourceIds(List resourceIds) { + this.resourceIds = resourceIds; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListMetadataInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListMetadataInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListMetadataInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListMetadataInputDirection direction) { + this.direction = direction; + } + + /** + * Converts this ListMetadataInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListMetadataInput [" + "resourceType=" + resourceType + ", page=" + page + + ", perPage=" + perPage + ", dateField=" + dateField + ", startDate=" + startDate + + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + + endDatetime + ", withDeleted=" + withDeleted + ", resourceIds=" + resourceIds + + ", direction=" + direction + "]"; + } + + /** + * Builds a new {@link ListMetadataInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListMetadataInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(resourceType) + .page(getPage()) + .perPage(getPerPage()) + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .withDeleted(getWithDeleted()) + .resourceIds(getResourceIds()) + .direction(getDirection()); + return builder; + } + + /** + * Class to build instances of {@link ListMetadataInput}. + */ + public static class Builder { + private ResourceType resourceType; + private Integer page = 1; + private Integer perPage = 20; + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + private Boolean withDeleted; + private List resourceIds; + private ListMetadataInputDirection direction; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + */ + public Builder(ResourceType resourceType) { + this.resourceType = resourceType; + } + + /** + * Setter for resourceType. + * @param resourceType ResourceType value for resourceType. + * @return Builder + */ + public Builder resourceType(ResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for withDeleted. + * @param withDeleted Boolean value for withDeleted. + * @return Builder + */ + public Builder withDeleted(Boolean withDeleted) { + this.withDeleted = withDeleted; + return this; + } + + /** + * Setter for resourceIds. + * @param resourceIds List of Integer value for resourceIds. + * @return Builder + */ + public Builder resourceIds(List resourceIds) { + this.resourceIds = resourceIds; + return this; + } + + /** + * Setter for direction. + * @param direction ListMetadataInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListMetadataInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * Builds a new {@link ListMetadataInput} object using the set fields. + * @return {@link ListMetadataInput} + */ + public ListMetadataInput build() { + return new ListMetadataInput(resourceType, page, perPage, dateField, startDate, endDate, + startDatetime, endDatetime, withDeleted, resourceIds, direction); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java new file mode 100644 index 00000000..c9b04960 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListMetafieldsInput.java @@ -0,0 +1,275 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListMetafieldsInputDirection; + +/** + * This is a model class for ListMetafieldsInput type. + */ +public class ListMetafieldsInput { + private ResourceType resourceType; + private String name; + private Integer page; + private Integer perPage; + private ListMetafieldsInputDirection direction; + + /** + * Default constructor. + */ + public ListMetafieldsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + * @param name String value for name. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param direction ListMetafieldsInputDirection value for direction. + */ + public ListMetafieldsInput( + ResourceType resourceType, + String name, + Integer page, + Integer perPage, + ListMetafieldsInputDirection direction) { + this.resourceType = resourceType; + this.name = name; + this.page = page; + this.perPage = perPage; + this.direction = direction; + } + + /** + * Getter for ResourceType. + * the resource type to which the metafields belong + * @return Returns the ResourceType + */ + @JsonGetter("resource_type") + public ResourceType getResourceType() { + return resourceType; + } + + /** + * Setter for ResourceType. + * the resource type to which the metafields belong + * @param resourceType Value for ResourceType + */ + @JsonSetter("resource_type") + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + /** + * Getter for Name. + * filter by the name of the metafield + * @return Returns the String + */ + @JsonGetter("name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getName() { + return name; + } + + /** + * Setter for Name. + * filter by the name of the metafield + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListMetafieldsInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListMetafieldsInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListMetafieldsInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListMetafieldsInputDirection direction) { + this.direction = direction; + } + + /** + * Converts this ListMetafieldsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListMetafieldsInput [" + "resourceType=" + resourceType + ", name=" + name + + ", page=" + page + ", perPage=" + perPage + ", direction=" + direction + "]"; + } + + /** + * Builds a new {@link ListMetafieldsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListMetafieldsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(resourceType) + .name(getName()) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()); + return builder; + } + + /** + * Class to build instances of {@link ListMetafieldsInput}. + */ + public static class Builder { + private ResourceType resourceType; + private String name; + private Integer page = 1; + private Integer perPage = 20; + private ListMetafieldsInputDirection direction; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + */ + public Builder(ResourceType resourceType) { + this.resourceType = resourceType; + } + + /** + * Setter for resourceType. + * @param resourceType ResourceType value for resourceType. + * @return Builder + */ + public Builder resourceType(ResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Setter for name. + * @param name String value for name. + * @return Builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction ListMetafieldsInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListMetafieldsInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * Builds a new {@link ListMetafieldsInput} object using the set fields. + * @return {@link ListMetafieldsInput} + */ + public ListMetafieldsInput build() { + return new ListMetafieldsInput(resourceType, name, page, perPage, direction); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java b/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java new file mode 100644 index 00000000..e3da3a23 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListMrrPerSubscriptionInput.java @@ -0,0 +1,271 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListMrrPerSubscriptionInput type. + */ +public class ListMrrPerSubscriptionInput { + private List filterSubscriptionIds; + private String atTime; + private Integer page; + private Integer perPage; + private Direction direction; + + /** + * Default constructor. + */ + public ListMrrPerSubscriptionInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param filterSubscriptionIds List of Integer value for filterSubscriptionIds. + * @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, + String atTime, + Integer page, + Integer perPage, + Direction direction) { + this.filterSubscriptionIds = filterSubscriptionIds; + this.atTime = atTime; + this.page = page; + this.perPage = perPage; + this.direction = direction; + } + + /** + * 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 + */ + @JsonGetter("filter[subscription_ids]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilterSubscriptionIds() { + return filterSubscriptionIds; + } + + /** + * 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 + */ + @JsonSetter("filter[subscription_ids]") + public void setFilterSubscriptionIds(List filterSubscriptionIds) { + this.filterSubscriptionIds = filterSubscriptionIds; + } + + /** + * Getter for AtTime. + * 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`. + * @return Returns the String + */ + @JsonGetter("at_time") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getAtTime() { + return atTime; + } + + /** + * Setter for AtTime. + * 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`. + * @param atTime Value for String + */ + @JsonSetter("at_time") + public void setAtTime(String atTime) { + this.atTime = atTime; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Records are ordered by subscription_id in + * ascending order by default. Use in query `direction=desc`. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Records are ordered by subscription_id in + * ascending order by default. Use in query `direction=desc`. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Converts this ListMrrPerSubscriptionInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListMrrPerSubscriptionInput [" + "filterSubscriptionIds=" + filterSubscriptionIds + + ", atTime=" + atTime + ", page=" + page + ", perPage=" + perPage + ", direction=" + + direction + "]"; + } + + /** + * Builds a new {@link ListMrrPerSubscriptionInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListMrrPerSubscriptionInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .filterSubscriptionIds(getFilterSubscriptionIds()) + .atTime(getAtTime()) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()); + return builder; + } + + /** + * Class to build instances of {@link ListMrrPerSubscriptionInput}. + */ + public static class Builder { + private List filterSubscriptionIds; + private String atTime; + private Integer page = 1; + private Integer perPage = 20; + private Direction direction; + + + + /** + * Setter for filterSubscriptionIds. + * @param filterSubscriptionIds List of Integer value for filterSubscriptionIds. + * @return Builder + */ + public Builder filterSubscriptionIds(List filterSubscriptionIds) { + this.filterSubscriptionIds = filterSubscriptionIds; + return this; + } + + /** + * Setter for atTime. + * @param atTime String value for atTime. + * @return Builder + */ + public Builder atTime(String atTime) { + this.atTime = atTime; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Builds a new {@link ListMrrPerSubscriptionInput} object using the set fields. + * @return {@link ListMrrPerSubscriptionInput} + */ + public ListMrrPerSubscriptionInput build() { + return new ListMrrPerSubscriptionInput(filterSubscriptionIds, atTime, page, perPage, + direction); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfileItem.java b/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfileItem.java index 3e0a2f21..2c6e0164 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfileItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfileItem.java @@ -114,8 +114,30 @@ public ListPaymentProfileItem( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param customerId Integer value for customerId. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param bankName String value for bankName. + * @param maskedBankRoutingNumber String value for maskedBankRoutingNumber. + * @param maskedBankAccountNumber String value for maskedBankAccountNumber. + * @param bankAccountType String value for bankAccountType. + * @param bankAccountHolderType String value for bankAccountHolderType. + * @param paymentType String value for paymentType. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected ListPaymentProfileItem(Integer id, String firstName, String lastName, Integer customerId, CurrentVault currentVault, String vaultToken, String billingAddress, String billingCity, String billingState, String billingZip, String billingCountry, diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfilesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfilesInput.java new file mode 100644 index 00000000..818d0cb0 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListPaymentProfilesInput.java @@ -0,0 +1,190 @@ +/* + * 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; + +/** + * This is a model class for ListPaymentProfilesInput type. + */ +public class ListPaymentProfilesInput { + private Integer page; + private Integer perPage; + private Integer customerId; + + /** + * Default constructor. + */ + public ListPaymentProfilesInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param customerId Integer value for customerId. + */ + public ListPaymentProfilesInput( + Integer page, + Integer perPage, + Integer customerId) { + this.page = page; + this.perPage = perPage; + this.customerId = customerId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for CustomerId. + * The ID of the customer for which you wish to list payment profiles + * @return Returns the Integer + */ + @JsonGetter("customer_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getCustomerId() { + return customerId; + } + + /** + * Setter for CustomerId. + * The ID of the customer for which you wish to list payment profiles + * @param customerId Value for Integer + */ + @JsonSetter("customer_id") + public void setCustomerId(Integer customerId) { + this.customerId = customerId; + } + + /** + * Converts this ListPaymentProfilesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListPaymentProfilesInput [" + "page=" + page + ", perPage=" + perPage + + ", customerId=" + customerId + "]"; + } + + /** + * Builds a new {@link ListPaymentProfilesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListPaymentProfilesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()) + .customerId(getCustomerId()); + return builder; + } + + /** + * Class to build instances of {@link ListPaymentProfilesInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + private Integer customerId; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for customerId. + * @param customerId Integer value for customerId. + * @return Builder + */ + public Builder customerId(Integer customerId) { + this.customerId = customerId; + return this; + } + + /** + * Builds a new {@link ListPaymentProfilesInput} object using the set fields. + * @return {@link ListPaymentProfilesInput} + */ + public ListPaymentProfilesInput build() { + return new ListPaymentProfilesInput(page, perPage, customerId); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java new file mode 100644 index 00000000..505194f4 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsForSubscriptionGroupInput.java @@ -0,0 +1,325 @@ +/* + * 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; + +/** + * This is a model class for ListPrepaymentsForSubscriptionGroupInput type. + */ +public class ListPrepaymentsForSubscriptionGroupInput { + private String uid; + private ListSubscriptionGroupPrepaymentDateField filterDateField; + private String filterEndDate; + private String filterStartDate; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListPrepaymentsForSubscriptionGroupInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param uid String value for uid. + * @param filterDateField ListSubscriptionGroupPrepaymentDateField value for filterDateField. + * @param filterEndDate String value for filterEndDate. + * @param filterStartDate String value for filterStartDate. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListPrepaymentsForSubscriptionGroupInput( + String uid, + ListSubscriptionGroupPrepaymentDateField filterDateField, + String filterEndDate, + String filterStartDate, + Integer page, + Integer perPage) { + this.uid = uid; + this.filterDateField = filterDateField; + this.filterEndDate = filterEndDate; + this.filterStartDate = filterStartDate; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for Uid. + * The uid of the subscription group + * @return Returns the String + */ + @JsonGetter("uid") + public String getUid() { + return uid; + } + + /** + * Setter for Uid. + * The uid of the subscription group + * @param uid Value for String + */ + @JsonSetter("uid") + 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String 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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * 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 + "]"; + } + + /** + * Builds a new {@link ListPrepaymentsForSubscriptionGroupInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListPrepaymentsForSubscriptionGroupInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(uid) + .filterDateField(getFilterDateField()) + .filterEndDate(getFilterEndDate()) + .filterStartDate(getFilterStartDate()) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListPrepaymentsForSubscriptionGroupInput}. + */ + public static class Builder { + private String uid; + private ListSubscriptionGroupPrepaymentDateField filterDateField; + private String filterEndDate; + private String filterStartDate; + private Integer page = 1; + private Integer perPage = 20; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param uid String value for uid. + */ + public Builder(String uid) { + this.uid = uid; + } + + /** + * Setter for uid. + * @param uid String value for uid. + * @return Builder + */ + public Builder uid(String uid) { + this.uid = 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 String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Setter for filterStartDate. + * @param filterStartDate String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java new file mode 100644 index 00000000..aee685af --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java @@ -0,0 +1,325 @@ +/* + * 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; + +/** + * This is a model class for ListPrepaymentsInput type. + */ +public class ListPrepaymentsInput { + private String subscriptionId; + private Integer page; + private Integer perPage; + private BasicDateField filterDateField; + private String filterStartDate; + private String filterEndDate; + + /** + * Default constructor. + */ + public ListPrepaymentsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param filterDateField BasicDateField value for filterDateField. + * @param filterStartDate String value for filterStartDate. + * @param filterEndDate String value for filterEndDate. + */ + public ListPrepaymentsInput( + String subscriptionId, + Integer page, + Integer perPage, + BasicDateField filterDateField, + String filterStartDate, + String filterEndDate) { + this.subscriptionId = subscriptionId; + this.page = page; + this.perPage = perPage; + this.filterDateField = filterDateField; + this.filterStartDate = filterStartDate; + this.filterEndDate = filterEndDate; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = 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 + */ + @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. 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 + */ + @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 String + */ + @JsonGetter("filter[start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[start_date]") + public void setFilterStartDate(String 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 String + */ + @JsonGetter("filter[end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[end_date]") + public void setFilterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + } + + /** + * Converts this ListPrepaymentsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListPrepaymentsInput [" + "subscriptionId=" + subscriptionId + ", page=" + page + + ", perPage=" + perPage + ", filterDateField=" + filterDateField + + ", filterStartDate=" + filterStartDate + ", filterEndDate=" + filterEndDate + "]"; + } + + /** + * Builds a new {@link ListPrepaymentsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListPrepaymentsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId) + .page(getPage()) + .perPage(getPerPage()) + .filterDateField(getFilterDateField()) + .filterStartDate(getFilterStartDate()) + .filterEndDate(getFilterEndDate()); + return builder; + } + + /** + * Class to build instances of {@link ListPrepaymentsInput}. + */ + public static class Builder { + private String subscriptionId; + private Integer page = 1; + private Integer perPage = 20; + private BasicDateField filterDateField; + private String filterStartDate; + private String filterEndDate; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + */ + public Builder(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + 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 filterStartDate. + * @param filterStartDate String value for filterStartDate. + * @return Builder + */ + public Builder filterStartDate(String filterStartDate) { + this.filterStartDate = filterStartDate; + return this; + } + + /** + * Setter for filterEndDate. + * @param filterEndDate String value for filterEndDate. + * @return Builder + */ + public Builder filterEndDate(String filterEndDate) { + this.filterEndDate = filterEndDate; + return this; + } + + /** + * Builds a new {@link ListPrepaymentsInput} object using the set fields. + * @return {@link ListPrepaymentsInput} + */ + public ListPrepaymentsInput build() { + return new ListPrepaymentsInput(subscriptionId, page, perPage, filterDateField, + filterStartDate, filterEndDate); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductFamiliesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductFamiliesInput.java new file mode 100644 index 00000000..8310be94 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductFamiliesInput.java @@ -0,0 +1,272 @@ +/* + * 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; + +/** + * This is a model class for ListProductFamiliesInput type. + */ +public class ListProductFamiliesInput { + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + + /** + * Default constructor. + */ + public ListProductFamiliesInput() { + } + + /** + * Initialization constructor. + * @param dateField BasicDateField value for dateField. + * @param startDate String value for startDate. + * @param endDate String value for endDate. + * @param startDatetime String value for startDatetime. + * @param endDatetime String value for endDatetime. + */ + public ListProductFamiliesInput( + BasicDateField dateField, + String startDate, + String endDate, + String startDatetime, + String endDatetime) { + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `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: + * `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 products with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 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. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param startDatetime Value for String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 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. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Converts this ListProductFamiliesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListProductFamiliesInput [" + "dateField=" + dateField + ", startDate=" + startDate + + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" + + endDatetime + "]"; + } + + /** + * Builds a new {@link ListProductFamiliesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProductFamiliesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()); + return builder; + } + + /** + * Class to build instances of {@link ListProductFamiliesInput}. + */ + public static class Builder { + private BasicDateField dateField; + private String startDate; + private String endDate; + private String startDatetime; + private String endDatetime; + + + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Builds a new {@link ListProductFamiliesInput} object using the set fields. + * @return {@link ListProductFamiliesInput} + */ + public ListProductFamiliesInput build() { + return new ListProductFamiliesInput(dateField, startDate, endDate, startDatetime, + endDatetime); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductPricePointsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductPricePointsInput.java new file mode 100644 index 00000000..e6c68ec5 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductPricePointsInput.java @@ -0,0 +1,283 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListProductPricePointsInput type. + */ +public class ListProductPricePointsInput { + private int productId; + private Integer page; + private Integer perPage; + private Boolean currencyPrices; + private List filterType; + + /** + * Default constructor. + */ + public ListProductPricePointsInput() { + page = 1; + perPage = 10; + } + + /** + * Initialization constructor. + * @param productId int value for productId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param currencyPrices Boolean value for currencyPrices. + * @param filterType List of PricePointType value for filterType. + */ + public ListProductPricePointsInput( + int productId, + Integer page, + Integer perPage, + Boolean currencyPrices, + List filterType) { + this.productId = productId; + this.page = page; + this.perPage = perPage; + this.currencyPrices = currencyPrices; + this.filterType = filterType; + } + + /** + * Getter for ProductId. + * The id or handle of the product. When using the handle, it must be prefixed with `handle:` + * @return Returns the int + */ + @JsonGetter("product_id") + public int getProductId() { + return productId; + } + + /** + * Setter for ProductId. + * The id or handle of the product. When using the handle, it must be prefixed with `handle:` + * @param productId Value for int + */ + @JsonSetter("product_id") + public void setProductId(int productId) { + this.productId = productId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 10. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 10. The + * maximum allowed values is 200; any per_page value over 200 will be changed to 200. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for CurrencyPrices. + * When fetching a product's price points, 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. If the product price point is set to + * use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If + * the flag is set to false, it will return all of the defined prices for each currency. + * @return Returns the Boolean + */ + @JsonGetter("currency_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCurrencyPrices() { + return currencyPrices; + } + + /** + * Setter for CurrencyPrices. + * When fetching a product's price points, 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. If the product price point is set to + * use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If + * the flag is set to false, it will return all of the defined prices for each currency. + * @param currencyPrices Value for Boolean + */ + @JsonSetter("currency_prices") + public void setCurrencyPrices(Boolean currencyPrices) { + this.currencyPrices = currencyPrices; + } + + /** + * Getter for FilterType. + * Use in query: `filter[type]=catalog,default`. + * @return Returns the List of PricePointType + */ + @JsonGetter("filter[type]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilterType() { + return filterType; + } + + /** + * Setter for FilterType. + * Use in query: `filter[type]=catalog,default`. + * @param filterType Value for List of PricePointType + */ + @JsonSetter("filter[type]") + public void setFilterType(List filterType) { + this.filterType = filterType; + } + + /** + * Converts this ListProductPricePointsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListProductPricePointsInput [" + "productId=" + productId + ", page=" + page + + ", perPage=" + perPage + ", currencyPrices=" + currencyPrices + ", filterType=" + + filterType + "]"; + } + + /** + * Builds a new {@link ListProductPricePointsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProductPricePointsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(productId) + .page(getPage()) + .perPage(getPerPage()) + .currencyPrices(getCurrencyPrices()) + .filterType(getFilterType()); + return builder; + } + + /** + * Class to build instances of {@link ListProductPricePointsInput}. + */ + public static class Builder { + private int productId; + private Integer page = 1; + private Integer perPage = 10; + private Boolean currencyPrices; + private List filterType; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param productId int value for productId. + */ + public Builder(int productId) { + this.productId = productId; + } + + /** + * Setter for productId. + * @param productId int value for productId. + * @return Builder + */ + public Builder productId(int productId) { + this.productId = productId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for currencyPrices. + * @param currencyPrices Boolean value for currencyPrices. + * @return Builder + */ + public Builder currencyPrices(Boolean currencyPrices) { + this.currencyPrices = currencyPrices; + 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; + } + + /** + * Builds a new {@link ListProductPricePointsInput} object using the set fields. + * @return {@link ListProductPricePointsInput} + */ + public ListProductPricePointsInput build() { + return new ListProductPricePointsInput(productId, page, perPage, currencyPrices, + filterType); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java new file mode 100644 index 00000000..d9364d85 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsForProductFamilyInput.java @@ -0,0 +1,576 @@ +/* + * 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; + +/** + * This is a model class for ListProductsForProductFamilyInput type. + */ +public class ListProductsForProductFamilyInput { + private int productFamilyId; + private Integer page; + private Integer perPage; + private BasicDateField dateField; + 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. + */ + public ListProductsForProductFamilyInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param productFamilyId int value for productFamilyId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param dateField BasicDateField value for dateField. + * @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, + String startDate, + String endDate, + String startDatetime, + String endDatetime, + Boolean includeArchived, + ListProductsInclude include, + IncludeNotNull filterPrepaidProductPricePointProductPricePointId, + Boolean filterUseSiteExchangeRate) { + this.productFamilyId = productFamilyId; + this.page = page; + this.perPage = perPage; + this.dateField = dateField; + this.startDate = startDate; + this.endDate = endDate; + this.startDatetime = startDatetime; + this.endDatetime = endDatetime; + this.includeArchived = includeArchived; + this.include = include; + this.filterPrepaidProductPricePointProductPricePointId = + filterPrepaidProductPricePointProductPricePointId; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for ProductFamilyId. + * The Chargify id of the product family to which the product belongs + * @return Returns the int + */ + @JsonGetter("product_family_id") + public int getProductFamilyId() { + return productFamilyId; + } + + /** + * Setter for ProductFamilyId. + * The Chargify id of the product family to which the product belongs + * @param productFamilyId Value for int + */ + @JsonSetter("product_family_id") + public void setProductFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `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: + * `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 products with + * a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date + * specified. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String 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 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. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param startDatetime Value for String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String 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 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. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for IncludeArchived. + * Include archived products + * @return Returns the Boolean + */ + @JsonGetter("include_archived") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getIncludeArchived() { + return includeArchived; + } + + /** + * Setter for IncludeArchived. + * Include archived products + * @param includeArchived Value for Boolean + */ + @JsonSetter("include_archived") + public void setIncludeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query + * `include=prepaid_product_price_point`. + * @return Returns the ListProductsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListProductsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query + * `include=prepaid_product_price_point`. + * @param include Value for ListProductsInclude + */ + @JsonSetter("include") + 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 + */ + @Override + 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 + "]"; + } + + /** + * Builds a new {@link ListProductsForProductFamilyInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProductsForProductFamilyInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(productFamilyId) + .page(getPage()) + .perPage(getPerPage()) + .dateField(getDateField()) + .startDate(getStartDate()) + .endDate(getEndDate()) + .startDatetime(getStartDatetime()) + .endDatetime(getEndDatetime()) + .includeArchived(getIncludeArchived()) + .include(getInclude()) + .filterPrepaidProductPricePointProductPricePointId(getFilterPrepaidProductPricePointProductPricePointId()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListProductsForProductFamilyInput}. + */ + public static class Builder { + private int productFamilyId; + private Integer page = 1; + private Integer perPage = 20; + private BasicDateField dateField; + 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. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param productFamilyId int value for productFamilyId. + */ + public Builder(int productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * Setter for productFamilyId. + * @param productFamilyId int value for productFamilyId. + * @return Builder + */ + public Builder productFamilyId(int productFamilyId) { + this.productFamilyId = productFamilyId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for includeArchived. + * @param includeArchived Boolean value for includeArchived. + * @return Builder + */ + public Builder includeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + return this; + } + + /** + * Setter for include. + * @param include ListProductsInclude value for include. + * @return Builder + */ + public Builder include(ListProductsInclude include) { + this.include = 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java new file mode 100644 index 00000000..9c8cf0b2 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProductsInput.java @@ -0,0 +1,528 @@ +/* + * 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; + +/** + * This is a model class for ListProductsInput type. + */ +public class ListProductsInput { + private BasicDateField dateField; + private String endDate; + private String endDatetime; + private String startDate; + private String startDatetime; + private Integer page; + private Integer perPage; + private Boolean includeArchived; + private ListProductsInclude include; + private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; + private Boolean filterUseSiteExchangeRate; + + /** + * Default constructor. + */ + public ListProductsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @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 page Integer value for page. + * @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, + String endDate, + String endDatetime, + String startDate, + String startDatetime, + Integer page, + Integer perPage, + Boolean includeArchived, + ListProductsInclude include, + IncludeNotNull filterPrepaidProductPricePointProductPricePointId, + Boolean filterUseSiteExchangeRate) { + this.dateField = dateField; + this.endDate = endDate; + this.endDatetime = endDatetime; + this.startDate = startDate; + this.startDatetime = startDatetime; + this.page = page; + this.perPage = perPage; + this.includeArchived = includeArchived; + this.include = include; + this.filterPrepaidProductPricePointProductPricePointId = + filterPrepaidProductPricePointProductPricePointId; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + } + + /** + * Getter for DateField. + * The type of filter you would like to apply to your search. Use in query: + * `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: + * `date_field=created_at`. + * @param dateField Value for BasicDateField + */ + @JsonSetter("date_field") + public void setDateField(BasicDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for EndDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for StartDate. + * 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. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for StartDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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. + * @param startDatetime Value for String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for IncludeArchived. + * Include archived products. Use in query: `include_archived=true`. + * @return Returns the Boolean + */ + @JsonGetter("include_archived") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getIncludeArchived() { + return includeArchived; + } + + /** + * Setter for IncludeArchived. + * Include archived products. Use in query: `include_archived=true`. + * @param includeArchived Value for Boolean + */ + @JsonSetter("include_archived") + public void setIncludeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query + * `include=prepaid_product_price_point`. + * @return Returns the ListProductsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListProductsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query + * `include=prepaid_product_price_point`. + * @param include Value for ListProductsInclude + */ + @JsonSetter("include") + 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 + "]"; + } + + /** + * Builds a new {@link ListProductsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProductsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .dateField(getDateField()) + .endDate(getEndDate()) + .endDatetime(getEndDatetime()) + .startDate(getStartDate()) + .startDatetime(getStartDatetime()) + .page(getPage()) + .perPage(getPerPage()) + .includeArchived(getIncludeArchived()) + .include(getInclude()) + .filterPrepaidProductPricePointProductPricePointId(getFilterPrepaidProductPricePointProductPricePointId()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()); + return builder; + } + + /** + * Class to build instances of {@link ListProductsInput}. + */ + public static class Builder { + private BasicDateField dateField; + private String endDate; + private String endDatetime; + private String startDate; + private String startDatetime; + private Integer page = 1; + private Integer perPage = 20; + private Boolean includeArchived; + private ListProductsInclude include; + private IncludeNotNull filterPrepaidProductPricePointProductPricePointId; + private Boolean filterUseSiteExchangeRate; + + + + /** + * Setter for dateField. + * @param dateField BasicDateField value for dateField. + * @return Builder + */ + public Builder dateField(BasicDateField dateField) { + this.dateField = dateField; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for includeArchived. + * @param includeArchived Boolean value for includeArchived. + * @return Builder + */ + public Builder includeArchived(Boolean includeArchived) { + this.includeArchived = includeArchived; + return this; + } + + /** + * Setter for include. + * @param include ListProductsInclude value for include. + * @return Builder + */ + public Builder include(ListProductsInclude include) { + this.include = 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java new file mode 100644 index 00000000..ec2ede30 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java @@ -0,0 +1,582 @@ +/* + * 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; + +/** + * This is a model class for ListProformaInvoicesInput type. + */ +public class ListProformaInvoicesInput { + private String subscriptionId; + private String startDate; + private String endDate; + private Status status; + private Integer page; + private Integer perPage; + private Direction direction; + private Boolean lineItems; + private Boolean discounts; + private Boolean taxes; + private Boolean credits; + private Boolean payments; + private Boolean customFields; + + /** + * Default constructor. + */ + public ListProformaInvoicesInput() { + page = 1; + perPage = 20; + direction = Direction.DESC; + lineItems = false; + discounts = false; + taxes = false; + credits = false; + payments = false; + customFields = false; + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param startDate String value for startDate. + * @param endDate String value for endDate. + * @param status Status value for status. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param direction Direction value for direction. + * @param lineItems Boolean value for lineItems. + * @param discounts Boolean value for discounts. + * @param taxes Boolean value for taxes. + * @param credits Boolean value for credits. + * @param payments Boolean value for payments. + * @param customFields Boolean value for customFields. + */ + public ListProformaInvoicesInput( + String subscriptionId, + String startDate, + String endDate, + Status status, + Integer page, + Integer perPage, + Direction direction, + Boolean lineItems, + Boolean discounts, + Boolean taxes, + Boolean credits, + Boolean payments, + Boolean customFields) { + this.subscriptionId = subscriptionId; + this.startDate = startDate; + this.endDate = endDate; + this.status = status; + this.page = page; + this.perPage = perPage; + this.direction = direction; + this.lineItems = lineItems; + this.discounts = discounts; + this.taxes = taxes; + this.credits = credits; + this.payments = payments; + this.customFields = customFields; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for StartDate. + * The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for EndDate. + * The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for Status. + * The current status of the invoice. Allowed Values: draft, open, paid, pending, voided + * @return Returns the Status + */ + @JsonGetter("status") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Status getStatus() { + return status; + } + + /** + * Setter for Status. + * The current status of the invoice. Allowed Values: draft, open, paid, pending, voided + * @param status Value for Status + */ + @JsonSetter("status") + public void setStatus(Status status) { + this.status = status; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * The sort direction of the returned invoices. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * The sort direction of the returned invoices. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Getter for LineItems. + * Include line items data + * @return Returns the Boolean + */ + @JsonGetter("line_items") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getLineItems() { + return lineItems; + } + + /** + * Setter for LineItems. + * Include line items data + * @param lineItems Value for Boolean + */ + @JsonSetter("line_items") + public void setLineItems(Boolean lineItems) { + this.lineItems = lineItems; + } + + /** + * Getter for Discounts. + * Include discounts data + * @return Returns the Boolean + */ + @JsonGetter("discounts") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDiscounts() { + return discounts; + } + + /** + * Setter for Discounts. + * Include discounts data + * @param discounts Value for Boolean + */ + @JsonSetter("discounts") + public void setDiscounts(Boolean discounts) { + this.discounts = discounts; + } + + /** + * Getter for Taxes. + * Include taxes data + * @return Returns the Boolean + */ + @JsonGetter("taxes") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxes() { + return taxes; + } + + /** + * Setter for Taxes. + * Include taxes data + * @param taxes Value for Boolean + */ + @JsonSetter("taxes") + public void setTaxes(Boolean taxes) { + this.taxes = taxes; + } + + /** + * Getter for Credits. + * Include credits data + * @return Returns the Boolean + */ + @JsonGetter("credits") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCredits() { + return credits; + } + + /** + * Setter for Credits. + * Include credits data + * @param credits Value for Boolean + */ + @JsonSetter("credits") + public void setCredits(Boolean credits) { + this.credits = credits; + } + + /** + * Getter for Payments. + * Include payments data + * @return Returns the Boolean + */ + @JsonGetter("payments") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getPayments() { + return payments; + } + + /** + * Setter for Payments. + * Include payments data + * @param payments Value for Boolean + */ + @JsonSetter("payments") + public void setPayments(Boolean payments) { + this.payments = payments; + } + + /** + * Getter for CustomFields. + * Include custom fields data + * @return Returns the Boolean + */ + @JsonGetter("custom_fields") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCustomFields() { + return customFields; + } + + /** + * Setter for CustomFields. + * Include custom fields data + * @param customFields Value for Boolean + */ + @JsonSetter("custom_fields") + public void setCustomFields(Boolean customFields) { + this.customFields = customFields; + } + + /** + * Converts this ListProformaInvoicesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListProformaInvoicesInput [" + "subscriptionId=" + subscriptionId + ", startDate=" + + startDate + ", endDate=" + endDate + ", status=" + status + ", page=" + page + + ", perPage=" + perPage + ", direction=" + direction + ", lineItems=" + lineItems + + ", discounts=" + discounts + ", taxes=" + taxes + ", credits=" + credits + + ", payments=" + payments + ", customFields=" + customFields + "]"; + } + + /** + * Builds a new {@link ListProformaInvoicesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListProformaInvoicesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId) + .startDate(getStartDate()) + .endDate(getEndDate()) + .status(getStatus()) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()) + .lineItems(getLineItems()) + .discounts(getDiscounts()) + .taxes(getTaxes()) + .credits(getCredits()) + .payments(getPayments()) + .customFields(getCustomFields()); + return builder; + } + + /** + * Class to build instances of {@link ListProformaInvoicesInput}. + */ + public static class Builder { + private String subscriptionId; + private String startDate; + private String endDate; + private Status status; + private Integer page = 1; + private Integer perPage = 20; + private Direction direction = Direction.DESC; + private Boolean lineItems = false; + private Boolean discounts = false; + private Boolean taxes = false; + private Boolean credits = false; + private Boolean payments = false; + private Boolean customFields = false; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + */ + public Builder(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for status. + * @param status Status value for status. + * @return Builder + */ + public Builder status(Status status) { + this.status = status; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Setter for lineItems. + * @param lineItems Boolean value for lineItems. + * @return Builder + */ + public Builder lineItems(Boolean lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * Setter for discounts. + * @param discounts Boolean value for discounts. + * @return Builder + */ + public Builder discounts(Boolean discounts) { + this.discounts = discounts; + return this; + } + + /** + * Setter for taxes. + * @param taxes Boolean value for taxes. + * @return Builder + */ + public Builder taxes(Boolean taxes) { + this.taxes = taxes; + return this; + } + + /** + * Setter for credits. + * @param credits Boolean value for credits. + * @return Builder + */ + public Builder credits(Boolean credits) { + this.credits = credits; + return this; + } + + /** + * Setter for payments. + * @param payments Boolean value for payments. + * @return Builder + */ + public Builder payments(Boolean payments) { + this.payments = payments; + return this; + } + + /** + * Setter for customFields. + * @param customFields Boolean value for customFields. + * @return Builder + */ + public Builder customFields(Boolean customFields) { + this.customFields = customFields; + return this; + } + + /** + * Builds a new {@link ListProformaInvoicesInput} object using the set fields. + * @return {@link ListProformaInvoicesInput} + */ + public ListProformaInvoicesInput build() { + return new ListProformaInvoicesInput(subscriptionId, startDate, endDate, status, page, + perPage, direction, lineItems, discounts, taxes, credits, payments, + customFields); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListReasonCodesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListReasonCodesInput.java new file mode 100644 index 00000000..e513bb3c --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListReasonCodesInput.java @@ -0,0 +1,152 @@ +/* + * 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; + +/** + * This is a model class for ListReasonCodesInput type. + */ +public class ListReasonCodesInput { + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListReasonCodesInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListReasonCodesInput( + Integer page, + Integer perPage) { + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListReasonCodesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListReasonCodesInput [" + "page=" + page + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ListReasonCodesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListReasonCodesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListReasonCodesInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListReasonCodesInput} object using the set fields. + * @return {@link ListReasonCodesInput} + */ + public ListReasonCodesInput build() { + return new ListReasonCodesInput(page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSalesCommissionSettingsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSalesCommissionSettingsInput.java new file mode 100644 index 00000000..553461ad --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSalesCommissionSettingsInput.java @@ -0,0 +1,277 @@ +/* + * 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; + +/** + * This is a model class for ListSalesCommissionSettingsInput type. + */ +public class ListSalesCommissionSettingsInput { + private String sellerId; + private String authorization; + private Boolean liveMode; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListSalesCommissionSettingsInput() { + authorization = "Bearer <>"; + page = 1; + perPage = 100; + } + + /** + * Initialization constructor. + * @param sellerId String value for sellerId. + * @param authorization String value for authorization. + * @param liveMode Boolean value for liveMode. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListSalesCommissionSettingsInput( + String sellerId, + String authorization, + Boolean liveMode, + Integer page, + Integer perPage) { + this.sellerId = sellerId; + this.authorization = authorization; + this.liveMode = liveMode; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for SellerId. + * The Chargify id of your seller account + * @return Returns the String + */ + @JsonGetter("seller_id") + public String getSellerId() { + return sellerId; + } + + /** + * Setter for SellerId. + * The Chargify id of your seller account + * @param sellerId Value for String + */ + @JsonSetter("seller_id") + public void setSellerId(String sellerId) { + this.sellerId = sellerId; + } + + /** + * Getter for Authorization. + * For authorization use user API key. See details + * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). + * @return Returns the String + */ + @JsonGetter("Authorization") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getAuthorization() { + return authorization; + } + + /** + * Setter for Authorization. + * For authorization use user API key. See details + * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). + * @param authorization Value for String + */ + @JsonSetter("Authorization") + public void setAuthorization(String authorization) { + this.authorization = authorization; + } + + /** + * Getter for LiveMode. + * This parameter indicates if records should be fetched from live mode sites. Default value is + * true. + * @return Returns the Boolean + */ + @JsonGetter("live_mode") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getLiveMode() { + return liveMode; + } + + /** + * Setter for LiveMode. + * This parameter indicates if records should be fetched from live mode sites. Default value is + * true. + * @param liveMode Value for Boolean + */ + @JsonSetter("live_mode") + public void setLiveMode(Boolean liveMode) { + this.liveMode = liveMode; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListSalesCommissionSettingsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSalesCommissionSettingsInput [" + "sellerId=" + sellerId + ", authorization=" + + authorization + ", liveMode=" + liveMode + ", page=" + page + ", perPage=" + + perPage + "]"; + } + + /** + * Builds a new {@link ListSalesCommissionSettingsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSalesCommissionSettingsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(sellerId) + .authorization(getAuthorization()) + .liveMode(getLiveMode()) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListSalesCommissionSettingsInput}. + */ + public static class Builder { + private String sellerId; + private String authorization = "Bearer <>"; + private Boolean liveMode; + private Integer page = 1; + private Integer perPage = 100; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param sellerId String value for sellerId. + */ + public Builder(String sellerId) { + this.sellerId = sellerId; + } + + /** + * Setter for sellerId. + * @param sellerId String value for sellerId. + * @return Builder + */ + public Builder sellerId(String sellerId) { + this.sellerId = sellerId; + return this; + } + + /** + * Setter for authorization. + * @param authorization String value for authorization. + * @return Builder + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Setter for liveMode. + * @param liveMode Boolean value for liveMode. + * @return Builder + */ + public Builder liveMode(Boolean liveMode) { + this.liveMode = liveMode; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListSalesCommissionSettingsInput} object using the set fields. + * @return {@link ListSalesCommissionSettingsInput} + */ + public ListSalesCommissionSettingsInput build() { + return new ListSalesCommissionSettingsInput(sellerId, authorization, liveMode, page, + perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSalesRepsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSalesRepsInput.java new file mode 100644 index 00000000..906362c5 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSalesRepsInput.java @@ -0,0 +1,275 @@ +/* + * 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; + +/** + * This is a model class for ListSalesRepsInput type. + */ +public class ListSalesRepsInput { + private String sellerId; + private String authorization; + private Boolean liveMode; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListSalesRepsInput() { + authorization = "Bearer <>"; + page = 1; + perPage = 100; + } + + /** + * Initialization constructor. + * @param sellerId String value for sellerId. + * @param authorization String value for authorization. + * @param liveMode Boolean value for liveMode. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListSalesRepsInput( + String sellerId, + String authorization, + Boolean liveMode, + Integer page, + Integer perPage) { + this.sellerId = sellerId; + this.authorization = authorization; + this.liveMode = liveMode; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for SellerId. + * The Chargify id of your seller account + * @return Returns the String + */ + @JsonGetter("seller_id") + public String getSellerId() { + return sellerId; + } + + /** + * Setter for SellerId. + * The Chargify id of your seller account + * @param sellerId Value for String + */ + @JsonSetter("seller_id") + public void setSellerId(String sellerId) { + this.sellerId = sellerId; + } + + /** + * Getter for Authorization. + * For authorization use user API key. See details + * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). + * @return Returns the String + */ + @JsonGetter("Authorization") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getAuthorization() { + return authorization; + } + + /** + * Setter for Authorization. + * For authorization use user API key. See details + * [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication). + * @param authorization Value for String + */ + @JsonSetter("Authorization") + public void setAuthorization(String authorization) { + this.authorization = authorization; + } + + /** + * Getter for LiveMode. + * This parameter indicates if records should be fetched from live mode sites. Default value is + * true. + * @return Returns the Boolean + */ + @JsonGetter("live_mode") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getLiveMode() { + return liveMode; + } + + /** + * Setter for LiveMode. + * This parameter indicates if records should be fetched from live mode sites. Default value is + * true. + * @param liveMode Value for Boolean + */ + @JsonSetter("live_mode") + public void setLiveMode(Boolean liveMode) { + this.liveMode = liveMode; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 100. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListSalesRepsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSalesRepsInput [" + "sellerId=" + sellerId + ", authorization=" + authorization + + ", liveMode=" + liveMode + ", page=" + page + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ListSalesRepsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSalesRepsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(sellerId) + .authorization(getAuthorization()) + .liveMode(getLiveMode()) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListSalesRepsInput}. + */ + public static class Builder { + private String sellerId; + private String authorization = "Bearer <>"; + private Boolean liveMode; + private Integer page = 1; + private Integer perPage = 100; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param sellerId String value for sellerId. + */ + public Builder(String sellerId) { + this.sellerId = sellerId; + } + + /** + * Setter for sellerId. + * @param sellerId String value for sellerId. + * @return Builder + */ + public Builder sellerId(String sellerId) { + this.sellerId = sellerId; + return this; + } + + /** + * Setter for authorization. + * @param authorization String value for authorization. + * @return Builder + */ + public Builder authorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Setter for liveMode. + * @param liveMode Boolean value for liveMode. + * @return Builder + */ + public Builder liveMode(Boolean liveMode) { + this.liveMode = liveMode; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListSalesRepsInput} object using the set fields. + * @return {@link ListSalesRepsInput} + */ + public ListSalesRepsInput build() { + return new ListSalesRepsInput(sellerId, authorization, liveMode, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java new file mode 100644 index 00000000..9dc674e6 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSegmentsForPricePointInput.java @@ -0,0 +1,407 @@ +/* + * 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; + +/** + * This is a model class for ListSegmentsForPricePointInput type. + */ +public class ListSegmentsForPricePointInput { + private String componentId; + private String pricePointId; + private Integer page; + private Integer perPage; + private String filterSegmentProperty1Value; + private String filterSegmentProperty2Value; + private String filterSegmentProperty3Value; + private String filterSegmentProperty4Value; + + /** + * Default constructor. + */ + public ListSegmentsForPricePointInput() { + page = 1; + perPage = 30; + } + + /** + * Initialization constructor. + * @param componentId String value for componentId. + * @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. + */ + public ListSegmentsForPricePointInput( + String componentId, + String pricePointId, + Integer page, + Integer perPage, + String filterSegmentProperty1Value, + String filterSegmentProperty2Value, + String filterSegmentProperty3Value, + String filterSegmentProperty4Value) { + this.componentId = componentId; + this.pricePointId = pricePointId; + this.page = page; + this.perPage = perPage; + this.filterSegmentProperty1Value = filterSegmentProperty1Value; + this.filterSegmentProperty2Value = filterSegmentProperty2Value; + this.filterSegmentProperty3Value = filterSegmentProperty3Value; + this.filterSegmentProperty4Value = filterSegmentProperty4Value; + } + + /** + * Getter for ComponentId. + * ID or Handle for the Component + * @return Returns the String + */ + @JsonGetter("component_id") + public String getComponentId() { + return componentId; + } + + /** + * Setter for ComponentId. + * ID or Handle for the Component + * @param componentId Value for String + */ + @JsonSetter("component_id") + public void setComponentId(String componentId) { + this.componentId = componentId; + } + + /** + * Getter for PricePointId. + * ID or Handle for the Price Point belonging to the Component + * @return Returns the String + */ + @JsonGetter("price_point_id") + public String getPricePointId() { + return pricePointId; + } + + /** + * Setter for PricePointId. + * ID or Handle for the Price Point belonging to the Component + * @param pricePointId Value for String + */ + @JsonSetter("price_point_id") + public void setPricePointId(String pricePointId) { + this.pricePointId = pricePointId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = 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 + */ + @JsonGetter("filter[segment_property_1_value]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getFilterSegmentProperty1Value() { + return filterSegmentProperty1Value; + } + + /** + * 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 + */ + @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; + } + + /** + * Converts this ListSegmentsForPricePointInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSegmentsForPricePointInput [" + "componentId=" + componentId + ", pricePointId=" + + pricePointId + ", page=" + page + ", perPage=" + perPage + + ", filterSegmentProperty1Value=" + filterSegmentProperty1Value + + ", filterSegmentProperty2Value=" + filterSegmentProperty2Value + + ", filterSegmentProperty3Value=" + filterSegmentProperty3Value + + ", filterSegmentProperty4Value=" + filterSegmentProperty4Value + "]"; + } + + /** + * Builds a new {@link ListSegmentsForPricePointInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSegmentsForPricePointInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(componentId, pricePointId) + .page(getPage()) + .perPage(getPerPage()) + .filterSegmentProperty1Value(getFilterSegmentProperty1Value()) + .filterSegmentProperty2Value(getFilterSegmentProperty2Value()) + .filterSegmentProperty3Value(getFilterSegmentProperty3Value()) + .filterSegmentProperty4Value(getFilterSegmentProperty4Value()); + return builder; + } + + /** + * Class to build instances of {@link ListSegmentsForPricePointInput}. + */ + public static class Builder { + private String componentId; + private String pricePointId; + private Integer page = 1; + private Integer perPage = 30; + private String filterSegmentProperty1Value; + private String filterSegmentProperty2Value; + private String filterSegmentProperty3Value; + private String filterSegmentProperty4Value; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param componentId String value for componentId. + * @param pricePointId String value for pricePointId. + */ + public Builder(String componentId, String pricePointId) { + this.componentId = componentId; + this.pricePointId = pricePointId; + } + + /** + * Setter for componentId. + * @param componentId String value for componentId. + * @return Builder + */ + public Builder componentId(String componentId) { + this.componentId = componentId; + return this; + } + + /** + * Setter for pricePointId. + * @param pricePointId String value for pricePointId. + * @return Builder + */ + public Builder pricePointId(String pricePointId) { + this.pricePointId = pricePointId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * 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. + * @return Builder + */ + public Builder filterSegmentProperty4Value(String filterSegmentProperty4Value) { + this.filterSegmentProperty4Value = filterSegmentProperty4Value; + return this; + } + + /** + * Builds a new {@link ListSegmentsForPricePointInput} object using the set fields. + * @return {@link ListSegmentsForPricePointInput} + */ + public ListSegmentsForPricePointInput build() { + return new ListSegmentsForPricePointInput(componentId, pricePointId, page, perPage, + filterSegmentProperty1Value, filterSegmentProperty2Value, + filterSegmentProperty3Value, filterSegmentProperty4Value); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java new file mode 100644 index 00000000..ef8c9bb2 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsForSiteInput.java @@ -0,0 +1,949 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListSubscriptionComponentsForSiteInputDirection; +import java.util.List; + +/** + * This is a model class for ListSubscriptionComponentsForSiteInput type. + */ +public class ListSubscriptionComponentsForSiteInput { + private Integer page; + private Integer perPage; + private ListSubscriptionComponentsSort sort; + private ListSubscriptionComponentsForSiteInputDirection direction; + private SubscriptionListDateField dateField; + private String startDate; + private String startDatetime; + private String endDate; + private String endDatetime; + private List subscriptionIds; + private IncludeNotNull pricePointIds; + private List productFamilyIds; + private ListSubscriptionComponentsInclude include; + private Boolean filterUseSiteExchangeRate; + private List filterCurrencies; + private List filterSubscriptionStates; + private SubscriptionListDateField filterSubscriptionDateField; + private String filterSubscriptionStartDate; + private String filterSubscriptionStartDatetime; + private String filterSubscriptionEndDate; + private String filterSubscriptionEndDatetime; + + /** + * Default constructor. + */ + public ListSubscriptionComponentsForSiteInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param sort ListSubscriptionComponentsSort value for sort. + * @param direction ListSubscriptionComponentsForSiteInputDirection value for direction. + * @param dateField SubscriptionListDateField value for dateField. + * @param startDate String value for startDate. + * @param startDatetime String value for startDatetime. + * @param endDate String value for endDate. + * @param endDatetime String value for endDatetime. + * @param subscriptionIds List of Integer value for subscriptionIds. + * @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 SubscriptionState value for + * filterSubscriptionStates. + * @param filterSubscriptionDateField SubscriptionListDateField value for + * filterSubscriptionDateField. + * @param filterSubscriptionStartDate String value for filterSubscriptionStartDate. + * @param filterSubscriptionStartDatetime String value for filterSubscriptionStartDatetime. + * @param filterSubscriptionEndDate String value for filterSubscriptionEndDate. + * @param filterSubscriptionEndDatetime String value for filterSubscriptionEndDatetime. + */ + public ListSubscriptionComponentsForSiteInput( + Integer page, + Integer perPage, + ListSubscriptionComponentsSort sort, + ListSubscriptionComponentsForSiteInputDirection direction, + SubscriptionListDateField dateField, + String startDate, + String startDatetime, + String endDate, + String endDatetime, + List subscriptionIds, + IncludeNotNull pricePointIds, + List productFamilyIds, + ListSubscriptionComponentsInclude include, + Boolean filterUseSiteExchangeRate, + List filterCurrencies, + List filterSubscriptionStates, + SubscriptionListDateField filterSubscriptionDateField, + String filterSubscriptionStartDate, + String filterSubscriptionStartDatetime, + String filterSubscriptionEndDate, + String filterSubscriptionEndDatetime) { + this.page = page; + this.perPage = perPage; + this.sort = sort; + this.direction = direction; + this.dateField = dateField; + this.startDate = startDate; + this.startDatetime = startDatetime; + this.endDate = endDate; + this.endDatetime = endDatetime; + this.subscriptionIds = subscriptionIds; + 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; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Sort. + * The attribute by which to sort. Use in query: `sort=updated_at`. + * @return Returns the ListSubscriptionComponentsSort + */ + @JsonGetter("sort") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsSort getSort() { + return sort; + } + + /** + * Setter for Sort. + * The attribute by which to sort. Use in query: `sort=updated_at`. + * @param sort Value for ListSubscriptionComponentsSort + */ + @JsonSetter("sort") + public void setSort(ListSubscriptionComponentsSort sort) { + this.sort = sort; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListSubscriptionComponentsForSiteInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsForSiteInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListSubscriptionComponentsForSiteInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListSubscriptionComponentsForSiteInputDirection direction) { + this.direction = direction; + } + + /** + * Getter for DateField. + * The type of filter you'd like to apply to your search. Use in query: `date_field=updated_at`. + * @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. Use in query: `date_field=updated_at`. + * @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 + * 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`. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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`. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for StartDatetime. + * 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`. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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`. + * @param startDatetime Value for String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for EndDate. + * 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. + * Use in query `end_date=2011-12-16`. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * Use in query `end_date=2011-12-16`. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for EndDatetime. + * 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. Use in query `end_datetime=2022-07-01 09:00:05`. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 `end_datetime=2022-07-01 09:00:05`. + * @param endDatetime Value for String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for SubscriptionIds. + * Allows fetching components allocation with matching subscription id based on provided ids. + * Use in query `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. + * Allows fetching components allocation with matching subscription id based on provided ids. + * Use in query `subscription_ids=1,2,3`. + * @param subscriptionIds Value for List of Integer + */ + @JsonSetter("subscription_ids") + public void setSubscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + } + + /** + * Getter for PricePointIds. + * Allows fetching components allocation only if price point id is present. Use in query + * `price_point_ids=not_null`. + * @return Returns the IncludeNotNull + */ + @JsonGetter("price_point_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public IncludeNotNull getPricePointIds() { + return pricePointIds; + } + + /** + * Setter for PricePointIds. + * Allows fetching components allocation only if price point id is present. Use in query + * `price_point_ids=not_null`. + * @param pricePointIds Value for IncludeNotNull + */ + @JsonSetter("price_point_ids") + public void setPricePointIds(IncludeNotNull pricePointIds) { + this.pricePointIds = pricePointIds; + } + + /** + * Getter for ProductFamilyIds. + * Allows fetching components allocation with matching product family id based on provided ids. + * Use in query `product_family_ids=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("product_family_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getProductFamilyIds() { + return productFamilyIds; + } + + /** + * Setter for ProductFamilyIds. + * Allows fetching components allocation with matching product family id based on provided ids. + * Use in query `product_family_ids=1,2,3`. + * @param productFamilyIds Value for List of Integer + */ + @JsonSetter("product_family_ids") + public void setProductFamilyIds(List productFamilyIds) { + this.productFamilyIds = productFamilyIds; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query `include=subscription`. + * @return Returns the ListSubscriptionComponentsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query `include=subscription`. + * @param include Value for ListSubscriptionComponentsInclude + */ + @JsonSetter("include") + 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 SubscriptionState + */ + @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 SubscriptionState + */ + @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 String + */ + @JsonGetter("filter[subscription][start_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[subscription][start_date]") + public void setFilterSubscriptionStartDate(String 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 String + */ + @JsonGetter("filter[subscription][start_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[subscription][start_datetime]") + public void setFilterSubscriptionStartDatetime(String 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 String + */ + @JsonGetter("filter[subscription][end_date]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[subscription][end_date]") + public void setFilterSubscriptionEndDate(String 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 String + */ + @JsonGetter("filter[subscription][end_datetime]") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 String + */ + @JsonSetter("filter[subscription][end_datetime]") + public void setFilterSubscriptionEndDatetime(String filterSubscriptionEndDatetime) { + this.filterSubscriptionEndDatetime = filterSubscriptionEndDatetime; + } + + /** + * Converts this ListSubscriptionComponentsForSiteInput into string format. + * @return String representation of this class + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListSubscriptionComponentsForSiteInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionComponentsForSiteInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()) + .sort(getSort()) + .direction(getDirection()) + .dateField(getDateField()) + .startDate(getStartDate()) + .startDatetime(getStartDatetime()) + .endDate(getEndDate()) + .endDatetime(getEndDatetime()) + .subscriptionIds(getSubscriptionIds()) + .pricePointIds(getPricePointIds()) + .productFamilyIds(getProductFamilyIds()) + .include(getInclude()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()) + .filterCurrencies(getFilterCurrencies()) + .filterSubscriptionStates(getFilterSubscriptionStates()) + .filterSubscriptionDateField(getFilterSubscriptionDateField()) + .filterSubscriptionStartDate(getFilterSubscriptionStartDate()) + .filterSubscriptionStartDatetime(getFilterSubscriptionStartDatetime()) + .filterSubscriptionEndDate(getFilterSubscriptionEndDate()) + .filterSubscriptionEndDatetime(getFilterSubscriptionEndDatetime()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionComponentsForSiteInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + private ListSubscriptionComponentsSort sort; + private ListSubscriptionComponentsForSiteInputDirection direction; + private SubscriptionListDateField dateField; + private String startDate; + private String startDatetime; + private String endDate; + private String endDatetime; + private List subscriptionIds; + private IncludeNotNull pricePointIds; + private List productFamilyIds; + private ListSubscriptionComponentsInclude include; + private Boolean filterUseSiteExchangeRate; + private List filterCurrencies; + private List filterSubscriptionStates; + private SubscriptionListDateField filterSubscriptionDateField; + private String filterSubscriptionStartDate; + private String filterSubscriptionStartDatetime; + private String filterSubscriptionEndDate; + private String filterSubscriptionEndDatetime; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for sort. + * @param sort ListSubscriptionComponentsSort value for sort. + * @return Builder + */ + public Builder sort(ListSubscriptionComponentsSort sort) { + this.sort = sort; + return this; + } + + /** + * Setter for direction. + * @param direction ListSubscriptionComponentsForSiteInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListSubscriptionComponentsForSiteInputDirection direction) { + this.direction = direction; + 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 String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for subscriptionIds. + * @param subscriptionIds List of Integer value for subscriptionIds. + * @return Builder + */ + public Builder subscriptionIds(List subscriptionIds) { + this.subscriptionIds = subscriptionIds; + return this; + } + + /** + * Setter for pricePointIds. + * @param pricePointIds IncludeNotNull value for pricePointIds. + * @return Builder + */ + public Builder pricePointIds(IncludeNotNull pricePointIds) { + this.pricePointIds = pricePointIds; + return this; + } + + /** + * Setter for productFamilyIds. + * @param productFamilyIds List of Integer value for productFamilyIds. + * @return Builder + */ + public Builder productFamilyIds(List productFamilyIds) { + this.productFamilyIds = productFamilyIds; + return this; + } + + /** + * Setter for include. + * @param include ListSubscriptionComponentsInclude value for include. + * @return Builder + */ + public Builder include(ListSubscriptionComponentsInclude include) { + this.include = 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 SubscriptionState 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 String value for filterSubscriptionStartDate. + * @return Builder + */ + public Builder filterSubscriptionStartDate(String filterSubscriptionStartDate) { + this.filterSubscriptionStartDate = filterSubscriptionStartDate; + return this; + } + + /** + * Setter for filterSubscriptionStartDatetime. + * @param filterSubscriptionStartDatetime String value for + * filterSubscriptionStartDatetime. + * @return Builder + */ + public Builder filterSubscriptionStartDatetime(String filterSubscriptionStartDatetime) { + this.filterSubscriptionStartDatetime = filterSubscriptionStartDatetime; + return this; + } + + /** + * Setter for filterSubscriptionEndDate. + * @param filterSubscriptionEndDate String value for filterSubscriptionEndDate. + * @return Builder + */ + public Builder filterSubscriptionEndDate(String filterSubscriptionEndDate) { + this.filterSubscriptionEndDate = filterSubscriptionEndDate; + return this; + } + + /** + * Setter for filterSubscriptionEndDatetime. + * @param filterSubscriptionEndDatetime String value for filterSubscriptionEndDatetime. + * @return Builder + */ + public Builder filterSubscriptionEndDatetime(String 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); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java new file mode 100644 index 00000000..a60543b2 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java @@ -0,0 +1,591 @@ +/* + * 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.maxio.advancedbilling.models.containers.ListSubscriptionComponentsInputDirection; +import java.util.List; + +/** + * This is a model class for ListSubscriptionComponentsInput type. + */ +public class ListSubscriptionComponentsInput { + private String subscriptionId; + private SubscriptionListDateField dateField; + private ListSubscriptionComponentsInputDirection direction; + private String endDate; + private String endDatetime; + private IncludeNotNull pricePointIds; + private List productFamilyIds; + private ListSubscriptionComponentsSort sort; + private String startDate; + private String startDatetime; + private ListSubscriptionComponentsInclude include; + private Boolean filterUseSiteExchangeRate; + private List filterCurrencies; + + /** + * Default constructor. + */ + public ListSubscriptionComponentsInput() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param dateField SubscriptionListDateField value for dateField. + * @param direction ListSubscriptionComponentsInputDirection value for direction. + * @param endDate String value for endDate. + * @param endDatetime String value for endDatetime. + * @param pricePointIds IncludeNotNull value for pricePointIds. + * @param productFamilyIds List of Integer value for productFamilyIds. + * @param sort ListSubscriptionComponentsSort value for sort. + * @param startDate String value for startDate. + * @param startDatetime String value for startDatetime. + * @param include ListSubscriptionComponentsInclude value for include. + * @param filterUseSiteExchangeRate Boolean value for filterUseSiteExchangeRate. + * @param filterCurrencies List of String value for filterCurrencies. + */ + public ListSubscriptionComponentsInput( + String subscriptionId, + SubscriptionListDateField dateField, + ListSubscriptionComponentsInputDirection direction, + String endDate, + String endDatetime, + IncludeNotNull pricePointIds, + List productFamilyIds, + ListSubscriptionComponentsSort sort, + String startDate, + String startDatetime, + ListSubscriptionComponentsInclude include, + Boolean filterUseSiteExchangeRate, + List filterCurrencies) { + this.subscriptionId = subscriptionId; + this.dateField = dateField; + this.direction = direction; + this.endDate = endDate; + this.endDatetime = endDatetime; + this.pricePointIds = pricePointIds; + this.productFamilyIds = productFamilyIds; + this.sort = sort; + this.startDate = startDate; + this.startDatetime = startDatetime; + this.include = include; + this.filterUseSiteExchangeRate = filterUseSiteExchangeRate; + this.filterCurrencies = filterCurrencies; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for DateField. + * The type of filter you'd like to apply to your search. Use in query `date_field=updated_at`. + * @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. Use in query `date_field=updated_at`. + * @param dateField Value for SubscriptionListDateField + */ + @JsonSetter("date_field") + public void setDateField(SubscriptionListDateField dateField) { + this.dateField = dateField; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ListSubscriptionComponentsInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ListSubscriptionComponentsInputDirection + */ + @JsonSetter("direction") + public void setDirection(ListSubscriptionComponentsInputDirection direction) { + this.direction = direction; + } + + /** + * Getter for EndDate. + * 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. + * @return Returns the String + */ + @JsonGetter("end_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getEndDate() { + return endDate; + } + + /** + * Setter for EndDate. + * 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. + * @param endDate Value for String + */ + @JsonSetter("end_date") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + /** + * Getter for EndDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("end_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("end_datetime") + public void setEndDatetime(String endDatetime) { + this.endDatetime = endDatetime; + } + + /** + * Getter for PricePointIds. + * Allows fetching components allocation only if price point id is present. Use in query + * `price_point_ids=not_null`. + * @return Returns the IncludeNotNull + */ + @JsonGetter("price_point_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public IncludeNotNull getPricePointIds() { + return pricePointIds; + } + + /** + * Setter for PricePointIds. + * Allows fetching components allocation only if price point id is present. Use in query + * `price_point_ids=not_null`. + * @param pricePointIds Value for IncludeNotNull + */ + @JsonSetter("price_point_ids") + public void setPricePointIds(IncludeNotNull pricePointIds) { + this.pricePointIds = pricePointIds; + } + + /** + * Getter for ProductFamilyIds. + * Allows fetching components allocation with matching product family id based on provided ids. + * Use in query `product_family_ids=1,2,3`. + * @return Returns the List of Integer + */ + @JsonGetter("product_family_ids") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getProductFamilyIds() { + return productFamilyIds; + } + + /** + * Setter for ProductFamilyIds. + * Allows fetching components allocation with matching product family id based on provided ids. + * Use in query `product_family_ids=1,2,3`. + * @param productFamilyIds Value for List of Integer + */ + @JsonSetter("product_family_ids") + public void setProductFamilyIds(List productFamilyIds) { + this.productFamilyIds = productFamilyIds; + } + + /** + * Getter for Sort. + * The attribute by which to sort. Use in query `sort=updated_at`. + * @return Returns the ListSubscriptionComponentsSort + */ + @JsonGetter("sort") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsSort getSort() { + return sort; + } + + /** + * Setter for Sort. + * The attribute by which to sort. Use in query `sort=updated_at`. + * @param sort Value for ListSubscriptionComponentsSort + */ + @JsonSetter("sort") + public void setSort(ListSubscriptionComponentsSort sort) { + this.sort = sort; + } + + /** + * Getter for StartDate. + * 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. + * @return Returns the String + */ + @JsonGetter("start_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStartDate() { + return startDate; + } + + /** + * Setter for StartDate. + * 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. + * @param startDate Value for String + */ + @JsonSetter("start_date") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + /** + * Getter for StartDatetime. + * 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. + * @return Returns the String + */ + @JsonGetter("start_datetime") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String 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 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 String + */ + @JsonSetter("start_datetime") + public void setStartDatetime(String startDatetime) { + this.startDatetime = startDatetime; + } + + /** + * Getter for Include. + * Allows including additional data in the response. Use in query `include=subscription`. + * @return Returns the ListSubscriptionComponentsInclude + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ListSubscriptionComponentsInclude getInclude() { + return include; + } + + /** + * Setter for Include. + * Allows including additional data in the response. Use in query `include=subscription`. + * @param include Value for ListSubscriptionComponentsInclude + */ + @JsonSetter("include") + 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 + */ + @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 + "]"; + } + + /** + * Builds a new {@link ListSubscriptionComponentsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionComponentsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId) + .dateField(getDateField()) + .direction(getDirection()) + .endDate(getEndDate()) + .endDatetime(getEndDatetime()) + .pricePointIds(getPricePointIds()) + .productFamilyIds(getProductFamilyIds()) + .sort(getSort()) + .startDate(getStartDate()) + .startDatetime(getStartDatetime()) + .include(getInclude()) + .filterUseSiteExchangeRate(getFilterUseSiteExchangeRate()) + .filterCurrencies(getFilterCurrencies()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionComponentsInput}. + */ + public static class Builder { + private String subscriptionId; + private SubscriptionListDateField dateField; + private ListSubscriptionComponentsInputDirection direction; + private String endDate; + private String endDatetime; + private IncludeNotNull pricePointIds; + private List productFamilyIds; + private ListSubscriptionComponentsSort sort; + private String startDate; + private String startDatetime; + private ListSubscriptionComponentsInclude include; + private Boolean filterUseSiteExchangeRate; + private List filterCurrencies; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + */ + public Builder(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + 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 direction. + * @param direction ListSubscriptionComponentsInputDirection value for direction. + * @return Builder + */ + public Builder direction(ListSubscriptionComponentsInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * Setter for endDate. + * @param endDate String value for endDate. + * @return Builder + */ + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Setter for endDatetime. + * @param endDatetime String value for endDatetime. + * @return Builder + */ + public Builder endDatetime(String endDatetime) { + this.endDatetime = endDatetime; + return this; + } + + /** + * Setter for pricePointIds. + * @param pricePointIds IncludeNotNull value for pricePointIds. + * @return Builder + */ + public Builder pricePointIds(IncludeNotNull pricePointIds) { + this.pricePointIds = pricePointIds; + return this; + } + + /** + * Setter for productFamilyIds. + * @param productFamilyIds List of Integer value for productFamilyIds. + * @return Builder + */ + public Builder productFamilyIds(List productFamilyIds) { + this.productFamilyIds = productFamilyIds; + return this; + } + + /** + * Setter for sort. + * @param sort ListSubscriptionComponentsSort value for sort. + * @return Builder + */ + public Builder sort(ListSubscriptionComponentsSort sort) { + this.sort = sort; + return this; + } + + /** + * Setter for startDate. + * @param startDate String value for startDate. + * @return Builder + */ + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Setter for startDatetime. + * @param startDatetime String value for startDatetime. + * @return Builder + */ + public Builder startDatetime(String startDatetime) { + this.startDatetime = startDatetime; + return this; + } + + /** + * Setter for include. + * @param include ListSubscriptionComponentsInclude value for include. + * @return Builder + */ + public Builder include(ListSubscriptionComponentsInclude include) { + this.include = 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, + endDate, endDatetime, pricePointIds, productFamilyIds, sort, startDate, + startDatetime, include, filterUseSiteExchangeRate, filterCurrencies); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java new file mode 100644 index 00000000..eb11ea0f --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java @@ -0,0 +1,354 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ListSubscriptionEventsInput type. + */ +public class ListSubscriptionEventsInput { + private String subscriptionId; + private Integer page; + private Integer perPage; + private Integer sinceId; + private Integer maxId; + private Direction direction; + private List filter; + + /** + * Default constructor. + */ + public ListSubscriptionEventsInput() { + page = 1; + perPage = 20; + direction = Direction.DESC; + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param sinceId Integer value for sinceId. + * @param maxId Integer value for maxId. + * @param direction Direction value for direction. + * @param filter List of EventType value for filter. + */ + public ListSubscriptionEventsInput( + String subscriptionId, + Integer page, + Integer perPage, + Integer sinceId, + Integer maxId, + Direction direction, + List filter) { + this.subscriptionId = subscriptionId; + this.page = page; + this.perPage = perPage; + this.sinceId = sinceId; + this.maxId = maxId; + this.direction = direction; + this.filter = filter; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("since_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSinceId() { + return sinceId; + } + + /** + * Setter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @param sinceId Value for Integer + */ + @JsonSetter("since_id") + public void setSinceId(Integer sinceId) { + this.sinceId = sinceId; + } + + /** + * Getter for MaxId. + * Returns events with an id less than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("max_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getMaxId() { + return maxId; + } + + /** + * Setter for MaxId. + * Returns events with an id less than or equal to the one specified + * @param maxId Value for Integer + */ + @JsonSetter("max_id") + public void setMaxId(Integer maxId) { + this.maxId = maxId; + } + + /** + * Getter for Direction. + * The sort direction of the returned events. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * The sort direction of the returned events. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Getter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @return Returns the List of EventType + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilter() { + return filter; + } + + /** + * Setter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @param filter Value for List of EventType + */ + @JsonSetter("filter") + public void setFilter(List filter) { + this.filter = filter; + } + + /** + * Converts this ListSubscriptionEventsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSubscriptionEventsInput [" + "subscriptionId=" + subscriptionId + ", page=" + + page + ", perPage=" + perPage + ", sinceId=" + sinceId + ", maxId=" + maxId + + ", direction=" + direction + ", filter=" + filter + "]"; + } + + /** + * Builds a new {@link ListSubscriptionEventsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionEventsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId) + .page(getPage()) + .perPage(getPerPage()) + .sinceId(getSinceId()) + .maxId(getMaxId()) + .direction(getDirection()) + .filter(getFilter()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionEventsInput}. + */ + public static class Builder { + private String subscriptionId; + private Integer page = 1; + private Integer perPage = 20; + private Integer sinceId; + private Integer maxId; + private Direction direction = Direction.DESC; + private List filter; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + */ + public Builder(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for sinceId. + * @param sinceId Integer value for sinceId. + * @return Builder + */ + public Builder sinceId(Integer sinceId) { + this.sinceId = sinceId; + return this; + } + + /** + * Setter for maxId. + * @param maxId Integer value for maxId. + * @return Builder + */ + public Builder maxId(Integer maxId) { + this.maxId = maxId; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Setter for filter. + * @param filter List of EventType value for filter. + * @return Builder + */ + public Builder filter(List filter) { + this.filter = filter; + return this; + } + + /** + * Builds a new {@link ListSubscriptionEventsInput} object using the set fields. + * @return {@link ListSubscriptionEventsInput} + */ + public ListSubscriptionEventsInput build() { + return new ListSubscriptionEventsInput(subscriptionId, page, perPage, sinceId, maxId, + direction, filter); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java new file mode 100644 index 00000000..8f43bc73 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionGroupsInput.java @@ -0,0 +1,194 @@ +/* + * 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; + +/** + * This is a model class for ListSubscriptionGroupsInput type. + */ +public class ListSubscriptionGroupsInput { + private Integer page; + private Integer perPage; + private String include; + + /** + * Default constructor. + */ + public ListSubscriptionGroupsInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param include String value for include. + */ + public ListSubscriptionGroupsInput( + Integer page, + Integer perPage, + String include) { + this.page = page; + this.perPage = perPage; + this.include = include; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Include. + * A list of additional information to include in the response. The following values are + * supported: - `account_balances`: Account balance information for the subscription groups. Use + * in query: `include[]=account_balances` + * @return Returns the String + */ + @JsonGetter("include") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getInclude() { + return include; + } + + /** + * Setter for Include. + * A list of additional information to include in the response. The following values are + * supported: - `account_balances`: Account balance information for the subscription groups. Use + * in query: `include[]=account_balances` + * @param include Value for String + */ + @JsonSetter("include") + public void setInclude(String include) { + this.include = include; + } + + /** + * Converts this ListSubscriptionGroupsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSubscriptionGroupsInput [" + "page=" + page + ", perPage=" + perPage + + ", include=" + include + "]"; + } + + /** + * Builds a new {@link ListSubscriptionGroupsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionGroupsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()) + .include(getInclude()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionGroupsInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + private String include; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for include. + * @param include String value for include. + * @return Builder + */ + public Builder include(String include) { + this.include = include; + return this; + } + + /** + * Builds a new {@link ListSubscriptionGroupsInput} object using the set fields. + * @return {@link ListSubscriptionGroupsInput} + */ + public ListSubscriptionGroupsInput build() { + return new ListSubscriptionGroupsInput(page, perPage, include); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java new file mode 100644 index 00000000..78cc3f43 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java @@ -0,0 +1,200 @@ +/* + * 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; + +/** + * This is a model class for ListSubscriptionNotesInput type. + */ +public class ListSubscriptionNotesInput { + private String subscriptionId; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListSubscriptionNotesInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListSubscriptionNotesInput( + String subscriptionId, + Integer page, + Integer perPage) { + this.subscriptionId = subscriptionId; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListSubscriptionNotesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListSubscriptionNotesInput [" + "subscriptionId=" + subscriptionId + ", page=" + + page + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ListSubscriptionNotesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListSubscriptionNotesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListSubscriptionNotesInput}. + */ + public static class Builder { + private String subscriptionId; + private Integer page = 1; + private Integer perPage = 20; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + */ + public Builder(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListSubscriptionNotesInput} object using the set fields. + * @return {@link ListSubscriptionNotesInput} + */ + public ListSubscriptionNotesInput build() { + return new ListSubscriptionNotesInput(subscriptionId, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java index 300bb359..10770f74 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java @@ -375,7 +375,7 @@ public void setEndDatetime(LocalDateTime endDatetime) { /** * Getter for Metadata. * The value of the metadata field specified in the parameter. Use in query - * `metadata[my-field]=value&metadata[other-field]=another_value`. + * `metadata[my-field]=value&metadata[other-field]=another_value`. * @return Returns the Map of String, String */ @JsonGetter("metadata") @@ -387,7 +387,7 @@ public Map getMetadata() { /** * Setter for Metadata. * The value of the metadata field specified in the parameter. Use in query - * `metadata[my-field]=value&metadata[other-field]=another_value`. + * `metadata[my-field]=value&metadata[other-field]=another_value`. * @param metadata Value for Map of String, String */ @JsonSetter("metadata") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListUsagesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListUsagesInput.java new file mode 100644 index 00000000..e70c762e --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListUsagesInput.java @@ -0,0 +1,392 @@ +/* + * 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; + +/** + * This is a model class for ListUsagesInput type. + */ +public class ListUsagesInput { + private String subscriptionId; + private int componentId; + private Integer sinceId; + private Integer maxId; + private String sinceDate; + private String untilDate; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ListUsagesInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param componentId int value for componentId. + * @param sinceId Integer value for sinceId. + * @param maxId Integer value for maxId. + * @param sinceDate String value for sinceDate. + * @param untilDate String value for untilDate. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ListUsagesInput( + String subscriptionId, + int componentId, + Integer sinceId, + Integer maxId, + String sinceDate, + String untilDate, + Integer page, + Integer perPage) { + this.subscriptionId = subscriptionId; + this.componentId = componentId; + this.sinceId = sinceId; + this.maxId = maxId; + this.sinceDate = sinceDate; + this.untilDate = untilDate; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for SubscriptionId. + * The Chargify id of the subscription + * @return Returns the String + */ + @JsonGetter("subscription_id") + public String getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The Chargify id of the subscription + * @param subscriptionId Value for String + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for ComponentId. + * Either the Chargify id for the component or the component's handle prefixed by `handle:` + * @return Returns the int + */ + @JsonGetter("component_id") + public int getComponentId() { + return componentId; + } + + /** + * Setter for ComponentId. + * Either the Chargify id for the component or the component's handle prefixed by `handle:` + * @param componentId Value for int + */ + @JsonSetter("component_id") + public void setComponentId(int componentId) { + this.componentId = componentId; + } + + /** + * Getter for SinceId. + * Returns usages with an id greater than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("since_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSinceId() { + return sinceId; + } + + /** + * Setter for SinceId. + * Returns usages with an id greater than or equal to the one specified + * @param sinceId Value for Integer + */ + @JsonSetter("since_id") + public void setSinceId(Integer sinceId) { + this.sinceId = sinceId; + } + + /** + * Getter for MaxId. + * Returns usages with an id less than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("max_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getMaxId() { + return maxId; + } + + /** + * Setter for MaxId. + * Returns usages with an id less than or equal to the one specified + * @param maxId Value for Integer + */ + @JsonSetter("max_id") + public void setMaxId(Integer maxId) { + this.maxId = maxId; + } + + /** + * Getter for SinceDate. + * Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the + * date specified. + * @return Returns the String + */ + @JsonGetter("since_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSinceDate() { + return sinceDate; + } + + /** + * Setter for SinceDate. + * Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the + * date specified. + * @param sinceDate Value for String + */ + @JsonSetter("since_date") + public void setSinceDate(String sinceDate) { + this.sinceDate = sinceDate; + } + + /** + * Getter for UntilDate. + * Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date + * specified. + * @return Returns the String + */ + @JsonGetter("until_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getUntilDate() { + return untilDate; + } + + /** + * Setter for UntilDate. + * Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date + * specified. + * @param untilDate Value for String + */ + @JsonSetter("until_date") + public void setUntilDate(String untilDate) { + this.untilDate = untilDate; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ListUsagesInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListUsagesInput [" + "subscriptionId=" + subscriptionId + ", componentId=" + + componentId + ", sinceId=" + sinceId + ", maxId=" + maxId + ", sinceDate=" + + sinceDate + ", untilDate=" + untilDate + ", page=" + page + ", perPage=" + perPage + + "]"; + } + + /** + * Builds a new {@link ListUsagesInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListUsagesInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(subscriptionId, componentId) + .sinceId(getSinceId()) + .maxId(getMaxId()) + .sinceDate(getSinceDate()) + .untilDate(getUntilDate()) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ListUsagesInput}. + */ + public static class Builder { + private String subscriptionId; + private int componentId; + private Integer sinceId; + private Integer maxId; + private String sinceDate; + private String untilDate; + private Integer page = 1; + private Integer perPage = 20; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param subscriptionId String value for subscriptionId. + * @param componentId int value for componentId. + */ + public Builder(String subscriptionId, int componentId) { + this.subscriptionId = subscriptionId; + this.componentId = componentId; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId String value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for componentId. + * @param componentId int value for componentId. + * @return Builder + */ + public Builder componentId(int componentId) { + this.componentId = componentId; + return this; + } + + /** + * Setter for sinceId. + * @param sinceId Integer value for sinceId. + * @return Builder + */ + public Builder sinceId(Integer sinceId) { + this.sinceId = sinceId; + return this; + } + + /** + * Setter for maxId. + * @param maxId Integer value for maxId. + * @return Builder + */ + public Builder maxId(Integer maxId) { + this.maxId = maxId; + return this; + } + + /** + * Setter for sinceDate. + * @param sinceDate String value for sinceDate. + * @return Builder + */ + public Builder sinceDate(String sinceDate) { + this.sinceDate = sinceDate; + return this; + } + + /** + * Setter for untilDate. + * @param untilDate String value for untilDate. + * @return Builder + */ + public Builder untilDate(String untilDate) { + this.untilDate = untilDate; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ListUsagesInput} object using the set fields. + * @return {@link ListUsagesInput} + */ + public ListUsagesInput build() { + return new ListUsagesInput(subscriptionId, componentId, sinceId, maxId, sinceDate, + untilDate, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListWebhooksInput.java b/src/main/java/com/maxio/advancedbilling/models/ListWebhooksInput.java new file mode 100644 index 00000000..8e5c522b --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListWebhooksInput.java @@ -0,0 +1,344 @@ +/* + * 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; + +/** + * This is a model class for ListWebhooksInput type. + */ +public class ListWebhooksInput { + private WebhookStatus status; + private String sinceDate; + private String untilDate; + private Integer page; + private Integer perPage; + private WebhookOrder order; + private Integer subscription; + + /** + * Default constructor. + */ + public ListWebhooksInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param status WebhookStatus value for status. + * @param sinceDate String value for sinceDate. + * @param untilDate String value for untilDate. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param order WebhookOrder value for order. + * @param subscription Integer value for subscription. + */ + public ListWebhooksInput( + WebhookStatus status, + String sinceDate, + String untilDate, + Integer page, + Integer perPage, + WebhookOrder order, + Integer subscription) { + this.status = status; + this.sinceDate = sinceDate; + this.untilDate = untilDate; + this.page = page; + this.perPage = perPage; + this.order = order; + this.subscription = subscription; + } + + /** + * Getter for Status. + * Webhooks with matching status would be returned. + * @return Returns the WebhookStatus + */ + @JsonGetter("status") + @JsonInclude(JsonInclude.Include.NON_NULL) + public WebhookStatus getStatus() { + return status; + } + + /** + * Setter for Status. + * Webhooks with matching status would be returned. + * @param status Value for WebhookStatus + */ + @JsonSetter("status") + public void setStatus(WebhookStatus status) { + this.status = status; + } + + /** + * Getter for SinceDate. + * Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one + * specified. + * @return Returns the String + */ + @JsonGetter("since_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getSinceDate() { + return sinceDate; + } + + /** + * Setter for SinceDate. + * Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one + * specified. + * @param sinceDate Value for String + */ + @JsonSetter("since_date") + public void setSinceDate(String sinceDate) { + this.sinceDate = sinceDate; + } + + /** + * Getter for UntilDate. + * Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one + * specified. + * @return Returns the String + */ + @JsonGetter("until_date") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getUntilDate() { + return untilDate; + } + + /** + * Setter for UntilDate. + * Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one + * specified. + * @param untilDate Value for String + */ + @JsonSetter("until_date") + public void setUntilDate(String untilDate) { + this.untilDate = untilDate; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Order. + * The order in which the Webhooks are returned. + * @return Returns the WebhookOrder + */ + @JsonGetter("order") + @JsonInclude(JsonInclude.Include.NON_NULL) + public WebhookOrder getOrder() { + return order; + } + + /** + * Setter for Order. + * The order in which the Webhooks are returned. + * @param order Value for WebhookOrder + */ + @JsonSetter("order") + public void setOrder(WebhookOrder order) { + this.order = order; + } + + /** + * Getter for Subscription. + * The Chargify id of a subscription you'd like to filter for + * @return Returns the Integer + */ + @JsonGetter("subscription") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscription() { + return subscription; + } + + /** + * Setter for Subscription. + * The Chargify id of a subscription you'd like to filter for + * @param subscription Value for Integer + */ + @JsonSetter("subscription") + public void setSubscription(Integer subscription) { + this.subscription = subscription; + } + + /** + * Converts this ListWebhooksInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListWebhooksInput [" + "status=" + status + ", sinceDate=" + sinceDate + + ", untilDate=" + untilDate + ", page=" + page + ", perPage=" + perPage + + ", order=" + order + ", subscription=" + subscription + "]"; + } + + /** + * Builds a new {@link ListWebhooksInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListWebhooksInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .status(getStatus()) + .sinceDate(getSinceDate()) + .untilDate(getUntilDate()) + .page(getPage()) + .perPage(getPerPage()) + .order(getOrder()) + .subscription(getSubscription()); + return builder; + } + + /** + * Class to build instances of {@link ListWebhooksInput}. + */ + public static class Builder { + private WebhookStatus status; + private String sinceDate; + private String untilDate; + private Integer page = 1; + private Integer perPage = 20; + private WebhookOrder order; + private Integer subscription; + + + + /** + * Setter for status. + * @param status WebhookStatus value for status. + * @return Builder + */ + public Builder status(WebhookStatus status) { + this.status = status; + return this; + } + + /** + * Setter for sinceDate. + * @param sinceDate String value for sinceDate. + * @return Builder + */ + public Builder sinceDate(String sinceDate) { + this.sinceDate = sinceDate; + return this; + } + + /** + * Setter for untilDate. + * @param untilDate String value for untilDate. + * @return Builder + */ + public Builder untilDate(String untilDate) { + this.untilDate = untilDate; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for order. + * @param order WebhookOrder value for order. + * @return Builder + */ + public Builder order(WebhookOrder order) { + this.order = order; + return this; + } + + /** + * Setter for subscription. + * @param subscription Integer value for subscription. + * @return Builder + */ + public Builder subscription(Integer subscription) { + this.subscription = subscription; + return this; + } + + /** + * Builds a new {@link ListWebhooksInput} object using the set fields. + * @return {@link ListWebhooksInput} + */ + public ListWebhooksInput build() { + return new ListWebhooksInput(status, sinceDate, untilDate, page, perPage, order, + subscription); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/Metadata.java b/src/main/java/com/maxio/advancedbilling/models/Metadata.java index 887dcb6a..552b5f3e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Metadata.java +++ b/src/main/java/com/maxio/advancedbilling/models/Metadata.java @@ -54,8 +54,15 @@ public Metadata( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param value String value for value. + * @param resourceId Integer value for resourceId. + * @param name String value for name. + * @param deletedAt String value for deletedAt. + * @param metafieldId Double value for metafieldId. */ + protected Metadata(Integer id, String value, Integer resourceId, String name, OptionalNullable deletedAt, Double metafieldId) { this.id = id; diff --git a/src/main/java/com/maxio/advancedbilling/models/Metafield.java b/src/main/java/com/maxio/advancedbilling/models/Metafield.java index bce1ab0e..557649a8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Metafield.java +++ b/src/main/java/com/maxio/advancedbilling/models/Metafield.java @@ -56,8 +56,15 @@ public Metafield( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Double value for id. + * @param name String value for name. + * @param scope MetafieldScope value for scope. + * @param dataCount Integer value for dataCount. + * @param inputType String value for inputType. + * @param mEnum List of MetafieldEnum value for mEnum. */ + protected Metafield(Double id, String name, MetafieldScope scope, Integer dataCount, String inputType, OptionalNullable> mEnum) { this.id = id; diff --git a/src/main/java/com/maxio/advancedbilling/models/Offer.java b/src/main/java/com/maxio/advancedbilling/models/Offer.java index 82b1773b..78fd6155 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Offer.java +++ b/src/main/java/com/maxio/advancedbilling/models/Offer.java @@ -107,8 +107,28 @@ public Offer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param siteId Integer value for siteId. + * @param productFamilyId Integer value for productFamilyId. + * @param productId Integer value for productId. + * @param productPricePointId Integer value for productPricePointId. + * @param productRevisableNumber Integer value for productRevisableNumber. + * @param name String value for name. + * @param handle String value for handle. + * @param description String value for description. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param archivedAt String value for archivedAt. + * @param offerItems List of OfferItem value for offerItems. + * @param offerDiscounts List of OfferDiscount value for offerDiscounts. + * @param productFamilyName String value for productFamilyName. + * @param productName String value for productName. + * @param productPricePointName String value for productPricePointName. + * @param productPriceInCents Integer value for productPriceInCents. + * @param offerSignupPages List of OfferSignupPage value for offerSignupPages. */ + protected Offer(Integer id, Integer siteId, Integer productFamilyId, Integer productId, Integer productPricePointId, Integer productRevisableNumber, String name, String handle, String description, String createdAt, String updatedAt, diff --git a/src/main/java/com/maxio/advancedbilling/models/OrganizationAddress.java b/src/main/java/com/maxio/advancedbilling/models/OrganizationAddress.java index 28774c9e..a6cf6aeb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/OrganizationAddress.java +++ b/src/main/java/com/maxio/advancedbilling/models/OrganizationAddress.java @@ -62,8 +62,17 @@ public OrganizationAddress( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param street String value for street. + * @param line2 String value for line2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. + * @param name String value for name. + * @param phone String value for phone. */ + protected OrganizationAddress(OptionalNullable street, OptionalNullable line2, OptionalNullable city, OptionalNullable state, OptionalNullable zip, OptionalNullable country, diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentMethodCreditCardType.java b/src/main/java/com/maxio/advancedbilling/models/PaymentMethodCreditCardType.java index 9f3771f0..a3fca9a8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentMethodCreditCardType.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentMethodCreditCardType.java @@ -51,8 +51,14 @@ public PaymentMethodCreditCardType( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param cardBrand String value for cardBrand. + * @param cardExpiration String value for cardExpiration. + * @param lastFour String value for lastFour. + * @param maskedCardNumber String value for maskedCardNumber. + * @param type String value for type. */ + protected PaymentMethodCreditCardType(String cardBrand, String cardExpiration, OptionalNullable lastFour, String maskedCardNumber, String type) { this.cardBrand = cardBrand; diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentMethodNestedData.java b/src/main/java/com/maxio/advancedbilling/models/PaymentMethodNestedData.java index a8d776d4..9624a738 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentMethodNestedData.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentMethodNestedData.java @@ -75,8 +75,20 @@ public PaymentMethodNestedData( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param type String value for type. + * @param maskedAccountNumber String value for maskedAccountNumber. + * @param maskedRoutingNumber String value for maskedRoutingNumber. + * @param cardBrand String value for cardBrand. + * @param cardExpiration String value for cardExpiration. + * @param lastFour String value for lastFour. + * @param maskedCardNumber String value for maskedCardNumber. + * @param details String value for details. + * @param kind String value for kind. + * @param memo String value for memo. + * @param email String value for email. */ + protected PaymentMethodNestedData(String type, String maskedAccountNumber, String maskedRoutingNumber, String cardBrand, String cardExpiration, OptionalNullable lastFour, String maskedCardNumber, String details, String kind, diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/PaymentProfile.java index 7c378c43..fe2f6f17 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentProfile.java @@ -119,8 +119,31 @@ public PaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param maskedCardNumber String value for maskedCardNumber. + * @param cardType CardType value for cardType. + * @param expirationMonth Integer value for expirationMonth. + * @param expirationYear Integer value for expirationYear. + * @param customerId Integer value for customerId. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param customerVaultToken String value for customerVaultToken. + * @param billingAddress2 String value for billingAddress2. + * @param paymentType PaymentType value for paymentType. + * @param disabled Boolean value for disabled. + * @param chargifyToken String value for chargifyToken. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. */ + protected PaymentProfile(Integer id, String firstName, String lastName, String maskedCardNumber, CardType cardType, Integer expirationMonth, Integer expirationYear, Integer customerId, CurrentVault currentVault, OptionalNullable vaultToken, diff --git a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java index c21c5e40..83ec00af 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaymentProfileAttributes.java @@ -132,8 +132,34 @@ public PaymentProfileAttributes( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param chargifyToken String value for chargifyToken. + * @param id Integer value for id. + * @param paymentType String value for paymentType. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param maskedCardNumber String value for maskedCardNumber. + * @param fullNumber String value for fullNumber. + * @param cardType CardType value for cardType. + * @param expirationMonth PaymentProfileAttributesExpirationMonth value for expirationMonth. + * @param expirationYear PaymentProfileAttributesExpirationYear value for expirationYear. + * @param billingAddress String value for billingAddress. + * @param billingAddress2 String value for billingAddress2. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingCountry String value for billingCountry. + * @param billingZip String value for billingZip. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param customerVaultToken String value for customerVaultToken. + * @param customerId Integer value for customerId. + * @param paypalEmail String value for paypalEmail. + * @param paymentMethodNonce String value for paymentMethodNonce. + * @param gatewayHandle String value for gatewayHandle. + * @param cvv String value for cvv. + * @param lastFour String value for lastFour. */ + protected PaymentProfileAttributes(String chargifyToken, Integer id, String paymentType, String firstName, String lastName, String maskedCardNumber, String fullNumber, CardType cardType, PaymentProfileAttributesExpirationMonth expirationMonth, diff --git a/src/main/java/com/maxio/advancedbilling/models/PortalManagementLink.java b/src/main/java/com/maxio/advancedbilling/models/PortalManagementLink.java index ee0e4045..a8f36662 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PortalManagementLink.java +++ b/src/main/java/com/maxio/advancedbilling/models/PortalManagementLink.java @@ -54,8 +54,15 @@ public PortalManagementLink( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param url String value for url. + * @param fetchCount Integer value for fetchCount. + * @param createdAt String value for createdAt. + * @param newLinkAvailableAt String value for newLinkAvailableAt. + * @param expiresAt String value for expiresAt. + * @param lastInviteSentAt String value for lastInviteSentAt. */ + protected PortalManagementLink(String url, Integer fetchCount, String createdAt, String newLinkAvailableAt, String expiresAt, OptionalNullable lastInviteSentAt) { diff --git a/src/main/java/com/maxio/advancedbilling/models/Price.java b/src/main/java/com/maxio/advancedbilling/models/Price.java index b890c6b4..beb7fa50 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Price.java +++ b/src/main/java/com/maxio/advancedbilling/models/Price.java @@ -45,8 +45,12 @@ public Price( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param startingQuantity PriceStartingQuantity value for startingQuantity. + * @param unitPrice PriceUnitPrice value for unitPrice. + * @param endingQuantity PriceEndingQuantity value for endingQuantity. */ + protected Price(PriceStartingQuantity startingQuantity, PriceUnitPrice unitPrice, OptionalNullable endingQuantity) { this.startingQuantity = startingQuantity; diff --git a/src/main/java/com/maxio/advancedbilling/models/Product.java b/src/main/java/com/maxio/advancedbilling/models/Product.java index b8303c3a..51cd0fd4 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Product.java +++ b/src/main/java/com/maxio/advancedbilling/models/Product.java @@ -183,8 +183,47 @@ public Product( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param handle String value for handle. + * @param description String value for description. + * @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 createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param priceInCents Integer value for priceInCents. + * @param interval Integer value for interval. + * @param intervalUnit ProductIntervalUnit value for intervalUnit. + * @param initialChargeInCents Integer value for initialChargeInCents. + * @param trialPriceInCents Integer value for trialPriceInCents. + * @param trialInterval Integer value for trialInterval. + * @param trialIntervalUnit ProductTrialIntervalUnit value for trialIntervalUnit. + * @param archivedAt String value for archivedAt. + * @param requireCreditCard Boolean value for requireCreditCard. + * @param returnParams String value for returnParams. + * @param taxable Boolean value for taxable. + * @param updateReturnUrl String value for updateReturnUrl. + * @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial. + * @param versionNumber Integer value for versionNumber. + * @param updateReturnParams String value for updateReturnParams. + * @param productFamily ProductFamily value for productFamily. + * @param publicSignupPages List of PublicSignupPage value for publicSignupPages. + * @param productPricePointName String value for productPricePointName. + * @param requestBillingAddress Boolean value for requestBillingAddress. + * @param requireBillingAddress Boolean value for requireBillingAddress. + * @param requireShippingAddress Boolean value for requireShippingAddress. + * @param taxCode String value for taxCode. + * @param defaultProductPricePointId Integer value for defaultProductPricePointId. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param itemCategory String value for itemCategory. + * @param productPricePointId Integer value for productPricePointId. + * @param productPricePointHandle String value for productPricePointHandle. */ + protected Product(Integer id, String name, OptionalNullable handle, String description, OptionalNullable accountingCode, Boolean requestCreditCard, OptionalNullable expirationInterval, diff --git a/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java b/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java index aa427ff5..c2be5dcb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java @@ -58,8 +58,16 @@ public ProductFamily( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param handle String value for handle. + * @param accountingCode String value for accountingCode. + * @param description String value for description. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. */ + protected ProductFamily(Integer id, String name, String handle, OptionalNullable accountingCode, OptionalNullable description, String createdAt, String updatedAt) { diff --git a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java index cd1deb13..5b58a7eb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProductPricePoint.java @@ -122,8 +122,32 @@ public ProductPricePoint( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param handle String value for handle. + * @param priceInCents Integer value for priceInCents. + * @param interval Integer value for interval. + * @param intervalUnit String value for intervalUnit. + * @param trialPriceInCents Integer value for trialPriceInCents. + * @param trialInterval Integer value for trialInterval. + * @param trialIntervalUnit String value for trialIntervalUnit. + * @param trialType String value for trialType. + * @param introductoryOffer Boolean value for introductoryOffer. + * @param initialChargeInCents Integer value for initialChargeInCents. + * @param initialChargeAfterTrial Boolean value for initialChargeAfterTrial. + * @param expirationInterval Integer value for expirationInterval. + * @param expirationIntervalUnit String value for expirationIntervalUnit. + * @param productId Integer value for productId. + * @param archivedAt String value for archivedAt. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param type PricePointType value for type. + * @param taxIncluded Boolean value for taxIncluded. + * @param subscriptionId Integer value for subscriptionId. */ + protected ProductPricePoint(Integer id, String name, String handle, Integer priceInCents, Integer interval, String intervalUnit, Integer trialPriceInCents, Integer trialInterval, String trialIntervalUnit, String trialType, Boolean introductoryOffer, diff --git a/src/main/java/com/maxio/advancedbilling/models/PublicSignupPage.java b/src/main/java/com/maxio/advancedbilling/models/PublicSignupPage.java index ebeac73c..315ab0c5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PublicSignupPage.java +++ b/src/main/java/com/maxio/advancedbilling/models/PublicSignupPage.java @@ -46,8 +46,13 @@ public PublicSignupPage( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param returnUrl String value for returnUrl. + * @param returnParams String value for returnParams. + * @param url String value for url. */ + protected PublicSignupPage(Integer id, OptionalNullable returnUrl, OptionalNullable returnParams, String url) { this.id = id; diff --git a/src/main/java/com/maxio/advancedbilling/models/ReadEventsCountInput.java b/src/main/java/com/maxio/advancedbilling/models/ReadEventsCountInput.java new file mode 100644 index 00000000..626d29e9 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ReadEventsCountInput.java @@ -0,0 +1,306 @@ +/* + * 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 java.util.List; + +/** + * This is a model class for ReadEventsCountInput type. + */ +public class ReadEventsCountInput { + private Integer page; + private Integer perPage; + private Integer sinceId; + private Integer maxId; + private Direction direction; + private List filter; + + /** + * Default constructor. + */ + public ReadEventsCountInput() { + page = 1; + perPage = 20; + direction = Direction.DESC; + } + + /** + * Initialization constructor. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param sinceId Integer value for sinceId. + * @param maxId Integer value for maxId. + * @param direction Direction value for direction. + * @param filter List of EventType value for filter. + */ + public ReadEventsCountInput( + Integer page, + Integer perPage, + Integer sinceId, + Integer maxId, + Direction direction, + List filter) { + this.page = page; + this.perPage = perPage; + this.sinceId = sinceId; + this.maxId = maxId; + this.direction = direction; + this.filter = filter; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("since_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSinceId() { + return sinceId; + } + + /** + * Setter for SinceId. + * Returns events with an id greater than or equal to the one specified + * @param sinceId Value for Integer + */ + @JsonSetter("since_id") + public void setSinceId(Integer sinceId) { + this.sinceId = sinceId; + } + + /** + * Getter for MaxId. + * Returns events with an id less than or equal to the one specified + * @return Returns the Integer + */ + @JsonGetter("max_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getMaxId() { + return maxId; + } + + /** + * Setter for MaxId. + * Returns events with an id less than or equal to the one specified + * @param maxId Value for Integer + */ + @JsonSetter("max_id") + public void setMaxId(Integer maxId) { + this.maxId = maxId; + } + + /** + * Getter for Direction. + * The sort direction of the returned events. + * @return Returns the Direction + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Direction getDirection() { + return direction; + } + + /** + * Setter for Direction. + * The sort direction of the returned events. + * @param direction Value for Direction + */ + @JsonSetter("direction") + public void setDirection(Direction direction) { + this.direction = direction; + } + + /** + * Getter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @return Returns the List of EventType + */ + @JsonGetter("filter") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getFilter() { + return filter; + } + + /** + * Setter for Filter. + * You can pass multiple event keys after comma. Use in query + * `filter=signup_success,payment_success`. + * @param filter Value for List of EventType + */ + @JsonSetter("filter") + public void setFilter(List filter) { + this.filter = filter; + } + + /** + * Converts this ReadEventsCountInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ReadEventsCountInput [" + "page=" + page + ", perPage=" + perPage + ", sinceId=" + + sinceId + ", maxId=" + maxId + ", direction=" + direction + ", filter=" + filter + + "]"; + } + + /** + * Builds a new {@link ReadEventsCountInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ReadEventsCountInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .page(getPage()) + .perPage(getPerPage()) + .sinceId(getSinceId()) + .maxId(getMaxId()) + .direction(getDirection()) + .filter(getFilter()); + return builder; + } + + /** + * Class to build instances of {@link ReadEventsCountInput}. + */ + public static class Builder { + private Integer page = 1; + private Integer perPage = 20; + private Integer sinceId; + private Integer maxId; + private Direction direction = Direction.DESC; + private List filter; + + + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for sinceId. + * @param sinceId Integer value for sinceId. + * @return Builder + */ + public Builder sinceId(Integer sinceId) { + this.sinceId = sinceId; + return this; + } + + /** + * Setter for maxId. + * @param maxId Integer value for maxId. + * @return Builder + */ + public Builder maxId(Integer maxId) { + this.maxId = maxId; + return this; + } + + /** + * Setter for direction. + * @param direction Direction value for direction. + * @return Builder + */ + public Builder direction(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Setter for filter. + * @param filter List of EventType value for filter. + * @return Builder + */ + public Builder filter(List filter) { + this.filter = filter; + return this; + } + + /** + * Builds a new {@link ReadEventsCountInput} object using the set fields. + * @return {@link ReadEventsCountInput} + */ + public ReadEventsCountInput build() { + return new ReadEventsCountInput(page, perPage, sinceId, maxId, direction, filter); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ReadMetadataInput.java b/src/main/java/com/maxio/advancedbilling/models/ReadMetadataInput.java new file mode 100644 index 00000000..da9cdfbc --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ReadMetadataInput.java @@ -0,0 +1,237 @@ +/* + * 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; + +/** + * This is a model class for ReadMetadataInput type. + */ +public class ReadMetadataInput { + private ResourceType resourceType; + private String resourceId; + private Integer page; + private Integer perPage; + + /** + * Default constructor. + */ + public ReadMetadataInput() { + page = 1; + perPage = 20; + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + * @param resourceId String value for resourceId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + */ + public ReadMetadataInput( + ResourceType resourceType, + String resourceId, + Integer page, + Integer perPage) { + this.resourceType = resourceType; + this.resourceId = resourceId; + this.page = page; + this.perPage = perPage; + } + + /** + * Getter for ResourceType. + * the resource type to which the metafields belong + * @return Returns the ResourceType + */ + @JsonGetter("resource_type") + public ResourceType getResourceType() { + return resourceType; + } + + /** + * Setter for ResourceType. + * the resource type to which the metafields belong + * @param resourceType Value for ResourceType + */ + @JsonSetter("resource_type") + public void setResourceType(ResourceType resourceType) { + this.resourceType = resourceType; + } + + /** + * Getter for ResourceId. + * The Chargify id of the customer or the subscription for which the metadata applies + * @return Returns the String + */ + @JsonGetter("resource_id") + public String getResourceId() { + return resourceId; + } + + /** + * Setter for ResourceId. + * The Chargify id of the customer or the subscription for which the metadata applies + * @param resourceId Value for String + */ + @JsonSetter("resource_id") + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * 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`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Converts this ReadMetadataInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ReadMetadataInput [" + "resourceType=" + resourceType + ", resourceId=" + resourceId + + ", page=" + page + ", perPage=" + perPage + "]"; + } + + /** + * Builds a new {@link ReadMetadataInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ReadMetadataInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(resourceType, resourceId) + .page(getPage()) + .perPage(getPerPage()); + return builder; + } + + /** + * Class to build instances of {@link ReadMetadataInput}. + */ + public static class Builder { + private ResourceType resourceType; + private String resourceId; + private Integer page = 1; + private Integer perPage = 20; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param resourceType ResourceType value for resourceType. + * @param resourceId String value for resourceId. + */ + public Builder(ResourceType resourceType, String resourceId) { + this.resourceType = resourceType; + this.resourceId = resourceId; + } + + /** + * Setter for resourceType. + * @param resourceType ResourceType value for resourceType. + * @return Builder + */ + public Builder resourceType(ResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Setter for resourceId. + * @param resourceId String value for resourceId. + * @return Builder + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Builds a new {@link ReadMetadataInput} object using the set fields. + * @return {@link ReadMetadataInput} + */ + public ReadMetadataInput build() { + return new ReadMetadataInput(resourceType, resourceId, page, perPage); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ReadMrrMovementsInput.java b/src/main/java/com/maxio/advancedbilling/models/ReadMrrMovementsInput.java new file mode 100644 index 00000000..bb8b4713 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ReadMrrMovementsInput.java @@ -0,0 +1,228 @@ +/* + * 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.maxio.advancedbilling.models.containers.ReadMrrMovementsInputDirection; + +/** + * This is a model class for ReadMrrMovementsInput type. + */ +public class ReadMrrMovementsInput { + private Integer subscriptionId; + private Integer page; + private Integer perPage; + private ReadMrrMovementsInputDirection direction; + + /** + * Default constructor. + */ + public ReadMrrMovementsInput() { + page = 1; + perPage = 10; + } + + /** + * Initialization constructor. + * @param subscriptionId Integer value for subscriptionId. + * @param page Integer value for page. + * @param perPage Integer value for perPage. + * @param direction ReadMrrMovementsInputDirection value for direction. + */ + public ReadMrrMovementsInput( + Integer subscriptionId, + Integer page, + Integer perPage, + ReadMrrMovementsInputDirection direction) { + this.subscriptionId = subscriptionId; + this.page = page; + this.perPage = perPage; + this.direction = direction; + } + + /** + * Getter for SubscriptionId. + * optionally filter results by subscription + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * optionally filter results by subscription + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for Page. + * 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`. + * @return Returns the Integer + */ + @JsonGetter("page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPage() { + return page; + } + + /** + * Setter for Page. + * 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`. + * @param page Value for Integer + */ + @JsonSetter("page") + public void setPage(Integer page) { + this.page = page; + } + + /** + * Getter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 10. The + * maximum allowed values is 50; any per_page value over 50 will be changed to 50. Use in query + * `per_page=20`. + * @return Returns the Integer + */ + @JsonGetter("per_page") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPerPage() { + return perPage; + } + + /** + * Setter for PerPage. + * This parameter indicates how many records to fetch in each request. Default value is 10. The + * maximum allowed values is 50; any per_page value over 50 will be changed to 50. Use in query + * `per_page=20`. + * @param perPage Value for Integer + */ + @JsonSetter("per_page") + public void setPerPage(Integer perPage) { + this.perPage = perPage; + } + + /** + * Getter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @return Returns the ReadMrrMovementsInputDirection + */ + @JsonGetter("direction") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ReadMrrMovementsInputDirection getDirection() { + return direction; + } + + /** + * Setter for Direction. + * Controls the order in which results are returned. Use in query `direction=asc`. + * @param direction Value for ReadMrrMovementsInputDirection + */ + @JsonSetter("direction") + public void setDirection(ReadMrrMovementsInputDirection direction) { + this.direction = direction; + } + + /** + * Converts this ReadMrrMovementsInput into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ReadMrrMovementsInput [" + "subscriptionId=" + subscriptionId + ", page=" + page + + ", perPage=" + perPage + ", direction=" + direction + "]"; + } + + /** + * Builds a new {@link ReadMrrMovementsInput.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ReadMrrMovementsInput.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .subscriptionId(getSubscriptionId()) + .page(getPage()) + .perPage(getPerPage()) + .direction(getDirection()); + return builder; + } + + /** + * Class to build instances of {@link ReadMrrMovementsInput}. + */ + public static class Builder { + private Integer subscriptionId; + private Integer page = 1; + private Integer perPage = 10; + private ReadMrrMovementsInputDirection direction; + + + + /** + * Setter for subscriptionId. + * @param subscriptionId Integer value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for page. + * @param page Integer value for page. + * @return Builder + */ + public Builder page(Integer page) { + this.page = page; + return this; + } + + /** + * Setter for perPage. + * @param perPage Integer value for perPage. + * @return Builder + */ + public Builder perPage(Integer perPage) { + this.perPage = perPage; + return this; + } + + /** + * Setter for direction. + * @param direction ReadMrrMovementsInputDirection value for direction. + * @return Builder + */ + public Builder direction(ReadMrrMovementsInputDirection direction) { + this.direction = direction; + return this; + } + + /** + * Builds a new {@link ReadMrrMovementsInput} object using the set fields. + * @return {@link ReadMrrMovementsInput} + */ + public ReadMrrMovementsInput build() { + return new ReadMrrMovementsInput(subscriptionId, page, perPage, direction); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java b/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java index 2659e39a..b8a0cdb9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java +++ b/src/main/java/com/maxio/advancedbilling/models/RecurringScheme.java @@ -19,7 +19,9 @@ public enum RecurringScheme { DO_NOT_RECUR, - RECUR_INDEFINITELY; + RECUR_INDEFINITELY, + + RECUR_WITH_DURATION; private static TreeMap valueMap = new TreeMap<>(); @@ -28,9 +30,11 @@ public enum RecurringScheme { static { DO_NOT_RECUR.value = "do_not_recur"; RECUR_INDEFINITELY.value = "recur_indefinitely"; + RECUR_WITH_DURATION.value = "recur_with_duration"; valueMap.put("do_not_recur", DO_NOT_RECUR); valueMap.put("recur_indefinitely", RECUR_INDEFINITELY); + valueMap.put("recur_with_duration", RECUR_WITH_DURATION); } /** diff --git a/src/main/java/com/maxio/advancedbilling/models/SaleRepSubscription.java b/src/main/java/com/maxio/advancedbilling/models/SaleRepSubscription.java index f6a6f5fa..2e664da6 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SaleRepSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/SaleRepSubscription.java @@ -70,8 +70,19 @@ public SaleRepSubscription( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param siteName String value for siteName. + * @param subscriptionUrl String value for subscriptionUrl. + * @param customerName String value for customerName. + * @param createdAt String value for createdAt. + * @param mrr String value for mrr. + * @param usage String value for usage. + * @param recurring String value for recurring. + * @param lastPayment String value for lastPayment. + * @param churnDate String value for churnDate. */ + protected SaleRepSubscription(Integer id, String siteName, String subscriptionUrl, String customerName, String createdAt, String mrr, String usage, String recurring, String lastPayment, OptionalNullable churnDate) { diff --git a/src/main/java/com/maxio/advancedbilling/models/SegmentPrice.java b/src/main/java/com/maxio/advancedbilling/models/SegmentPrice.java index bc8d2c05..572a3fdd 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SegmentPrice.java +++ b/src/main/java/com/maxio/advancedbilling/models/SegmentPrice.java @@ -62,8 +62,17 @@ public SegmentPrice( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param componentId Integer value for componentId. + * @param startingQuantity Integer value for startingQuantity. + * @param endingQuantity Integer value for endingQuantity. + * @param unitPrice String value for unitPrice. + * @param pricePointId Integer value for pricePointId. + * @param formattedUnitPrice String value for formattedUnitPrice. + * @param segmentId Integer value for segmentId. */ + protected SegmentPrice(Integer id, Integer componentId, Integer startingQuantity, OptionalNullable endingQuantity, String unitPrice, Integer pricePointId, String formattedUnitPrice, Integer segmentId) { diff --git a/src/main/java/com/maxio/advancedbilling/models/Seller.java b/src/main/java/com/maxio/advancedbilling/models/Seller.java index 4187478e..73069b97 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Seller.java +++ b/src/main/java/com/maxio/advancedbilling/models/Seller.java @@ -46,8 +46,13 @@ public Seller( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param name String value for name. + * @param address InvoiceAddress value for address. + * @param phone String value for phone. + * @param logoUrl String value for logoUrl. */ + protected Seller(String name, InvoiceAddress address, String phone, OptionalNullable logoUrl) { this.name = name; diff --git a/src/main/java/com/maxio/advancedbilling/models/ShippingAddress.java b/src/main/java/com/maxio/advancedbilling/models/ShippingAddress.java index 9a6b50c1..66ea6a01 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ShippingAddress.java +++ b/src/main/java/com/maxio/advancedbilling/models/ShippingAddress.java @@ -54,8 +54,15 @@ public ShippingAddress( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param street String value for street. + * @param line2 String value for line2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. */ + protected ShippingAddress(OptionalNullable street, OptionalNullable line2, OptionalNullable city, OptionalNullable state, OptionalNullable zip, OptionalNullable country) { diff --git a/src/main/java/com/maxio/advancedbilling/models/Subscription.java b/src/main/java/com/maxio/advancedbilling/models/Subscription.java index f1c1e261..624e9e45 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Subscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/Subscription.java @@ -278,8 +278,71 @@ public Subscription( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param state String value for state. + * @param balanceInCents Integer value for balanceInCents. + * @param totalRevenueInCents Integer value for totalRevenueInCents. + * @param productPriceInCents Integer value for productPriceInCents. + * @param productVersionNumber Integer value for productVersionNumber. + * @param currentPeriodEndsAt String value for currentPeriodEndsAt. + * @param nextAssessmentAt String value for nextAssessmentAt. + * @param trialStartedAt String value for trialStartedAt. + * @param trialEndedAt String value for trialEndedAt. + * @param activatedAt String value for activatedAt. + * @param expiresAt String value for expiresAt. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param cancellationMessage String value for cancellationMessage. + * @param cancellationMethod SubscriptionCancellationMethod value for cancellationMethod. + * @param cancelAtEndOfPeriod Boolean value for cancelAtEndOfPeriod. + * @param canceledAt String value for canceledAt. + * @param currentPeriodStartedAt String value for currentPeriodStartedAt. + * @param previousState String value for previousState. + * @param signupPaymentId Integer value for signupPaymentId. + * @param signupRevenue String value for signupRevenue. + * @param delayedCancelAt String value for delayedCancelAt. + * @param couponCode String value for couponCode. + * @param snapDay String value for snapDay. + * @param paymentCollectionMethod SubscriptionPaymentCollectionMethod value for + * paymentCollectionMethod. + * @param customer Customer value for customer. + * @param product Product value for product. + * @param creditCard PaymentProfile value for creditCard. + * @param group SubscriptionGroup2 value for group. + * @param bankAccount SubscriptionBankAccount value for bankAccount. + * @param paymentType String value for paymentType. + * @param referralCode String value for referralCode. + * @param nextProductId Integer value for nextProductId. + * @param nextProductHandle String value for nextProductHandle. + * @param couponUseCount Integer value for couponUseCount. + * @param couponUsesAllowed Integer value for couponUsesAllowed. + * @param reasonCode String value for reasonCode. + * @param automaticallyResumeAt String value for automaticallyResumeAt. + * @param couponCodes List of String value for couponCodes. + * @param offerId Integer value for offerId. + * @param payerId Integer value for payerId. + * @param currentBillingAmountInCents Integer value for currentBillingAmountInCents. + * @param productPricePointId Integer value for productPricePointId. + * @param productPricePointType String value for productPricePointType. + * @param nextProductPricePointId Integer value for nextProductPricePointId. + * @param netTerms Integer value for netTerms. + * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. + * @param reference String value for reference. + * @param onHoldAt String value for onHoldAt. + * @param prepaidDunning Boolean value for prepaidDunning. + * @param coupons List of SubscriptionIncludedCoupon value for coupons. + * @param dunningCommunicationDelayEnabled Boolean value for dunningCommunicationDelayEnabled. + * @param dunningCommunicationDelayTimeZone String value for + * dunningCommunicationDelayTimeZone. + * @param receivesInvoiceEmails Boolean value for receivesInvoiceEmails. + * @param locale String value for locale. + * @param currency String value for currency. + * @param scheduledCancellationAt String value for scheduledCancellationAt. + * @param creditBalanceInCents Integer value for creditBalanceInCents. + * @param prepaymentBalanceInCents Integer value for prepaymentBalanceInCents. */ + protected Subscription(Integer id, String state, Integer balanceInCents, Integer totalRevenueInCents, Integer productPriceInCents, Integer productVersionNumber, String currentPeriodEndsAt, String nextAssessmentAt, @@ -1650,7 +1713,7 @@ public void unsetOfferId() { /** * Getter for PayerId. * 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. + * the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. * @return Returns the Integer */ @JsonGetter("payer_id") @@ -1662,7 +1725,7 @@ public Integer getPayerId() { /** * Setter for PayerId. * 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. + * the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. * @param payerId Value for Integer */ @JsonSetter("payer_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java index 6aa8c856..f41efde7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java @@ -147,8 +147,38 @@ public SubscriptionComponent( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param name String value for name. + * @param kind String value for kind. + * @param unitName String value for unitName. + * @param enabled Boolean value for enabled. + * @param unitBalance Integer value for unitBalance. + * @param currency String value for currency. + * @param allocatedQuantity Integer value for allocatedQuantity. + * @param pricingScheme String value for pricingScheme. + * @param componentId Integer value for componentId. + * @param componentHandle String value for componentHandle. + * @param subscriptionId Integer value for subscriptionId. + * @param recurring Boolean value for recurring. + * @param upgradeCharge String value for upgradeCharge. + * @param downgradeCredit String value for downgradeCredit. + * @param archivedAt String value for archivedAt. + * @param pricePointId Integer value for pricePointId. + * @param pricePointHandle String value for pricePointHandle. + * @param pricePointType SubscriptionComponentPricePointType value for pricePointType. + * @param pricePointName String value for pricePointName. + * @param productFamilyId Integer value for productFamilyId. + * @param productFamilyHandle String value for productFamilyHandle. + * @param createdAt String value for createdAt. + * @param updatedAt String value for updatedAt. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param description String value for description. + * @param allowFractionalQuantities Boolean value for allowFractionalQuantities. + * @param subscription SubscriptionComponentSubscription value for subscription. + * @param displayOnHostedPage Boolean value for displayOnHostedPage. */ + protected SubscriptionComponent(Integer id, String name, String kind, String unitName, Boolean enabled, Integer unitBalance, String currency, Integer allocatedQuantity, OptionalNullable pricingScheme, Integer componentId, diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupItem.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupItem.java index a5573085..8b074eef 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupItem.java @@ -70,8 +70,19 @@ public SubscriptionGroupItem( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param reference String value for reference. + * @param productId Integer value for productId. + * @param productHandle String value for productHandle. + * @param productPricePointId Integer value for productPricePointId. + * @param productPricePointHandle String value for productPricePointHandle. + * @param currency String value for currency. + * @param couponCode String value for couponCode. + * @param totalRevenueInCents Integer value for totalRevenueInCents. + * @param balanceInCents Integer value for balanceInCents. */ + protected SubscriptionGroupItem(Integer id, OptionalNullable reference, Integer productId, OptionalNullable productHandle, Integer productPricePointId, String productPricePointHandle, String currency, OptionalNullable couponCode, diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionIncludedCoupon.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionIncludedCoupon.java index d54b54b7..85aa208e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionIncludedCoupon.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionIncludedCoupon.java @@ -58,8 +58,16 @@ public SubscriptionIncludedCoupon( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param code String value for code. + * @param useCount Integer value for useCount. + * @param usesAllowed Integer value for usesAllowed. + * @param expiresAt String value for expiresAt. + * @param recurring Boolean value for recurring. + * @param amountInCents Integer value for amountInCents. + * @param percentage String value for percentage. */ + protected SubscriptionIncludedCoupon(String code, Integer useCount, Integer usesAllowed, OptionalNullable expiresAt, Boolean recurring, OptionalNullable amountInCents, OptionalNullable percentage) { diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java b/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java index 7de22a11..121f062a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java @@ -66,8 +66,18 @@ public UpdateComponent( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param handle String value for handle. + * @param name String value for name. + * @param description String value for description. + * @param accountingCode String value for accountingCode. + * @param taxable Boolean value for taxable. + * @param taxCode String value for taxCode. + * @param itemCategory ItemCategory value for itemCategory. + * @param displayOnHostedPage Boolean value for displayOnHostedPage. + * @param upgradeCharge CreditType value for upgradeCharge. */ + protected UpdateComponent(String handle, String name, OptionalNullable description, String accountingCode, Boolean taxable, OptionalNullable taxCode, ItemCategory itemCategory, Boolean displayOnHostedPage, CreditType upgradeCharge) { diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java b/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java index d47fec58..c157aeb5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateCustomer.java @@ -102,8 +102,27 @@ public UpdateCustomer( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param email String value for email. + * @param ccEmails String value for ccEmails. + * @param organization String value for organization. + * @param reference String value for reference. + * @param address String value for address. + * @param address2 String value for address2. + * @param city String value for city. + * @param state String value for state. + * @param zip String value for zip. + * @param country String value for country. + * @param phone String value for phone. + * @param locale String value for locale. + * @param vatNumber String value for vatNumber. + * @param taxExempt Boolean value for taxExempt. + * @param taxExemptReason String value for taxExemptReason. + * @param parentId Integer value for parentId. */ + 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, diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdatePaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/UpdatePaymentProfile.java index 0682bb24..1f495ea0 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdatePaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdatePaymentProfile.java @@ -82,8 +82,22 @@ public UpdatePaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param fullNumber String value for fullNumber. + * @param cardType CardType value for cardType. + * @param expirationMonth String value for expirationMonth. + * @param expirationYear String value for expirationYear. + * @param currentVault CurrentVault value for currentVault. + * @param billingAddress String value for billingAddress. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param billingAddress2 String value for billingAddress2. */ + protected UpdatePaymentProfile(String firstName, String lastName, String fullNumber, CardType cardType, String expirationMonth, String expirationYear, CurrentVault currentVault, String billingAddress, String billingCity, diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java index 5048dc02..4cc0d60a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java @@ -106,8 +106,27 @@ public UpdateSubscription( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param creditCardAttributes CreditCardAttributes value for creditCardAttributes. + * @param productHandle String value for productHandle. + * @param productId Integer value for productId. + * @param productChangeDelayed Boolean value for productChangeDelayed. + * @param nextProductId String value for nextProductId. + * @param nextProductPricePointId String value for nextProductPricePointId. + * @param snapDay UpdateSubscriptionSnapDay value for snapDay. + * @param nextBillingAt String value for nextBillingAt. + * @param paymentCollectionMethod String value for paymentCollectionMethod. + * @param receivesInvoiceEmails Boolean value for receivesInvoiceEmails. + * @param netTerms UpdateSubscriptionNetTerms value for netTerms. + * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. + * @param reference String value for reference. + * @param customPrice CustomPriceUsedForSubscriptionCreateUpdate value for customPrice. + * @param components List of UpdateSubscriptionComponent value for components. + * @param dunningCommunicationDelayEnabled Boolean value for dunningCommunicationDelayEnabled. + * @param dunningCommunicationDelayTimeZone String value for + * dunningCommunicationDelayTimeZone. */ + protected UpdateSubscription(CreditCardAttributes creditCardAttributes, String productHandle, Integer productId, Boolean productChangeDelayed, String nextProductId, String nextProductPricePointId, UpdateSubscriptionSnapDay snapDay, String nextBillingAt, diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdatedPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/UpdatedPaymentProfile.java index 0fae4221..8712e80a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdatedPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdatedPaymentProfile.java @@ -110,8 +110,29 @@ public UpdatedPaymentProfile( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param id Integer value for id. + * @param firstName String value for firstName. + * @param lastName String value for lastName. + * @param cardType String value for cardType. + * @param expirationMonth Integer value for expirationMonth. + * @param expirationYear Integer value for expirationYear. + * @param customerId Integer value for customerId. + * @param currentVault CurrentVault value for currentVault. + * @param vaultToken String value for vaultToken. + * @param billingAddress String value for billingAddress. + * @param billingAddress2 String value for billingAddress2. + * @param billingCity String value for billingCity. + * @param billingState String value for billingState. + * @param billingZip String value for billingZip. + * @param billingCountry String value for billingCountry. + * @param paymentType String value for paymentType. + * @param siteGatewaySettingId Integer value for siteGatewaySettingId. + * @param gatewayHandle String value for gatewayHandle. + * @param maskedCardNumber String value for maskedCardNumber. + * @param customerVaultToken String value for customerVaultToken. */ + protected UpdatedPaymentProfile(Integer id, String firstName, String lastName, String cardType, Integer expirationMonth, Integer expirationYear, Integer customerId, CurrentVault currentVault, String vaultToken, String billingAddress, diff --git a/src/main/java/com/maxio/advancedbilling/models/Webhook.java b/src/main/java/com/maxio/advancedbilling/models/Webhook.java index deee0986..7213f0a5 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Webhook.java +++ b/src/main/java/com/maxio/advancedbilling/models/Webhook.java @@ -78,8 +78,21 @@ public Webhook( } /** - * Internal initialization constructor. + * Initialization constructor. + * @param event String value for event. + * @param id Integer value for id. + * @param createdAt String value for createdAt. + * @param lastError String value for lastError. + * @param lastErrorAt String value for lastErrorAt. + * @param acceptedAt String value for acceptedAt. + * @param lastSentAt String value for lastSentAt. + * @param lastSentUrl String value for lastSentUrl. + * @param successful Boolean value for successful. + * @param body String value for body. + * @param signature String value for signature. + * @param signatureHmacSha256 String value for signatureHmacSha256. */ + protected Webhook(String event, Integer id, String createdAt, String lastError, String lastErrorAt, OptionalNullable acceptedAt, String lastSentAt, String lastSentUrl, Boolean successful, String body, String signature, diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsInputDirection.java similarity index 86% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsInputDirection.java index be71048e..3935a4ab 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListAllComponentPricePointsInputDirection.java @@ -24,15 +24,15 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListAllComponentPricePointsDirection.ListAllComponentPricePointsDirectionDeserializer.class) -public abstract class ListAllComponentPricePointsDirection { +@JsonDeserialize(using = ListAllComponentPricePointsInputDirection.ListAllComponentPricePointsInputDirectionDeserializer.class) +public abstract class ListAllComponentPricePointsInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListAllComponentPricePointsDirection fromSortingDirection( + public static ListAllComponentPricePointsInputDirection fromSortingDirection( SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -64,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListAllComponentPricePointsDirection { + private static class SortingDirectionCase extends ListAllComponentPricePointsInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -99,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListAllComponentPricePointsDirection. + * This is a custom deserializer class for ListAllComponentPricePointsInputDirection. */ - protected static class ListAllComponentPricePointsDirectionDeserializer - extends JsonDeserializer { + protected static class ListAllComponentPricePointsInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListAllComponentPricePointsDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListAllComponentPricePointsInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsInputDirection.java similarity index 85% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsInputDirection.java index 2eb4587d..71a13f7d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListAllProductPricePointsInputDirection.java @@ -24,15 +24,15 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListAllProductPricePointsDirection.ListAllProductPricePointsDirectionDeserializer.class) -public abstract class ListAllProductPricePointsDirection { +@JsonDeserialize(using = ListAllProductPricePointsInputDirection.ListAllProductPricePointsInputDirectionDeserializer.class) +public abstract class ListAllProductPricePointsInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListAllProductPricePointsDirection fromSortingDirection( + public static ListAllProductPricePointsInputDirection fromSortingDirection( SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -64,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListAllProductPricePointsDirection { + private static class SortingDirectionCase extends ListAllProductPricePointsInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -99,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListAllProductPricePointsDirection. + * This is a custom deserializer class for ListAllProductPricePointsInputDirection. */ - protected static class ListAllProductPricePointsDirectionDeserializer - extends JsonDeserializer { + protected static class ListAllProductPricePointsInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListAllProductPricePointsDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListAllProductPricePointsInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersInputDirection.java similarity index 84% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersInputDirection.java index a1153669..30695842 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListCustomersInputDirection.java @@ -24,15 +24,16 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListCustomersDirection.ListCustomersDirectionDeserializer.class) -public abstract class ListCustomersDirection { +@JsonDeserialize(using = ListCustomersInputDirection.ListCustomersInputDirectionDeserializer.class) +public abstract class ListCustomersInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListCustomersDirection fromSortingDirection(SortingDirection sortingDirection) { + public static ListCustomersInputDirection fromSortingDirection( + SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -63,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListCustomersDirection { + private static class SortingDirectionCase extends ListCustomersInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -98,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListCustomersDirection. + * This is a custom deserializer class for ListCustomersInputDirection. */ - protected static class ListCustomersDirectionDeserializer - extends JsonDeserializer { + protected static class ListCustomersInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListCustomersDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListCustomersInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataInputDirection.java similarity index 84% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataInputDirection.java index 6ac30062..bc69335f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListMetadataInputDirection.java @@ -24,15 +24,16 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListMetadataDirection.ListMetadataDirectionDeserializer.class) -public abstract class ListMetadataDirection { +@JsonDeserialize(using = ListMetadataInputDirection.ListMetadataInputDirectionDeserializer.class) +public abstract class ListMetadataInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListMetadataDirection fromSortingDirection(SortingDirection sortingDirection) { + public static ListMetadataInputDirection fromSortingDirection( + SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -63,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListMetadataDirection { + private static class SortingDirectionCase extends ListMetadataInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -98,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListMetadataDirection. + * This is a custom deserializer class for ListMetadataInputDirection. */ - protected static class ListMetadataDirectionDeserializer - extends JsonDeserializer { + protected static class ListMetadataInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListMetadataDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListMetadataInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsInputDirection.java similarity index 84% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsInputDirection.java index 81b66d02..62f67a35 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListMetafieldsInputDirection.java @@ -24,15 +24,16 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListMetafieldsDirection.ListMetafieldsDirectionDeserializer.class) -public abstract class ListMetafieldsDirection { +@JsonDeserialize(using = ListMetafieldsInputDirection.ListMetafieldsInputDirectionDeserializer.class) +public abstract class ListMetafieldsInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListMetafieldsDirection fromSortingDirection(SortingDirection sortingDirection) { + public static ListMetafieldsInputDirection fromSortingDirection( + SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -63,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListMetafieldsDirection { + private static class SortingDirectionCase extends ListMetafieldsInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -98,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListMetafieldsDirection. + * This is a custom deserializer class for ListMetafieldsInputDirection. */ - protected static class ListMetafieldsDirectionDeserializer - extends JsonDeserializer { + protected static class ListMetafieldsInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListMetafieldsDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListMetafieldsInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteInputDirection.java similarity index 85% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteInputDirection.java index 53a41513..f02bc401 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsForSiteInputDirection.java @@ -24,15 +24,15 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListSubscriptionComponentsForSiteDirection.ListSubscriptionComponentsForSiteDirectionDeserializer.class) -public abstract class ListSubscriptionComponentsForSiteDirection { +@JsonDeserialize(using = ListSubscriptionComponentsForSiteInputDirection.ListSubscriptionComponentsForSiteInputDirectionDeserializer.class) +public abstract class ListSubscriptionComponentsForSiteInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListSubscriptionComponentsForSiteDirection fromSortingDirection( + public static ListSubscriptionComponentsForSiteInputDirection fromSortingDirection( SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -64,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListSubscriptionComponentsForSiteDirection { + private static class SortingDirectionCase extends ListSubscriptionComponentsForSiteInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -99,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListSubscriptionComponentsForSiteDirection. + * This is a custom deserializer class for ListSubscriptionComponentsForSiteInputDirection. */ - protected static class ListSubscriptionComponentsForSiteDirectionDeserializer - extends JsonDeserializer { + protected static class ListSubscriptionComponentsForSiteInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListSubscriptionComponentsForSiteDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListSubscriptionComponentsForSiteInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsInputDirection.java similarity index 85% rename from src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsInputDirection.java index 7b11cd17..cebfcf07 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ListSubscriptionComponentsInputDirection.java @@ -24,15 +24,15 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ListSubscriptionComponentsDirection.ListSubscriptionComponentsDirectionDeserializer.class) -public abstract class ListSubscriptionComponentsDirection { +@JsonDeserialize(using = ListSubscriptionComponentsInputDirection.ListSubscriptionComponentsInputDirectionDeserializer.class) +public abstract class ListSubscriptionComponentsInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ListSubscriptionComponentsDirection fromSortingDirection( + public static ListSubscriptionComponentsInputDirection fromSortingDirection( SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -64,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ListSubscriptionComponentsDirection { + private static class SortingDirectionCase extends ListSubscriptionComponentsInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -99,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ListSubscriptionComponentsDirection. + * This is a custom deserializer class for ListSubscriptionComponentsInputDirection. */ - protected static class ListSubscriptionComponentsDirectionDeserializer - extends JsonDeserializer { + protected static class ListSubscriptionComponentsInputDirectionDeserializer + extends JsonDeserializer { @Override - public ListSubscriptionComponentsDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ListSubscriptionComponentsInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsDirection.java b/src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsInputDirection.java similarity index 85% rename from src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsDirection.java rename to src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsInputDirection.java index 629e574f..29a8e1af 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsDirection.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ReadMrrMovementsInputDirection.java @@ -24,15 +24,15 @@ /** * This is a container class for one-of types. */ -@JsonDeserialize(using = ReadMrrMovementsDirection.ReadMrrMovementsDirectionDeserializer.class) -public abstract class ReadMrrMovementsDirection { +@JsonDeserialize(using = ReadMrrMovementsInputDirection.ReadMrrMovementsInputDirectionDeserializer.class) +public abstract class ReadMrrMovementsInputDirection { /** * This is Sorting direction case. * @param sortingDirection SortingDirection value for sortingDirection. * @return The SortingDirectionCase object. */ - public static ReadMrrMovementsDirection fromSortingDirection( + public static ReadMrrMovementsInputDirection fromSortingDirection( SortingDirection sortingDirection) { return sortingDirection == null ? null : new SortingDirectionCase(sortingDirection); } @@ -64,7 +64,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "SortingDirection") - private static class SortingDirectionCase extends ReadMrrMovementsDirection { + private static class SortingDirectionCase extends ReadMrrMovementsInputDirection { @JsonValue private SortingDirection sortingDirection; @@ -99,13 +99,13 @@ public String toString() { } /** - * This is a custom deserializer class for ReadMrrMovementsDirection. + * This is a custom deserializer class for ReadMrrMovementsInputDirection. */ - protected static class ReadMrrMovementsDirectionDeserializer - extends JsonDeserializer { + protected static class ReadMrrMovementsInputDirectionDeserializer + extends JsonDeserializer { @Override - public ReadMrrMovementsDirection deserialize(JsonParser jp, DeserializationContext ctxt) + public ReadMrrMovementsInputDirection deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp);