diff --git a/LICENSE b/LICENSE index b85cedd2..4771c25c 100644 --- a/LICENSE +++ b/LICENSE @@ -3,7 +3,7 @@ License: The MIT License (MIT) http://opensource.org/licenses/MIT -Copyright (c) 2014 - 2025 APIMATIC Limited +Copyright (c) 2014 - 2026 APIMATIC Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ba8bcdf1..5fc657b1 100644 --- a/README.md +++ b/README.md @@ -32,25 +32,25 @@ Install the SDK by adding the following dependency in your project's pom.xml fil com.maxio advanced-billing-sdk - 8.0.0 + 9.0.0 ``` You can also view the package at: -https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/8.0.0 +https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/9.0.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/client.md) The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | | site | `String` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | -| environment | `Environment` | The API environment.
**Default: `Environment.US`** | -| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration-builder.md) | Set up Http Client Configuration instance. | -| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| environment | [`Environment`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| httpClientConfig | [`Consumer`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-client-configuration-builder.md) | Set up Http Client Configuration instance. | +| basicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -59,7 +59,6 @@ import com.maxio.advancedbilling.AdvancedBillingClient; import com.maxio.advancedbilling.Environment; import com.maxio.advancedbilling.authentication.BasicAuthModel; import com.maxio.advancedbilling.exceptions.ApiException; -import java.io.IOException; public class Program { public static void main(String[] args) { @@ -94,67 +93,68 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/configuration-interface.md) -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration.md) -* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-client-configuration-builder.md) -* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-proxy-configuration.md) -* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-proxy-configuration-builder.md) +* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/configuration-interface.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-client-configuration.md) +* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-client-configuration-builder.md) +* [HttpProxyConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-proxy-configuration.md) +* [HttpProxyConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-proxy-configuration-builder.md) ### HTTP -* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/headers.md) -* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-callback-interface.md) -* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-context.md) -* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-body-request.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/http-string-response.md) +* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/headers.md) +* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-callback-interface.md) +* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-context.md) +* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-body-request.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/http-string-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/api-exception.md) -* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/api-helper.md) -* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/file-wrapper.md) -* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/8.0.0/doc/date-time-helper.md) +* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/api-exception.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/api-helper.md) +* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/file-wrapper.md) +* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/9.0.0/doc/date-time-helper.md) diff --git a/doc/api-exception.md b/doc/api-exception.md index a57e999b..6f0ced5d 100644 --- a/doc/api-exception.md +++ b/doc/api-exception.md @@ -14,6 +14,6 @@ This is the base class for all exceptions that represent an error response from | Name | Description | Return Type | | --- | --- | --- | -| `getResponseCode()` | The HTTP response code from the API request | `int` | -| `getHeaders()` | The HTTP response body from the API request. | [`Headers`](../doc/headers.md) | +| `getResponseCode()` | The HTTP Response code from the API request | `int` | +| `getHttpContext()` | The HTTP Context from the API request. | [`HttpContext`](../doc/http-context.md) | diff --git a/doc/client.md b/doc/client.md index 2ec9673f..90e89856 100644 --- a/doc/client.md +++ b/doc/client.md @@ -6,7 +6,7 @@ The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | | site | `String` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | -| environment | `Environment` | The API environment.
**Default: `Environment.US`** | +| environment | [`Environment`](../README.md#environments) | The API environment.
**Default: `Environment.US`** | | httpClientConfig | [`Consumer`](../doc/http-client-configuration-builder.md) | Set up Http Client Configuration instance. | | basicAuthCredentials | [`BasicAuthCredentials`](auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | @@ -17,7 +17,6 @@ import com.maxio.advancedbilling.AdvancedBillingClient; import com.maxio.advancedbilling.Environment; import com.maxio.advancedbilling.authentication.BasicAuthModel; import com.maxio.advancedbilling.exceptions.ApiException; -import java.io.IOException; public class Program { public static void main(String[] args) { @@ -75,6 +74,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al | `getSubscriptionInvoiceAccountController()` | Provides access to SubscriptionInvoiceAccount controller. | `SubscriptionInvoiceAccountController` | | `getSubscriptionNotesController()` | Provides access to SubscriptionNotes controller. | `SubscriptionNotesController` | | `getSubscriptionProductsController()` | Provides access to SubscriptionProducts controller. | `SubscriptionProductsController` | +| `getSubscriptionRenewalsController()` | Provides access to SubscriptionRenewals controller. | `SubscriptionRenewalsController` | | `getSubscriptionStatusController()` | Provides access to SubscriptionStatus controller. | `SubscriptionStatusController` | | `getWebhooksController()` | Provides access to Webhooks controller. | `WebhooksController` | diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index 94d19678..e78609b1 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -32,7 +32,7 @@ Invoice issueAdvanceInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`IssueAdvanceInvoiceRequest`](../../doc/models/issue-advance-invoice-request.md) | Body, Optional | - | ## Response Type @@ -50,9 +50,9 @@ IssueAdvanceInvoiceRequest body = new IssueAdvanceInvoiceRequest.Builder() try { Invoice result = advanceInvoiceController.issueAdvanceInvoice(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -78,7 +78,7 @@ Invoice readAdvanceInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -94,8 +94,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -121,7 +119,7 @@ Invoice voidAdvanceInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`VoidInvoiceRequest`](../../doc/models/void-invoice-request.md) | Body, Optional | - | ## Response Type @@ -137,8 +135,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 07411777..65d302cd 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -36,9 +36,7 @@ List listExportedProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `batchId` | `String` | Template, Required | Id of a Batch Job. | -| `perPage` | `Integer` | Query, Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | -| `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` | +| `input` | [`ListExportedProformaInvoicesInput`](../../doc/models/list-exported-proforma-invoices-input.md) | Required | Input structure for the method ListExportedProformaInvoices | ## Response Type @@ -59,8 +57,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -86,9 +82,7 @@ List listExportedInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `batchId` | `String` | Template, Required | Id of a Batch Job. | -| `perPage` | `Integer` | Query, Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | -| `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` | +| `input` | [`ListExportedInvoicesInput`](../../doc/models/list-exported-invoices-input.md) | Required | Input structure for the method ListExportedInvoices | ## Response Type @@ -109,8 +103,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -136,9 +128,7 @@ List listExportedSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `batchId` | `String` | Template, Required | Id of a Batch Job. | -| `perPage` | `Integer` | Query, Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | -| `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` | +| `input` | [`ListExportedSubscriptionsInput`](../../doc/models/list-exported-subscriptions-input.md) | Required | Input structure for the method ListExportedSubscriptions | ## Response Type @@ -159,8 +149,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -191,9 +179,9 @@ BatchJobResponse exportProformaInvoices() try { BatchJobResponse result = aPIExportsController.exportProformaInvoices(); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -224,9 +212,9 @@ BatchJobResponse exportInvoices() try { BatchJobResponse result = aPIExportsController.exportInvoices(); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -257,9 +245,9 @@ BatchJobResponse exportSubscriptions() try { BatchJobResponse result = aPIExportsController.exportSubscriptions(); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -300,8 +288,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -341,8 +327,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -382,8 +366,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index aa6173cc..b4faa9e0 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -59,9 +59,9 @@ int customerId = 150; try { CustomerResponse result = billingPortalController.enableBillingPortalForCustomer(customerId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -108,9 +108,11 @@ int customerId = 150; try { PortalManagementLink result = billingPortalController.readBillingPortalLink(customerId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (TooManyManagementLinkRequestsErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -175,9 +177,9 @@ int customerId = 150; try { ResentInvitation result = billingPortalController.resendBillingPortalInvitation(customerId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -236,8 +238,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 36abadc0..683bc4db 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -14,6 +14,7 @@ ComponentPricePointsController componentPricePointsController = client.getCompon * [Create Component Price Point](../../doc/controllers/component-price-points.md#create-component-price-point) * [List Component Price Points](../../doc/controllers/component-price-points.md#list-component-price-points) * [Bulk Create Component Price Points](../../doc/controllers/component-price-points.md#bulk-create-component-price-points) +* [Clone Component Price Point](../../doc/controllers/component-price-points.md#clone-component-price-point) * [Update Component Price Point](../../doc/controllers/component-price-points.md#update-component-price-point) * [Read Component Price Point](../../doc/controllers/component-price-points.md#read-component-price-point) * [Archive Component Price Point](../../doc/controllers/component-price-points.md#archive-component-price-point) @@ -59,8 +60,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -165,9 +164,9 @@ CreateComponentPricePointRequest body = new CreateComponentPricePointRequest.Bui try { ComponentPricePointResponse result = componentPricePointsController.createComponentPricePoint(componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -198,11 +197,7 @@ ComponentPricePointsResponse listComponentPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `componentId` | `int` | Template, Required | The Advanced Billing id of the component | -| `currencyPrices` | `Boolean` | Query, Optional | Include an array of currency price data | -| `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` | -| `filterType` | [`List`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | +| `input` | [`ListComponentPricePointsInput`](../../doc/models/list-component-price-points-input.md) | Required | Input structure for the method ListComponentPricePoints | ## Response Type @@ -224,8 +219,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -370,9 +363,9 @@ CreateComponentPricePointsRequest body = new CreateComponentPricePointsRequest.B try { ComponentPricePointsResponse result = componentPricePointsController.bulkCreateComponentPricePoints(componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -433,6 +426,144 @@ try { | 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | +# Clone Component Price Point + +Clones a component price point. Custom price points (tied to a specific subscription) cannot be cloned. The following attributes are copied from the source price point: + +- Pricing scheme +- All price tiers (with starting/ending quantities and unit prices) +- Tax included setting +- Currency prices (if definitive pricing is set) +- Overage pricing (for prepaid usage components) +- Interval settings (if multi-frequency is enabled) +- Event-based billing segments (if applicable) + +```java +ComponentPricePointCurrencyOverageResponse cloneComponentPricePoint( + final CloneComponentPricePointComponentId componentId, + final CloneComponentPricePointPricePointId pricePointId, + final CloneComponentPricePointRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `componentId` | [`CloneComponentPricePointComponentId`](../../doc/models/containers/clone-component-price-point-component-id.md) | Template, Required | This is a container for one-of cases. | +| `pricePointId` | [`CloneComponentPricePointPricePointId`](../../doc/models/containers/clone-component-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. | +| `body` | [`CloneComponentPricePointRequest`](../../doc/models/clone-component-price-point-request.md) | Body, Optional | - | + +## Response Type + +[`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) + +## Example Usage + +```java +CloneComponentPricePointComponentId componentId = CloneComponentPricePointComponentId.fromNumber( + 144 +); +CloneComponentPricePointPricePointId pricePointId = CloneComponentPricePointPricePointId.fromNumber( + 188 +); +CloneComponentPricePointRequest body = new CloneComponentPricePointRequest.Builder( + new CloneComponentPricePoint.Builder( + "Pro Usage Tiered Clone" + ) + .build() +) +.build(); + +try { + ComponentPricePointCurrencyOverageResponse result = componentPricePointsController.cloneComponentPricePoint(componentId, pricePointId, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "price_point": { + "id": 9012, + "name": "Pro Usage Tiered Clone", + "type": "catalog", + "pricing_scheme": "tiered", + "component_id": 1234, + "handle": "pro-usage-tiered-clone", + "archived_at": null, + "created_at": "2024-05-01T12:34:56-04:00", + "updated_at": "2024-05-01T12:34:56-04:00", + "use_site_exchange_rate": false, + "currency_prices": [ + { + "id": 3001, + "currency": "EUR", + "price": "9.99", + "formatted_price": "€9.99", + "price_id": 4001, + "price_point_id": 9012 + } + ], + "currency_overage_prices": [ + { + "id": 3002, + "currency": "EUR", + "price": "2.50", + "formatted_price": "€2.50", + "price_id": 4002, + "price_point_id": 9012 + } + ], + "renew_prepaid_allocation": true, + "rollover_prepaid_remainder": false, + "expiration_interval": 1, + "expiration_interval_unit": "month", + "overage_pricing_scheme": "tiered", + "subscription_id": 4321, + "prices": [ + { + "id": 4001, + "component_id": 1234, + "starting_quantity": 1, + "ending_quantity": 100, + "unit_price": "9.99", + "price_point_id": 9012, + "formatted_unit_price": "$9.99", + "segment_id": null + } + ], + "overage_prices": [ + { + "id": 4002, + "component_id": 1234, + "starting_quantity": 101, + "ending_quantity": null, + "unit_price": "2.50", + "price_point_id": 9012, + "formatted_unit_price": "$2.50", + "segment_id": null + } + ], + "tax_included": false, + "interval": 1, + "interval_unit": "month" + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | `ApiException` | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + # Update Component Price Point When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones. @@ -503,9 +634,9 @@ UpdateComponentPricePointRequest body = new UpdateComponentPricePointRequest.Bui try { ComponentPricePointResponse result = componentPricePointsController.updateComponentPricePoint(componentId, pricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -522,7 +653,7 @@ try { Use this endpoint to retrieve details for a specific component price point. You can achieve this by using either the component price point ID or handle. ```java -ComponentPricePointResponse readComponentPricePoint( +ComponentPricePointCurrencyOverageResponse readComponentPricePoint( final ReadComponentPricePointComponentId componentId, final ReadComponentPricePointPricePointId pricePointId, final Boolean currencyPrices) @@ -538,7 +669,7 @@ ComponentPricePointResponse readComponentPricePoint( ## Response Type -[`ComponentPricePointResponse`](../../doc/models/component-price-point-response.md) +[`ComponentPricePointCurrencyOverageResponse`](../../doc/models/component-price-point-currency-overage-response.md) ## Example Usage @@ -551,12 +682,10 @@ ReadComponentPricePointPricePointId pricePointId = ReadComponentPricePointPriceP ); try { - ComponentPricePointResponse result = componentPricePointsController.readComponentPricePoint(componentId, pricePointId, null); + ComponentPricePointCurrencyOverageResponse result = componentPricePointsController.readComponentPricePoint(componentId, pricePointId, null); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -595,9 +724,9 @@ ArchiveComponentPricePointPricePointId pricePointId = ArchiveComponentPricePoint try { ComponentPricePointResponse result = componentPricePointsController.archiveComponentPricePoint(componentId, pricePointId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -675,8 +804,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -763,9 +890,9 @@ CreateCurrencyPricesRequest body = new CreateCurrencyPricesRequest.Builder( try { ComponentCurrencyPricesResponse result = componentPricePointsController.createCurrencyPrices(pricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -840,9 +967,9 @@ UpdateCurrencyPricesRequest body = new UpdateCurrencyPricesRequest.Builder( try { ComponentCurrencyPricesResponse result = componentPricePointsController.updateCurrencyPrices(pricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -884,11 +1011,7 @@ ListComponentsPricePointsResponse listAllComponentPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `include` | [`ListComponentsPricePointsInclude`](../../doc/models/list-components-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | +| `input` | [`ListAllComponentPricePointsInput`](../../doc/models/list-all-component-price-points-input.md) | Required | Input structure for the method ListAllComponentPricePoints | ## Response Type @@ -922,9 +1045,9 @@ ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllC try { ListComponentsPricePointsResponse result = componentPricePointsController.listAllComponentPricePoints(listAllComponentPricePointsInput); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 14e0a5d4..105ab5e1 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -80,9 +80,9 @@ CreateMeteredComponent body = new CreateMeteredComponent.Builder( try { ComponentResponse result = componentsController.createMeteredComponent(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -207,9 +207,9 @@ CreateQuantityBasedComponent body = new CreateQuantityBasedComponent.Builder( try { ComponentResponse result = componentsController.createQuantityBasedComponent(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -321,9 +321,9 @@ CreateOnOffComponent body = new CreateOnOffComponent.Builder( try { ComponentResponse result = componentsController.createOnOffComponent(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -450,9 +450,9 @@ CreatePrepaidComponent body = new CreatePrepaidComponent.Builder( try { ComponentResponse result = componentsController.createPrepaidUsageComponent(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -586,9 +586,9 @@ CreateEBBComponent body = new CreateEBBComponent.Builder( try { ComponentResponse result = componentsController.createEventBasedComponent(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -669,8 +669,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -739,8 +737,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -816,9 +812,9 @@ UpdateComponentRequest body = new UpdateComponentRequest.Builder( try { ComponentResponse result = componentsController.updateProductFamilyComponent(productFamilyId, componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -890,9 +886,9 @@ String componentId = "component_id8"; try { Component result = componentsController.archiveComponent(productFamilyId, componentId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -943,15 +939,7 @@ List listComponents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | -| `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. | -| `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. | -| `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. | -| `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | -| `includeArchived` | `Boolean` | Query, Optional | Include archived items | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | -| `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | +| `input` | [`ListComponentsInput`](../../doc/models/list-components-input.md) | Required | Input structure for the method ListComponents | ## Response Type @@ -978,8 +966,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1120,9 +1106,9 @@ UpdateComponentRequest body = new UpdateComponentRequest.Builder( try { ComponentResponse result = componentsController.updateComponent(componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1177,16 +1163,7 @@ List listComponentsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family | -| `includeArchived` | `Boolean` | Query, Optional | Include archived items. | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | -| `filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Query, Optional | Filter to use for List Components operations | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | -| `endDate` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional. | -| `startDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `startDatetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | +| `input` | [`ListComponentsForProductFamilyInput`](../../doc/models/list-components-for-product-family-input.md) | Required | Input structure for the method ListComponentsForProductFamily | ## Response Type @@ -1215,8 +1192,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 86bffbf9..dd1be3c1 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -93,9 +93,9 @@ CouponRequest body = new CouponRequest.Builder() try { CouponResponse result = couponsController.createCoupon(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -120,11 +120,7 @@ List listCouponsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | -| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | -| `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | -| `currencyPrices` | `Boolean` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | +| `input` | [`ListCouponsForProductFamilyInput`](../../doc/models/list-coupons-for-product-family-input.md) | Required | Input structure for the method ListCouponsForProductFamily | ## Response Type @@ -161,8 +157,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -293,8 +287,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -339,8 +331,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -434,9 +424,9 @@ CouponRequest body = new CouponRequest.Builder() try { CouponResponse result = couponsController.updateCoupon(productFamilyId, couponId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -511,8 +501,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -559,10 +547,7 @@ List listCoupons( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | -| `filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Query, Optional | Filter to use for List Coupons operations | -| `currencyPrices` | `Boolean` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | +| `input` | [`ListCouponsInput`](../../doc/models/list-coupons-input.md) | Required | Input structure for the method ListCoupons | ## Response Type @@ -597,8 +582,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -683,8 +666,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -772,9 +753,9 @@ String code = "code8"; try { CouponResponse result = couponsController.validateCoupon(code, null); System.out.println(result); -} catch (ApiException e) { +} catch (SingleStringErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -861,9 +842,9 @@ CouponCurrencyRequest body = new CouponCurrencyRequest.Builder( try { CouponCurrencyResponse result = couponsController.createOrUpdateCouponCurrencyPrices(couponId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorStringMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -952,8 +933,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -983,9 +962,7 @@ CouponSubcodes listCouponSubcodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `couponId` | `int` | Template, Required | The Advanced Billing id of the coupon | -| `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` | +| `input` | [`ListCouponSubcodesInput`](../../doc/models/list-coupon-subcodes-input.md) | Required | Input structure for the method ListCouponSubcodes | ## Response Type @@ -1006,8 +983,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1089,8 +1064,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1147,8 +1120,6 @@ try { couponsController.deleteCouponSubcode(couponId, subcode); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 1c691018..0a6853c0 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -82,9 +82,9 @@ CreateMetafieldsRequest body = new CreateMetafieldsRequest.Builder( try { List result = customFieldsController.createMetafields(resourceType, body); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -140,11 +140,7 @@ ListMetafieldsResponse listMetafields( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. | -| `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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `input` | [`ListMetafieldsInput`](../../doc/models/list-metafields-input.md) | Required | Input structure for the method ListMetafields | ## Response Type @@ -165,8 +161,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -253,9 +247,9 @@ ResourceType resourceType = ResourceType.SUBSCRIPTIONS; try { List result = customFieldsController.updateMetafield(resourceType, null); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -297,8 +291,6 @@ try { customFieldsController.deleteMetafield(resourceType, null); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -358,9 +350,9 @@ CreateMetadataRequest body = new CreateMetadataRequest.Builder( try { List result = customFieldsController.createMetadata(resourceType, resourceId, body); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -385,10 +377,7 @@ PaginatedMetadata listMetadata( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. | -| `resourceId` | `int` | Template, Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | -| `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` | +| `input` | [`ListMetadataInput`](../../doc/models/list-metadata-input.md) | Required | Input structure for the method ListMetadata | ## Response Type @@ -410,8 +399,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -472,9 +459,9 @@ int resourceId = 60; try { List result = customFieldsController.updateMetadata(resourceType, resourceId, null); System.out.println(result); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -520,8 +507,6 @@ try { customFieldsController.deleteMetadata(resourceType, resourceId, null, null); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -545,17 +530,7 @@ PaginatedMetadata listMetadataForResourceType( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `resourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Template, Required | The resource type to which the metafields belong. | -| `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` | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | -| `startDate` | `LocalDate` | Query, Optional | 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. | -| `endDate` | `LocalDate` | Query, Optional | 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. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | 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. | -| `endDatetime` | `ZonedDateTime` | 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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `input` | [`ListMetadataForResourceTypeInput`](../../doc/models/list-metadata-for-resource-type-input.md) | Required | Input structure for the method ListMetadataForResourceType | ## Response Type @@ -577,8 +552,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 2096d39b..e35e931c 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -88,9 +88,9 @@ CreateCustomerRequest body = new CreateCustomerRequest.Builder( try { CustomerResponse result = customersController.createCustomer(body); System.out.println(result); -} catch (ApiException e) { +} catch (CustomerErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -164,15 +164,7 @@ List listCustomers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Direction to sort customers by time of creation | -| `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`. | -| `startDate` | `String` | Query, Optional | 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. | -| `endDate` | `String` | Query, Optional | 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. | -| `startDatetime` | `String` | Query, Optional | 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. | -| `endDatetime` | `String` | Query, Optional | 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. | -| `q` | `String` | Query, Optional | A search query by which to filter customers (can be an email, an ID, a reference, organization) | +| `input` | [`ListCustomersInput`](../../doc/models/list-customers-input.md) | Required | Input structure for the method ListCustomers | ## Response Type @@ -192,8 +184,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -311,8 +301,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -391,9 +379,9 @@ UpdateCustomerRequest body = new UpdateCustomerRequest.Builder( try { CustomerResponse result = customersController.updateCustomer(id, body); System.out.println(result); -} catch (ApiException e) { +} catch (CustomerErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -465,8 +453,6 @@ try { customersController.deleteCustomer(id); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -500,8 +486,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -535,8 +519,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index dcaf4699..3c8b715e 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -82,9 +82,9 @@ CreateSegmentRequest body = new CreateSegmentRequest.Builder( try { SegmentResponse result = eventsBasedBillingSegmentsController.createSegment(componentId, pricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (EventBasedBillingSegmentErrorsException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -114,11 +114,7 @@ ListSegmentsResponse listSegmentsForPricePoint( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `componentId` | `String` | Template, Required | ID or Handle for the Component | -| `pricePointId` | `String` | Template, Required | ID or Handle for the Price Point belonging to the Component | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | -| `perPage` | `Integer` | Query, Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | -| `filter` | [`ListSegmentsFilter`](../../doc/models/list-segments-filter.md) | Query, Optional | Filter to use for List Segments for a Price Point operation | +| `input` | [`ListSegmentsForPricePointInput`](../../doc/models/list-segments-for-price-point-input.md) | Required | Input structure for the method ListSegmentsForPricePoint | ## Response Type @@ -141,9 +137,9 @@ ListSegmentsForPricePointInput listSegmentsForPricePointInput = new ListSegments try { ListSegmentsResponse result = eventsBasedBillingSegmentsController.listSegmentsForPricePoint(listSegmentsForPricePointInput); System.out.println(result); -} catch (ApiException e) { +} catch (EventBasedBillingListSegmentsErrorsException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -192,9 +188,9 @@ double id = 60D; try { SegmentResponse result = eventsBasedBillingSegmentsController.updateSegment(componentId, pricePointId, id, null); System.out.println(result); -} catch (ApiException e) { +} catch (EventBasedBillingSegmentErrorsException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -243,8 +239,6 @@ try { eventsBasedBillingSegmentsController.deleteSegment(componentId, pricePointId, id); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -291,9 +285,9 @@ String pricePointId = "price_point_id8"; try { ListSegmentsResponse result = eventsBasedBillingSegmentsController.bulkCreateSegments(componentId, pricePointId, null); System.out.println(result); -} catch (ApiException e) { +} catch (EventBasedBillingSegmentException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -341,9 +335,9 @@ String pricePointId = "price_point_id8"; try { ListSegmentsResponse result = eventsBasedBillingSegmentsController.bulkUpdateSegments(componentId, pricePointId, null); System.out.println(result); -} catch (ApiException e) { +} catch (EventBasedBillingSegmentException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 6c77156e..3851bf36 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -95,17 +95,7 @@ List listEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `sinceId` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified | -| `maxId` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | -| `filter` | [`List`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | -| `dateField` | [`ListEventsDateField`](../../doc/models/list-events-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. | -| `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. | -| `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. | -| `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. | -| `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. | +| `input` | [`ListEventsInput`](../../doc/models/list-events-input.md) | Required | Input structure for the method ListEvents | ## Response Type @@ -130,8 +120,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -221,13 +209,7 @@ List listSubscriptionEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | -| `sinceId` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified | -| `maxId` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | -| `filter` | [`List`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | +| `input` | [`ListSubscriptionEventsInput`](../../doc/models/list-subscription-events-input.md) | Required | Input structure for the method ListSubscriptionEvents | ## Response Type @@ -253,8 +235,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -315,12 +295,7 @@ CountResponse readEventsCount( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `sinceId` | `Long` | Query, Optional | Returns events with an id greater than or equal to the one specified | -| `maxId` | `Long` | Query, Optional | Returns events with an id less than or equal to the one specified | -| `direction` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | -| `filter` | [`List`](../../doc/models/event-key.md) | Query, Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | +| `input` | [`ReadEventsCountInput`](../../doc/models/read-events-count-input.md) | Required | Input structure for the method ReadEventsCount | ## Response Type @@ -344,8 +319,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index 0d3d6e84..efde0a3f 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -44,8 +44,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -100,8 +98,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -164,10 +160,7 @@ ListMRRResponse listMrrMovements( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | +| `input` | [`ListMrrMovementsInput`](../../doc/models/list-mrr-movements-input.md) | Required | Input structure for the method ListMrrMovements | ## Response Type @@ -186,8 +179,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -259,11 +250,7 @@ SubscriptionMRRResponse listMrrPerSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `filter` | [`ListMrrFilter`](../../doc/models/list-mrr-filter.md) | Query, Optional | Filter to use for List MRR per subscription operation | -| `atTime` | `String` | Query, Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | [`Direction`](../../doc/models/direction.md) | Query, Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | +| `input` | [`ListMrrPerSubscriptionInput`](../../doc/models/list-mrr-per-subscription-input.md) | Required | Input structure for the method ListMrrPerSubscription | ## Response Type @@ -289,9 +276,9 @@ ListMrrPerSubscriptionInput listMrrPerSubscriptionInput = new ListMrrPerSubscrip try { SubscriptionMRRResponse result = insightsController.listMrrPerSubscription(listMrrPerSubscriptionInput); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionsMrrErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index ee59294c..74afdd4a 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -78,9 +78,9 @@ RefundInvoiceRequest body = new RefundInvoiceRequest.Builder( try { Invoice result = invoicesController.refundInvoice(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -105,29 +105,7 @@ ListInvoicesResponse listInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `startDate` | `String` | Query, Optional | 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. | -| `endDate` | `String` | Query, Optional | 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. | -| `status` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | -| `subscriptionId` | `Integer` | Query, Optional | The subscription's ID. | -| `subscriptionGroupUid` | `String` | Query, Optional | 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. | -| `consolidationLevel` | `String` | Query, Optional | The consolidation level of the invoice. Allowed Values: none, parent, child or comma-separated lists of thereof, e.g. none,parent. | -| `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` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `Direction.DESC` | -| `lineItems` | `Boolean` | Query, Optional | Include line items data

**Default**: `false` | -| `discounts` | `Boolean` | Query, Optional | Include discounts data

**Default**: `false` | -| `taxes` | `Boolean` | Query, Optional | Include taxes data

**Default**: `false` | -| `credits` | `Boolean` | Query, Optional | Include credits data

**Default**: `false` | -| `payments` | `Boolean` | Query, Optional | Include payments data

**Default**: `false` | -| `customFields` | `Boolean` | Query, Optional | Include custom fields data

**Default**: `false` | -| `refunds` | `Boolean` | Query, Optional | Include refunds data

**Default**: `false` | -| `dateField` | [`InvoiceDateField`](../../doc/models/invoice-date-field.md) | Query, Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `InvoiceDateField.DUE_DATE` | -| `startDatetime` | `String` | Query, Optional | 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. | -| `endDatetime` | `String` | Query, Optional | 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. | -| `customerIds` | `List` | Query, Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | -| `number` | `List` | Query, Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | -| `productIds` | `List` | Query, Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | -| `sort` | [`InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Query, Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.

**Default**: `InvoiceSortField.NUMBER` | +| `input` | [`ListInvoicesInput`](../../doc/models/list-invoices-input.md) | Required | Input structure for the method ListInvoices | ## Response Type @@ -169,8 +147,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -490,8 +466,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -641,13 +615,7 @@ ListInvoiceEventsResponse listInvoiceEvents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `sinceDate` | `String` | Query, Optional | 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. | -| `sinceId` | `Long` | Query, Optional | 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. | -| `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 100. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `100` | -| `invoiceUid` | `String` | Query, Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | -| `withChangeInvoiceStatus` | `String` | Query, Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | -| `eventTypes` | [`List`](../../doc/models/invoice-event-type.md) | Query, Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | +| `input` | [`ListInvoiceEventsInput`](../../doc/models/list-invoice-events-input.md) | Required | Input structure for the method ListInvoiceEvents | ## Response Type @@ -666,8 +634,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1095,9 +1061,9 @@ CreateInvoicePaymentRequest body = new CreateInvoicePaymentRequest.Builder( try { Invoice result = invoicesController.recordPaymentForInvoice(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1184,9 +1150,9 @@ CreateMultiInvoicePaymentRequest body = new CreateMultiInvoicePaymentRequest.Bui try { MultiInvoicePaymentResponse result = invoicesController.recordPaymentForMultipleInvoices(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1237,14 +1203,7 @@ ListCreditNotesResponse listCreditNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `Integer` | Query, Optional | The subscription's Advanced Billing id | -| `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` | -| `lineItems` | `Boolean` | Query, Optional | Include line items data

**Default**: `false` | -| `discounts` | `Boolean` | Query, Optional | Include discounts data

**Default**: `false` | -| `taxes` | `Boolean` | Query, Optional | Include taxes data

**Default**: `false` | -| `refunds` | `Boolean` | Query, Optional | Include refunds data

**Default**: `false` | -| `applications` | `Boolean` | Query, Optional | Include applications data

**Default**: `false` | +| `input` | [`ListCreditNotesInput`](../../doc/models/list-credit-notes-input.md) | Required | Input structure for the method ListCreditNotes | ## Response Type @@ -1268,8 +1227,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1604,8 +1561,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1939,7 +1894,7 @@ RecordPaymentResponse recordPaymentForSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`RecordPaymentRequest`](../../doc/models/record-payment-request.md) | Body, Optional | - | ## Response Type @@ -1964,9 +1919,9 @@ RecordPaymentRequest body = new RecordPaymentRequest.Builder( try { RecordPaymentResponse result = invoicesController.recordPaymentForSubscription(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2038,9 +1993,9 @@ String uid = "uid0"; try { Invoice result = invoicesController.reopenInvoice(uid); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2089,9 +2044,9 @@ VoidInvoiceRequest body = new VoidInvoiceRequest.Builder( try { Invoice result = invoicesController.voidInvoice(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2117,10 +2072,7 @@ ConsolidatedInvoice listConsolidatedInvoiceSegments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `invoiceUid` | `String` | Template, Required | The unique identifier of the consolidated invoice | -| `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` | [`Direction`](../../doc/models/direction.md) | Query, Optional | Sort direction of the returned segments.

**Default**: `Direction.ASC` | +| `input` | [`ListConsolidatedInvoiceSegmentsInput`](../../doc/models/list-consolidated-invoice-segments-input.md) | Required | Input structure for the method ListConsolidatedInvoiceSegments | ## Response Type @@ -2142,8 +2094,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -2641,7 +2591,7 @@ InvoiceResponse createInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`CreateInvoiceRequest`](../../doc/models/create-invoice-request.md) | Body, Optional | - | ## Response Type @@ -2672,9 +2622,9 @@ CreateInvoiceRequest body = new CreateInvoiceRequest.Builder( try { InvoiceResponse result = invoicesController.createInvoice(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2787,6 +2737,8 @@ try { This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. +**File Attachments**: You can attach files to invoice emails using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When using attachments, the request must use `multipart/form-data` content type. Max 10 files, 10MB per file. + If no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address. On success, a 204 no-content response will be returned. The response does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned. @@ -2826,9 +2778,9 @@ SendInvoiceRequest body = new SendInvoiceRequest.Builder() try { invoicesController.sendInvoice(uid, body); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2869,9 +2821,9 @@ String uid = "uid0"; try { CustomerChangesPreviewResponse result = invoicesController.previewCustomerInformationChanges(uid); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -2966,9 +2918,9 @@ String uid = "uid0"; try { Invoice result = invoicesController.updateCustomerInformation(uid); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -3171,7 +3123,7 @@ try { # Issue Invoice -This endpoint allows you to issue an invoice that is in "pending" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. +This endpoint allows you to issue an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. You cannot issue a pending child invoice that was created for a member subscription in a group. @@ -3211,9 +3163,9 @@ IssueInvoiceRequest body = new IssueInvoiceRequest.Builder() try { Invoice result = invoicesController.issueInvoice(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index a08a0cc2..5c2d05d7 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -75,9 +75,9 @@ CreateOfferRequest body = new CreateOfferRequest.Builder( try { OfferResponse result = offersController.createOffer(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -144,9 +144,7 @@ ListOffersResponse listOffers( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `includeArchived` | `Boolean` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | +| `input` | [`ListOffersInput`](../../doc/models/list-offers-input.md) | Required | Input structure for the method ListOffers | ## Response Type @@ -164,9 +162,9 @@ ListOffersInput listOffersInput = new ListOffersInput.Builder() try { ListOffersResponse result = offersController.listOffers(listOffersInput); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -262,8 +260,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -296,8 +292,6 @@ try { offersController.archiveOffer(offerId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -330,8 +324,6 @@ try { offersController.unarchiveOffer(offerId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index 4395df63..c1619f81 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -134,9 +134,9 @@ CreatePaymentProfileRequest body = new CreatePaymentProfileRequest.Builder( try { PaymentProfileResponse result = paymentProfilesController.createPaymentProfile(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -191,9 +191,7 @@ List listPaymentProfiles( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `customerId` | `Integer` | Query, Optional | The ID of the customer for which you wish to list payment profiles | +| `input` | [`ListPaymentProfilesInput`](../../doc/models/list-payment-profiles-input.md) | Required | Input structure for the method ListPaymentProfiles | ## Response Type @@ -212,8 +210,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -346,8 +342,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -464,9 +458,9 @@ UpdatePaymentProfileRequest body = new UpdatePaymentProfileRequest.Builder( try { PaymentProfileResponse result = paymentProfilesController.updatePaymentProfile(paymentProfileId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorStringMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -526,9 +520,9 @@ int paymentProfileId = 198; try { paymentProfilesController.deleteUnusedPaymentProfile(paymentProfileId); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -543,7 +537,7 @@ try { # Delete Subscriptions Payment Profile -This will delete a payment profile belonging to the customer on the subscription. +Deletes a payment profile belonging to the customer on the subscription. + If the customer has multiple subscriptions, the payment profile will be removed from all of them. @@ -559,7 +553,7 @@ Void deleteSubscriptionsPaymentProfile( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `paymentProfileId` | `int` | Template, Required | The Chargify id of the payment profile | ## Response Type @@ -576,8 +570,6 @@ try { paymentProfilesController.deleteSubscriptionsPaymentProfile(subscriptionId, paymentProfileId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -618,9 +610,9 @@ BankAccountVerificationRequest body = new BankAccountVerificationRequest.Builder try { BankAccountResponse result = paymentProfilesController.verifyBankAccount(bankAccountId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -663,7 +655,7 @@ try { # Delete Subscription Group Payment Profile -This will delete a Payment Profile belonging to a Subscription Group. +Deletes a Payment Profile belonging to a Subscription Group. **Note**: If the Payment Profile belongs to multiple Subscription Groups and/or Subscriptions, it will be removed from all of them. @@ -694,8 +686,6 @@ try { paymentProfilesController.deleteSubscriptionGroupPaymentProfile(uid, paymentProfileId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -716,7 +706,7 @@ PaymentProfileResponse changeSubscriptionDefaultPaymentProfile( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `paymentProfileId` | `int` | Template, Required | The Chargify id of the payment profile | ## Response Type @@ -732,9 +722,9 @@ int paymentProfileId = 198; try { PaymentProfileResponse result = paymentProfilesController.changeSubscriptionDefaultPaymentProfile(subscriptionId, paymentProfileId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -810,9 +800,9 @@ int paymentProfileId = 198; try { PaymentProfileResponse result = paymentProfilesController.changeSubscriptionGroupDefaultPaymentProfile(uid, paymentProfileId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -884,9 +874,9 @@ String chargifyToken = "chargify_token8"; try { GetOneTimeTokenRequest result = paymentProfilesController.readOneTimeToken(chargifyToken); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -917,7 +907,7 @@ Void sendRequestUpdatePaymentEmail( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -930,9 +920,9 @@ int subscriptionId = 222; try { paymentProfilesController.sendRequestUpdatePaymentEmail(subscriptionId); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 26495f47..4cebbc8e 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -29,17 +29,7 @@ List listProductsForProductFamily( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `productFamilyId` | `String` | Template, Required | Either the product family's id or its handle prefixed with `handle:` | -| `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` | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | -| `filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | -| `startDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `endDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | -| `endDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | -| `includeArchived` | `Boolean` | Query, Optional | Include archived products | -| `include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | +| `input` | [`ListProductsForProductFamilyInput`](../../doc/models/list-products-for-product-family-input.md) | Required | Input structure for the method ListProductsForProductFamily | ## Response Type @@ -69,8 +59,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -216,9 +204,9 @@ CreateProductFamilyRequest body = new CreateProductFamilyRequest.Builder( try { ProductFamilyResponse result = productFamiliesController.createProductFamily(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -257,11 +245,7 @@ List listProductFamilies( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | -| `startDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `endDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | -| `endDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | +| `input` | [`ListProductFamiliesInput`](../../doc/models/list-product-families-input.md) | Required | Input structure for the method ListProductFamilies | ## Response Type @@ -279,8 +263,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -296,7 +278,8 @@ try { "handle": "acme-projects", "accounting_code": null, "created_at": "2013-02-20T15:05:51-07:00", - "updated_at": "2013-02-20T15:05:51-07:00" + "updated_at": "2013-02-20T15:05:51-07:00", + "archived_at": null } }, { @@ -307,7 +290,8 @@ try { "handle": "bat-family", "accounting_code": null, "created_at": "2014-04-16T12:41:13-06:00", - "updated_at": "2014-04-16T12:41:13-06:00" + "updated_at": "2014-04-16T12:41:13-06:00", + "archived_at": "2024-11-05T09:30:00-07:00" } } ] @@ -345,8 +329,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -359,7 +341,8 @@ try { "name": "Acme Projects", "description": "", "handle": "billing-plans", - "accounting_code": null + "accounting_code": null, + "archived_at": null } } ``` diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 79bcec9d..4a9ab376 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -73,9 +73,9 @@ CreateProductPricePointRequest body = new CreateProductPricePointRequest.Builder try { ProductPricePointResponse result = productPricePointsController.createProductPricePoint(productId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ProductPricePointErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -127,12 +127,7 @@ ListProductPricePointsResponse listProductPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `productId` | [`ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Template, Required | 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 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `10`

**Constraints**: `<= 200` | -| `currencyPrices` | `Boolean` | Query, Optional | 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. | -| `filterType` | [`List`](../../doc/models/price-point-type.md) | Query, Optional | Use in query: `filter[type]=catalog,default`. | -| `archived` | `Boolean` | Query, Optional | Set to include archived price points in the response. | +| `input` | [`ListProductPricePointsInput`](../../doc/models/list-product-price-points-input.md) | Required | Input structure for the method ListProductPricePoints | ## Response Type @@ -156,8 +151,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -238,8 +231,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -309,8 +300,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -376,9 +365,9 @@ ArchiveProductPricePointPricePointId pricePointId = ArchiveProductPricePointPric try { ProductPricePointResponse result = productPricePointsController.archiveProductPricePoint(productId, pricePointId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -449,8 +438,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -516,8 +503,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -643,8 +628,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -740,9 +723,9 @@ CreateProductCurrencyPricesRequest body = new CreateProductCurrencyPricesRequest try { CurrencyPricesResponse result = productPricePointsController.createProductCurrencyPrices(productPricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -819,9 +802,9 @@ UpdateCurrencyPricesRequest body = new UpdateCurrencyPricesRequest.Builder( try { CurrencyPricesResponse result = productPricePointsController.updateProductCurrencyPrices(productPricePointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -863,11 +846,7 @@ ListProductPricePointsResponse listAllProductPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Query, Optional | Filter to use for List PricePoints operations | -| `include` | [`ListProductsPricePointsInclude`](../../doc/models/list-products-price-points-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | +| `input` | [`ListAllProductPricePointsInput`](../../doc/models/list-all-product-price-points-input.md) | Required | Input structure for the method ListAllProductPricePoints | ## Response Type @@ -901,9 +880,9 @@ ListAllProductPricePointsInput listAllProductPricePointsInput = new ListAllProdu try { ListProductPricePointsResponse result = productPricePointsController.listAllProductPricePoints(listAllProductPricePointsInput); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 759984a0..f1afe6e1 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -68,9 +68,9 @@ CreateOrUpdateProductRequest body = new CreateOrUpdateProductRequest.Builder( try { ProductResponse result = productsController.createProduct(productFamilyId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -160,8 +160,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -245,9 +243,9 @@ int productId = 202; try { ProductResponse result = productsController.updateProduct(productId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -336,9 +334,9 @@ int productId = 202; try { ProductResponse result = productsController.archiveProduct(productId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -422,8 +420,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -509,16 +505,7 @@ List listProducts( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `dateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Query, Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | -| `filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Query, Optional | Filter to use for List Products operations | -| `endDate` | `LocalDate` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `endDatetime` | `ZonedDateTime` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | -| `startDate` | `LocalDate` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `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` | -| `includeArchived` | `Boolean` | Query, Optional | Include archived products. Use in query: `include_archived=true`. | -| `include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | +| `input` | [`ListProductsInput`](../../doc/models/list-products-input.md) | Required | Input structure for the method ListProducts | ## Response Type @@ -547,8 +534,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 069768ae..d04b57dd 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -15,6 +15,7 @@ ProformaInvoicesController proformaInvoicesController = client.getProformaInvoic * [Read Proforma Invoice](../../doc/controllers/proforma-invoices.md#read-proforma-invoice) * [Create Proforma Invoice](../../doc/controllers/proforma-invoices.md#create-proforma-invoice) * [List Proforma Invoices](../../doc/controllers/proforma-invoices.md#list-proforma-invoices) +* [Deliver Proforma Invoice](../../doc/controllers/proforma-invoices.md#deliver-proforma-invoice) * [Void Proforma Invoice](../../doc/controllers/proforma-invoices.md#void-proforma-invoice) * [Preview Proforma Invoice](../../doc/controllers/proforma-invoices.md#preview-proforma-invoice) * [Create Signup Proforma Invoice](../../doc/controllers/proforma-invoices.md#create-signup-proforma-invoice) @@ -53,9 +54,9 @@ String uid = "uid0"; try { proformaInvoicesController.createConsolidatedProformaInvoice(uid); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -82,13 +83,7 @@ ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `String` | Template, Required | The uid of the subscription group | -| `lineItems` | `Boolean` | Query, Optional | Include line items data

**Default**: `false` | -| `discounts` | `Boolean` | Query, Optional | Include discounts data

**Default**: `false` | -| `taxes` | `Boolean` | Query, Optional | Include taxes data

**Default**: `false` | -| `credits` | `Boolean` | Query, Optional | Include credits data

**Default**: `false` | -| `payments` | `Boolean` | Query, Optional | Include payments data

**Default**: `false` | -| `customFields` | `Boolean` | Query, Optional | Include custom fields data

**Default**: `false` | +| `input` | [`ListSubscriptionGroupProformaInvoicesInput`](../../doc/models/list-subscription-group-proforma-invoices-input.md) | Required | Input structure for the method ListSubscriptionGroupProformaInvoices | ## Response Type @@ -113,8 +108,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -158,8 +151,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -189,7 +180,7 @@ ProformaInvoice createProformaInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -203,9 +194,9 @@ int subscriptionId = 222; try { ProformaInvoice result = proformaInvoicesController.createProformaInvoice(subscriptionId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -230,19 +221,7 @@ ListProformaInvoicesResponse listProformaInvoices( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `startDate` | `String` | Query, Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | -| `endDate` | `String` | Query, Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | -| `status` | [`ProformaInvoiceStatus`](../../doc/models/proforma-invoice-status.md) | Query, Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | -| `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` | [`Direction`](../../doc/models/direction.md) | Query, Optional | The sort direction of the returned invoices.

**Default**: `Direction.DESC` | -| `lineItems` | `Boolean` | Query, Optional | Include line items data

**Default**: `false` | -| `discounts` | `Boolean` | Query, Optional | Include discounts data

**Default**: `false` | -| `taxes` | `Boolean` | Query, Optional | Include taxes data

**Default**: `false` | -| `credits` | `Boolean` | Query, Optional | Include credits data

**Default**: `false` | -| `payments` | `Boolean` | Query, Optional | Include payments data

**Default**: `false` | -| `customFields` | `Boolean` | Query, Optional | Include custom fields data

**Default**: `false` | +| `input` | [`ListProformaInvoicesInput`](../../doc/models/list-proforma-invoices-input.md) | Required | Input structure for the method ListProformaInvoices | ## Response Type @@ -270,11 +249,69 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { +} +``` + + +# Deliver Proforma Invoice + +Allows for proforma invoices to be programmatically delivered via email. Supports email +delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. + +If `recipient_emails` is omitted, the system will fall back to the primary recipient derived from the invoice or +subscription. At least one recipient must be present, either via the request body or via this default behavior, so an +empty body may still succeed when defaults are available. + +```java +ProformaInvoice deliverProformaInvoice( + final String proformaInvoiceUid, + final DeliverProformaInvoiceRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `proformaInvoiceUid` | `String` | Template, Required | The uid of the proforma invoice | +| `body` | [`DeliverProformaInvoiceRequest`](../../doc/models/deliver-proforma-invoice-request.md) | Body, Optional | - | + +## Response Type + +[`ProformaInvoice`](../../doc/models/proforma-invoice.md) + +## Example Usage + +```java +String proformaInvoiceUid = "proforma_invoice_uid4"; +DeliverProformaInvoiceRequest body = new DeliverProformaInvoiceRequest.Builder() + .recipientEmails(Arrays.asList( + "user0@example.com" + )) + .ccRecipientEmails(Arrays.asList( + "user1@example.com" + )) + .bccRecipientEmails(Arrays.asList( + "user2@example.com" + )) + .build(); + +try { + ProformaInvoice result = proformaInvoicesController.deliverProformaInvoice(proformaInvoiceUid, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { e.printStackTrace(); } ``` +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | `ApiException` | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + # Void Proforma Invoice @@ -312,9 +349,9 @@ String proformaInvoiceUid = "proforma_invoice_uid4"; try { ProformaInvoice result = proformaInvoicesController.voidProformaInvoice(proformaInvoiceUid, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -346,7 +383,7 @@ ProformaInvoice previewProformaInvoice( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -360,9 +397,9 @@ int subscriptionId = 222; try { ProformaInvoice result = proformaInvoicesController.previewProformaInvoice(subscriptionId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -418,9 +455,11 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder( try { ProformaInvoice result = proformaInvoicesController.createSignupProformaInvoice(body); System.out.println(result); -} catch (ApiException e) { +} catch (ProformaBadRequestErrorResponseException e) { + e.printStackTrace(); +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -478,9 +517,11 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder( try { SignupProformaPreviewResponse result = proformaInvoicesController.previewSignupProformaInvoice(null, body); System.out.println(result); -} catch (ApiException e) { +} catch (ProformaBadRequestErrorResponseException e) { + e.printStackTrace(); +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index b4f50e22..2238f0a4 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -66,9 +66,9 @@ CreateReasonCodeRequest body = new CreateReasonCodeRequest.Builder( try { ReasonCodeResponse result = reasonCodesController.createReasonCode(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -93,8 +93,7 @@ List listReasonCodes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | +| `input` | [`ListReasonCodesInput`](../../doc/models/list-reason-codes-input.md) | Required | Input structure for the method ListReasonCodes | ## Response Type @@ -111,9 +110,9 @@ ListReasonCodesInput listReasonCodesInput = new ListReasonCodesInput.Builder() try { List result = reasonCodesController.listReasonCodes(listReasonCodesInput); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -194,8 +193,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -234,9 +231,9 @@ int reasonCodeId = 32; try { ReasonCodeResponse result = reasonCodesController.updateReasonCode(reasonCodeId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -278,8 +275,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index 3ebe315f..f0a33091 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -44,9 +44,9 @@ String code = "code8"; try { ReferralValidationResponse result = referralCodesController.validateReferralCode(code); System.out.println(result); -} catch (ApiException e) { +} catch (SingleStringErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index c2d7cd5d..be40a243 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -36,11 +36,7 @@ List listSalesCommissionSettings( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `sellerId` | `String` | Template, Required | The Chargify id of your seller account | -| `authorization` | `String` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `"Bearer <>"` | -| `liveMode` | `Boolean` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `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 100.

**Default**: `100` | +| `input` | [`ListSalesCommissionSettingsInput`](../../doc/models/list-sales-commission-settings-input.md) | Required | Input structure for the method ListSalesCommissionSettings | ## Response Type @@ -62,8 +58,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -123,11 +117,7 @@ List listSalesReps( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `sellerId` | `String` | Template, Required | The Chargify id of your seller account | -| `authorization` | `String` | Header, Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `"Bearer <>"` | -| `liveMode` | `Boolean` | Query, Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | -| `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 100.

**Default**: `100` | +| `input` | [`ListSalesRepsInput`](../../doc/models/list-sales-reps-input.md) | Required | Input structure for the method ListSalesReps | ## Response Type @@ -149,8 +139,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -289,8 +277,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index 26267d81..9c7be121 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -50,8 +50,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -137,8 +135,6 @@ try { sitesController.clearSite(cleanupScope); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -156,8 +152,7 @@ ListPublicKeysResponse listChargifyJsPublicKeys( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | +| `input` | [`ListChargifyJsPublicKeysInput`](../../doc/models/list-chargify-js-public-keys-input.md) | Required | Input structure for the method ListChargifyJsPublicKeys | ## Response Type @@ -176,8 +171,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index e07599b9..c0ec9afa 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -43,7 +43,7 @@ SubscriptionComponentResponse readSubscriptionComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component. Alternatively, the component's handle prefixed by `handle:` | ## Response Type @@ -61,8 +61,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -109,19 +107,7 @@ List listSubscriptionComponents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `dateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Use in query `date_field=updated_at`. | -| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filter` | [`ListSubscriptionComponentsFilter`](../../doc/models/list-subscription-components-filter.md) | Query, Optional | Filter to use for List Subscription Components operation | -| `endDate` | `String` | Query, Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `endDatetime` | `String` | Query, Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | -| `pricePointIds` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | -| `productFamilyIds` | `List` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | -| `sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Query, Optional | The attribute by which to sort. Use in query `sort=updated_at`. | -| `startDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | -| `startDatetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | -| `include` | [`List`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | -| `inUse` | `Boolean` | Query, Optional | If in_use is set to true, it returns only components that are currently in use. However, if it's set to false or not provided, it returns all components connected with the subscription. | +| `input` | [`ListSubscriptionComponentsInput`](../../doc/models/list-subscription-components-input.md) | Required | Input structure for the method ListSubscriptionComponents | ## Response Type @@ -159,8 +145,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -214,7 +198,7 @@ BulkComponentsPricePointAssignment bulkUpdateSubscriptionComponentsPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`BulkComponentsPricePointAssignment`](../../doc/models/bulk-components-price-point-assignment.md) | Body, Optional | - | ## Response Type @@ -251,9 +235,9 @@ BulkComponentsPricePointAssignment body = new BulkComponentsPricePointAssignment try { BulkComponentsPricePointAssignment result = subscriptionComponentsController.bulkUpdateSubscriptionComponentsPricePoints(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ComponentPricePointErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -297,7 +281,7 @@ SubscriptionResponse bulkResetSubscriptionComponentsPricePoints( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -313,8 +297,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -421,41 +403,13 @@ try { # Allocate Component -This endpoint creates a new allocation, setting the current allocated quantity for the Component and recording a memo. - -**Notice**: Allocations can only be updated for Quantity, On/Off, and Prepaid Components. - -## Allocations Documentation - -Full documentation on how to record Allocations in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview). It is focused on how allocations operate within the Advanced Billing UI.It goes into greater detail on how the user interface will react when recording allocations. +Creates an allocation, sets the current allocated quantity for the component, and records a memo. Allocations can only be updated for Quantity, On/Off, and Prepaid Components. -This documentation also goes into greater detail on how proration is taken into consideration when applying component allocations. +When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. -## Proration Schemes +> **Note:** These proration and accural fields are ignored for Prepaid Components since this component type always generate charges immediately without proration. -Changing the allocated quantity of a component mid-period can result in either a Charge or Credit being applied to the subscription. When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied. - -**Notice:** These proration and accural fields will be ignored for Prepaid Components since this component type always generate charges immediately without proration. - -For background information on prorated components and upgrade/downgrade schemes, see [Setting Component Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration). -See the tables below for valid values. - -| upgrade_charge | Definition                                                        | -|----------------|-------------------------------------------------------------------| -| `full`         | A charge is added for the full price of the component.            | -| `prorated`     | A charge is added for the prorated price of the component change. | -| `none`         | No charge is added.                                               | - -| downgrade_credit | Definition                                        | -|------------------|---------------------------------------------------| -| `full`           | A full price credit is added for the amount owed. | -| `prorated`       | A prorated credit is added for the amount owed.   | -| `none`           | No charge is added.                               | - -| accrue_charge | Definition                                                                                               | -|---------------|------------------------------------------------------------------------------------------------------------| -| `true`        | Attempt to charge the customer at next renewal. | -| `false`       | Attempt to charge the customer right away. If it fails, the charge will be accrued until the next renewal. | +For information on prorated components and upgrade/downgrade schemes, see [Setting Component Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) ### Order of Resolution for upgrade_charge and downgrade_credit @@ -469,7 +423,9 @@ See the tables below for valid values. 1. Allocation API call top level (outside of the `allocations` array) 2. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) -**NOTE: Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong.** +> **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. + +For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. ```java AllocationResponse allocateComponent( @@ -482,7 +438,7 @@ AllocationResponse allocateComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | | `body` | [`CreateAllocationRequest`](../../doc/models/create-allocation-request.md) | Body, Optional | - | @@ -497,9 +453,60 @@ int subscriptionId = 222; int componentId = 222; CreateAllocationRequest body = new CreateAllocationRequest.Builder( new CreateAllocation.Builder( - 5D + 10D ) - .memo("Recoding component purchase of Acme Support") + .decimalQuantity("10.0") + .previousQuantity(5D) + .decimalPreviousQuantity("5.0") + .memo("Increase seats to 10") + .prorationDowngradeScheme("prorate") + .prorationUpgradeScheme("full-price-attempt-capture") + .downgradeCredit(DowngradeCreditCreditType.PRORATED) + .upgradeCharge(UpgradeChargeCreditType.FULL) + .accrueCharge(false) + .pricePointId(CreateAllocationPricePointId.fromNumber( + 789 + )) + .billingSchedule(new BillingSchedule.Builder() + .initialBillingAt(DateTimeHelper.fromSimpleDate("2025-02-28")) + .build()) + .customPrice(new ComponentCustomPrice.Builder( + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 1 + ), + PriceUnitPrice.fromString( + "49.00" + ) + ) + .endingQuantity(PriceEndingQuantity.fromNumber( + 25 + )) + .build(), + new Price.Builder( + PriceStartingQuantity.fromNumber( + 26 + ), + PriceUnitPrice.fromString( + "39.00" + ) + ) + .endingQuantity(null) + .build() + ) + ) + .taxIncluded(false) + .pricingScheme(PricingScheme.PER_UNIT) + .interval(1) + .intervalUnit(IntervalUnit.MONTH) + .listPricePointId(4321) + .useDefaultListPrice(false) + .renewPrepaidAllocation(false) + .rolloverPrepaidRemainder(false) + .expirationInterval(150) + .expirationIntervalUnit(ExpirationIntervalUnit.NEVER) + .build()) .build() ) .build(); @@ -507,9 +514,9 @@ CreateAllocationRequest body = new CreateAllocationRequest.Builder( try { AllocationResponse result = subscriptionComponentsController.allocateComponent(subscriptionId, componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -557,21 +564,6 @@ This endpoint returns the 50 most recent Allocations, ordered by most recent fir When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will be logged in this response. -## Querying data via Advanced Billing gem - -You can also query the current quantity via the [official Advanced Billing Gem.](http://github.com/chargify/chargify_api_ares) - -```# First way -component = Chargify::Subscription::Component.find(1, :params => {:subscription_id => 7}) -puts component.allocated_quantity -# => 23 - -# Second way -component = Chargify::Subscription.find(7).component(1) -puts component.allocated_quantity -# => 23 -``` - ```java List listAllocations( final int subscriptionId, @@ -583,7 +575,7 @@ List listAllocations( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | @@ -601,9 +593,9 @@ Integer page = 1; try { List result = subscriptionComponentsController.listAllocations(subscriptionId, componentId, page); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -663,11 +655,25 @@ try { # Allocate Components -Creates multiple allocations, setting the current allocated quantity for each of the components and recording a memo. The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. Be aware of the Order of Resolutions explained below in determining the proration scheme. +Creates multiple allocations, sets the current allocated quantity for each of the components, and recording a memo. A `component_id` is required for each allocation. -A `component_id` is required for each allocation. +The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. -This endpoint only responds to JSON. It is not available for XML. +### Order of Resolution for upgrade_charge and downgrade_credit + +1. Per allocation in API call (within a single allocation of the `allocations` array) +2. [Component-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) +3. Allocation API call top level (outside of the `allocations` array) +4. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) + +### Order of Resolution for accrue charge + +1. Allocation API call top level (outside of the `allocations` array) +2. [Site-level default value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) + +> **Note:** Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong. + +For more informaiton see the [Component Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) product Documentation. ```java List allocateComponents( @@ -679,7 +685,7 @@ List allocateComponents( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`AllocateComponents`](../../doc/models/allocate-components.md) | Body, Optional | - | ## Response Type @@ -712,9 +718,9 @@ AllocateComponents body = new AllocateComponents.Builder() try { List result = subscriptionComponentsController.allocateComponents(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -790,7 +796,7 @@ AllocationPreviewResponse previewAllocations( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`PreviewAllocationsRequest`](../../doc/models/preview-allocations-request.md) | Body, Optional | - | ## Response Type @@ -822,9 +828,9 @@ PreviewAllocationsRequest body = new PreviewAllocationsRequest.Builder( try { AllocationPreviewResponse result = subscriptionComponentsController.previewAllocations(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ComponentAllocationErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -965,7 +971,7 @@ Void updatePrepaidUsageAllocationExpirationDate( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | | `allocationId` | `int` | Template, Required | The Advanced Billing id of the allocation | | `body` | [`UpdateAllocationExpirationDate`](../../doc/models/update-allocation-expiration-date.md) | Body, Optional | - | @@ -988,9 +994,9 @@ UpdateAllocationExpirationDate body = new UpdateAllocationExpirationDate.Builder try { subscriptionComponentsController.updatePrepaidUsageAllocationExpirationDate(subscriptionId, componentId, allocationId, body); -} catch (ApiException e) { +} catch (SubscriptionComponentAllocationErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1027,7 +1033,7 @@ Void deletePrepaidUsageAllocation( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `componentId` | `int` | Template, Required | The Advanced Billing id of the component | | `allocationId` | `int` | Template, Required | The Advanced Billing id of the allocation | | `body` | [`CreditSchemeRequest`](../../doc/models/credit-scheme-request.md) | Body, Optional | - | @@ -1049,9 +1055,9 @@ CreditSchemeRequest body = new CreditSchemeRequest.Builder( try { subscriptionComponentsController.deletePrepaidUsageAllocation(subscriptionId, componentId, allocationId, body); -} catch (ApiException e) { +} catch (SubscriptionComponentAllocationErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1158,9 +1164,9 @@ CreateUsageRequest body = new CreateUsageRequest.Builder( try { UsageResponse result = subscriptionComponentsController.createUsage(subscriptionIdOrReference, componentId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1216,14 +1222,7 @@ List listUsages( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionIdOrReference` | [`ListUsagesInputSubscriptionIdOrReference`](../../doc/models/containers/list-usages-input-subscription-id-or-reference.md) | Template, Required | This is a container for one-of cases. | -| `componentId` | [`ListUsagesInputComponentId`](../../doc/models/containers/list-usages-input-component-id.md) | Template, Required | This is a container for one-of cases. | -| `sinceId` | `Long` | Query, Optional | Returns usages with an id greater than or equal to the one specified | -| `maxId` | `Long` | Query, Optional | Returns usages with an id less than or equal to the one specified | -| `sinceDate` | `LocalDate` | Query, Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | -| `untilDate` | `LocalDate` | Query, Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | -| `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` | +| `input` | [`ListUsagesInput`](../../doc/models/list-usages-input.md) | Required | Input structure for the method ListUsages | ## Response Type @@ -1249,8 +1248,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1350,8 +1347,6 @@ try { subscriptionComponentsController.activateEventBasedComponent(subscriptionId, componentId, body); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1387,8 +1382,6 @@ try { subscriptionComponentsController.deactivateEventBasedComponent(subscriptionId, componentId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1453,8 +1446,6 @@ try { subscriptionComponentsController.recordEvent(apiHandle, null, body); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1507,8 +1498,6 @@ try { subscriptionComponentsController.bulkRecordEvents(apiHandle, null, body); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1526,20 +1515,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `filter` | [`ListSubscriptionComponentsForSiteFilter`](../../doc/models/list-subscription-components-for-site-filter.md) | Query, Optional | Filter to use for List Subscription Components For Site operation | -| `dateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Use in query: `date_field=updated_at`. | -| `startDate` | `String` | Query, Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2011-12-15`. | -| `startDatetime` | `String` | Query, Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | -| `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. Use in query `end_date=2011-12-16`. | -| `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. Use in query `end_datetime=2022-07-01 09:00:05`. | -| `subscriptionIds` | `List` | Query, Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.

**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | -| `pricePointIds` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Query, Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | -| `productFamilyIds` | `List` | Query, Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | -| `include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Query, Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | +| `input` | [`ListSubscriptionComponentsForSiteInput`](../../doc/models/list-subscription-components-for-site-input.md) | Required | Input structure for the method ListSubscriptionComponentsForSite | ## Response Type @@ -1578,8 +1554,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index 81df3f63..da4cd7d2 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -44,9 +44,9 @@ String uid = "uid0"; try { SubscriptionGroupPrepaymentResponse result = subscriptionGroupInvoiceAccountController.createSubscriptionGroupPrepayment(uid, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -83,10 +83,7 @@ ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `uid` | `String` | Template, Required | The uid of the subscription group | -| `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` | -| `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | +| `input` | [`ListPrepaymentsForSubscriptionGroupInput`](../../doc/models/list-prepayments-for-subscription-group-input.md) | Required | Input structure for the method ListPrepaymentsForSubscriptionGroup | ## Response Type @@ -112,8 +109,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -185,9 +180,9 @@ IssueServiceCreditRequest body = new IssueServiceCreditRequest.Builder( try { ServiceCreditResponse result = subscriptionGroupInvoiceAccountController.issueSubscriptionGroupServiceCredit(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -252,9 +247,9 @@ DeductServiceCreditRequest body = new DeductServiceCreditRequest.Builder( try { ServiceCredit result = subscriptionGroupInvoiceAccountController.deductSubscriptionGroupServiceCredit(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-group-status.md b/doc/controllers/subscription-group-status.md index 60f7aeaa..da61cd21 100644 --- a/doc/controllers/subscription-group-status.md +++ b/doc/controllers/subscription-group-status.md @@ -49,9 +49,9 @@ CancelGroupedSubscriptionsRequest body = new CancelGroupedSubscriptionsRequest.B try { subscriptionGroupStatusController.cancelSubscriptionsInGroup(uid, body); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -91,9 +91,9 @@ String uid = "uid0"; try { subscriptionGroupStatusController.initiateDelayedCancellationForGroup(uid); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -131,9 +131,9 @@ String uid = "uid0"; try { subscriptionGroupStatusController.cancelDelayedCancellationForGroup(uid); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -195,9 +195,9 @@ ReactivateSubscriptionGroupRequest body = new ReactivateSubscriptionGroupRequest try { ReactivateSubscriptionGroupResponse result = subscriptionGroupStatusController.reactivateSubscriptionGroup(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index db2f1893..65cbb70f 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -77,9 +77,9 @@ SubscriptionGroupSignupRequest body = new SubscriptionGroupSignupRequest.Builder try { SubscriptionGroupSignupResponse result = subscriptionGroupsController.signupWithSubscriptionGroup(body); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionGroupSignupErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -129,9 +129,9 @@ CreateSubscriptionGroupRequest body = new CreateSubscriptionGroupRequest.Builder try { SubscriptionGroupResponse result = subscriptionGroupsController.createSubscriptionGroup(body); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionGroupCreateErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -141,6 +141,7 @@ try { ```json { "subscription_group": { + "uid": "grp_952mvqcnk53wq", "customer_id": 1, "payment_profile": { "id": 1, @@ -182,9 +183,7 @@ ListSubscriptionGroupsResponse listSubscriptionGroups( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `include` | [`List`](../../doc/models/subscription-groups-list-include.md) | Query, Optional | 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` | +| `input` | [`ListSubscriptionGroupsInput`](../../doc/models/list-subscription-groups-input.md) | Required | Input structure for the method ListSubscriptionGroups | ## Response Type @@ -206,8 +205,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -288,8 +285,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -376,9 +371,9 @@ UpdateSubscriptionGroupRequest body = new UpdateSubscriptionGroupRequest.Builder try { SubscriptionGroupResponse result = subscriptionGroupsController.updateSubscriptionGroupMembers(uid, body); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionGroupUpdateErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -413,8 +408,8 @@ try { # Delete Subscription Group -Use this endpoint to delete subscription group. -Only groups without members can be deleted +Deletes a subscription group. +Only groups without members can be deleted. ```java DeleteSubscriptionGroupResponse deleteSubscriptionGroup( @@ -441,8 +436,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -493,8 +486,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -573,7 +564,7 @@ SubscriptionGroupResponse addSubscriptionToGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`AddSubscriptionToAGroup`](../../doc/models/add-subscription-to-a-group.md) | Body, Optional | - | ## Response Type @@ -605,8 +596,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -646,7 +635,7 @@ Void removeSubscriptionFromGroup( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -659,9 +648,9 @@ int subscriptionId = 222; try { subscriptionGroupsController.removeSubscriptionFromGroup(subscriptionId); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index 87548805..3f3a210e 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -32,7 +32,7 @@ AccountBalances readAccountBalances( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -48,8 +48,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -74,7 +72,7 @@ CreatePrepaymentResponse createPrepayment( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`CreatePrepaymentRequest`](../../doc/models/create-prepayment-request.md) | Body, Optional | - | ## Response Type @@ -101,8 +99,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -142,10 +138,7 @@ PrepaymentsResponse listPrepayments( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | -| `filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Query, Optional | Filter to use for List Prepayments operations | +| `input` | [`ListPrepaymentsInput`](../../doc/models/list-prepayments-input.md) | Required | Input structure for the method ListPrepayments | ## Response Type @@ -171,8 +164,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -218,7 +209,7 @@ ServiceCredit issueServiceCredit( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`IssueServiceCreditRequest`](../../doc/models/issue-service-credit-request.md) | Body, Optional | - | ## Response Type @@ -244,8 +235,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -282,7 +271,7 @@ Void deductServiceCredit( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`DeductServiceCreditRequest`](../../doc/models/deduct-service-credit-request.md) | Body, Optional | - | ## Response Type @@ -308,8 +297,6 @@ try { subscriptionInvoiceAccountController.deductServiceCredit(subscriptionId, body); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -336,7 +323,7 @@ ListServiceCreditsResponse listServiceCredits( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | @@ -355,9 +342,9 @@ Integer perPage = 50; try { ListServiceCreditsResponse result = subscriptionInvoiceAccountController.listServiceCredits(subscriptionId, page, perPage, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -416,7 +403,7 @@ PrepaymentResponse refundPrepayment( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `prepaymentId` | `long` | Template, Required | id of prepayment | | `body` | [`RefundPrepaymentRequest`](../../doc/models/refund-prepayment-request.md) | Body, Optional | - | @@ -432,9 +419,9 @@ long prepaymentId = 228L; try { PrepaymentResponse result = subscriptionInvoiceAccountController.refundPrepayment(subscriptionId, prepaymentId, null); System.out.println(result); -} catch (ApiException e) { +} catch (RefundPrepaymentBaseErrorsResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 4613338f..3ad2b2ef 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -39,7 +39,7 @@ SubscriptionNoteResponse createSubscriptionNote( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`UpdateSubscriptionNoteRequest`](../../doc/models/update-subscription-note-request.md) | Body, Optional | Updatable fields for Subscription Note | ## Response Type @@ -62,9 +62,9 @@ UpdateSubscriptionNoteRequest body = new UpdateSubscriptionNoteRequest.Builder( try { SubscriptionNoteResponse result = subscriptionNotesController.createSubscriptionNote(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -89,9 +89,7 @@ List listSubscriptionNotes( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `page` | `Integer` | Query, Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**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` | +| `input` | [`ListSubscriptionNotesInput`](../../doc/models/list-subscription-notes-input.md) | Required | Input structure for the method ListSubscriptionNotes | ## Response Type @@ -110,9 +108,9 @@ ListSubscriptionNotesInput listSubscriptionNotesInput = new ListSubscriptionNote try { List result = subscriptionNotesController.listSubscriptionNotes(listSubscriptionNotesInput); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -165,7 +163,7 @@ SubscriptionNoteResponse readSubscriptionNote( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `noteId` | `int` | Template, Required | The Advanced Billing id of the note | ## Response Type @@ -183,8 +181,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -219,7 +215,7 @@ SubscriptionNoteResponse updateSubscriptionNote( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `noteId` | `int` | Template, Required | The Advanced Billing id of the note | | `body` | [`UpdateSubscriptionNoteRequest`](../../doc/models/update-subscription-note-request.md) | Body, Optional | Updatable fields for Subscription Note | @@ -244,9 +240,9 @@ UpdateSubscriptionNoteRequest body = new UpdateSubscriptionNoteRequest.Builder( try { SubscriptionNoteResponse result = subscriptionNotesController.updateSubscriptionNote(subscriptionId, noteId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -260,7 +256,7 @@ try { # Delete Subscription Note -Use the following method to delete a note for a Subscription. +Deletes a note for a Subscription. ```java Void deleteSubscriptionNote( @@ -272,7 +268,7 @@ Void deleteSubscriptionNote( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `noteId` | `int` | Template, Required | The Advanced Billing id of the note | ## Response Type @@ -289,8 +285,6 @@ try { subscriptionNotesController.deleteSubscriptionNote(subscriptionId, noteId); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index 3d4291a8..ca99ca10 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -83,7 +83,7 @@ SubscriptionResponse migrateSubscriptionProduct( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`SubscriptionProductMigrationRequest`](../../doc/models/subscription-product-migration-request.md) | Body, Optional | - | ## Response Type @@ -108,9 +108,9 @@ SubscriptionProductMigrationRequest body = new SubscriptionProductMigrationReque try { SubscriptionResponse result = subscriptionProductsController.migrateSubscriptionProduct(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -264,7 +264,7 @@ SubscriptionMigrationPreviewResponse previewSubscriptionProductMigration( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`SubscriptionMigrationPreviewRequest`](../../doc/models/subscription-migration-preview-request.md) | Body, Optional | - | ## Response Type @@ -288,9 +288,9 @@ SubscriptionMigrationPreviewRequest body = new SubscriptionMigrationPreviewReque try { SubscriptionMigrationPreviewResponse result = subscriptionProductsController.previewSubscriptionProductMigration(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscription-renewals.md b/doc/controllers/subscription-renewals.md new file mode 100644 index 00000000..b78c55a7 --- /dev/null +++ b/doc/controllers/subscription-renewals.md @@ -0,0 +1,945 @@ +# Subscription Renewals + +```java +SubscriptionRenewalsController subscriptionRenewalsController = client.getSubscriptionRenewalsController(); +``` + +## Class Name + +`SubscriptionRenewalsController` + +## Methods + +* [Create Scheduled Renewal Configuration](../../doc/controllers/subscription-renewals.md#create-scheduled-renewal-configuration) +* [List Scheduled Renewal Configurations](../../doc/controllers/subscription-renewals.md#list-scheduled-renewal-configurations) +* [Read Scheduled Renewal Configuration](../../doc/controllers/subscription-renewals.md#read-scheduled-renewal-configuration) +* [Update Scheduled Renewal Configuration](../../doc/controllers/subscription-renewals.md#update-scheduled-renewal-configuration) +* [Schedule Scheduled Renewal Lock In](../../doc/controllers/subscription-renewals.md#schedule-scheduled-renewal-lock-in) +* [Lock in Scheduled Renewal Immediately](../../doc/controllers/subscription-renewals.md#lock-in-scheduled-renewal-immediately) +* [Unpublish Scheduled Renewal Configuration](../../doc/controllers/subscription-renewals.md#unpublish-scheduled-renewal-configuration) +* [Cancel Scheduled Renewal Configuration](../../doc/controllers/subscription-renewals.md#cancel-scheduled-renewal-configuration) +* [Create Scheduled Renewal Configuration Item](../../doc/controllers/subscription-renewals.md#create-scheduled-renewal-configuration-item) +* [Update Scheduled Renewal Configuration Item](../../doc/controllers/subscription-renewals.md#update-scheduled-renewal-configuration-item) +* [Delete Scheduled Renewal Configuration Item](../../doc/controllers/subscription-renewals.md#delete-scheduled-renewal-configuration-item) + + +# Create Scheduled Renewal Configuration + +Creates a scheduled renewal configuration for a subscription. The scheduled renewal is based on the subscription’s current product and component setup. + +```java +ScheduledRenewalConfigurationResponse createScheduledRenewalConfiguration( + final int subscriptionId, + final ScheduledRenewalConfigurationRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `body` | [`ScheduledRenewalConfigurationRequest`](../../doc/models/scheduled-renewal-configuration-request.md) | Body, Optional | - | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +ScheduledRenewalConfigurationRequest body = new ScheduledRenewalConfigurationRequest.Builder( + new ScheduledRenewalConfigurationRequestBody.Builder() + .startsAt(DateTimeHelper.fromRfc8601DateTime("2024-12-01T00:00:00Z")) + .endsAt(DateTimeHelper.fromRfc8601DateTime("2025-12-01T00:00:00Z")) + .lockInAt(DateTimeHelper.fromRfc8601DateTime("2024-11-15T00:00:00Z")) + .contractId(222) + .build() +) +.build(); + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.createScheduledRenewalConfiguration(subscriptionId, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 123, + "site_id": 456, + "subscription_id": 12345, + "starts_at": "2024-12-01T00:00:00Z", + "ends_at": "2025-12-01T00:00:00Z", + "lock_in_at": "2024-11-15T00:00:00Z", + "created_at": "2024-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 789, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 123, + "item_id": 4, + "item_type": "Product", + "item_subclass": "Product", + "price_point_id": 7, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2024-09-01T12:00:00Z" + } + ], + "contract": { + "id": 107, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio_id-id", + "name": "Register", + "currency_code": "USD" + } + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# List Scheduled Renewal Configurations + +Lists scheduled renewal configurations for the subscription and permits an optional status query filter. + +```java +ScheduledRenewalConfigurationsResponse listScheduledRenewalConfigurations( + final int subscriptionId, + final Status status) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `status` | [`Status`](../../doc/models/status.md) | Query, Optional | (Optional) Status filter for scheduled renewal configurations. | + +## Response Type + +[`ScheduledRenewalConfigurationsResponse`](../../doc/models/scheduled-renewal-configurations-response.md) + +## Example Usage + +```java +int subscriptionId = 222; + +try { + ScheduledRenewalConfigurationsResponse result = subscriptionRenewalsController.listScheduledRenewalConfigurations(subscriptionId, null); + System.out.println(result); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configurations": [ + { + "id": 123, + "site_id": 456, + "subscription_id": 12345, + "starts_at": "2024-12-01T00:00:00Z", + "ends_at": "2025-12-01T00:00:00Z", + "lock_in_at": "2024-11-15T00:00:00Z", + "created_at": "2024-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 789, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 123, + "item_id": 4, + "item_type": "Product", + "item_subclass": "Product", + "price_point_id": 7, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2024-09-01T12:00:00Z" + } + ], + "contract": { + "id": 107, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio-id", + "name": "Register", + "currency_code": "USD" + } + } + } + ] +} +``` + + +# Read Scheduled Renewal Configuration + +Retrieves the configuration settings for the scheduled renewal. + +```java +ScheduledRenewalConfigurationResponse readScheduledRenewalConfiguration( + final int subscriptionId, + final int id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.readScheduledRenewalConfiguration(subscriptionId, id); + System.out.println(result); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 123, + "site_id": 456, + "subscription_id": 12345, + "starts_at": "2024-12-01T00:00:00Z", + "ends_at": "2025-12-01T00:00:00Z", + "lock_in_at": "2024-11-15T00:00:00Z", + "created_at": "2024-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 789, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 123, + "item_id": 4, + "item_type": "Product", + "item_subclass": "Product", + "price_point_id": 7, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2024-09-01T12:00:00Z" + } + ], + "contract": { + "id": 107, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio-id", + "name": "Register", + "currency_code": "USD" + } + } + } +} +``` + + +# Update Scheduled Renewal Configuration + +Updates an existing configuration. + +```java +ScheduledRenewalConfigurationResponse updateScheduledRenewalConfiguration( + final int subscriptionId, + final int id, + final ScheduledRenewalConfigurationRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | +| `body` | [`ScheduledRenewalConfigurationRequest`](../../doc/models/scheduled-renewal-configuration-request.md) | Body, Optional | - | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; +ScheduledRenewalConfigurationRequest body = new ScheduledRenewalConfigurationRequest.Builder( + new ScheduledRenewalConfigurationRequestBody.Builder() + .startsAt(DateTimeHelper.fromRfc8601DateTime("2025-12-01T00:00:00Z")) + .endsAt(DateTimeHelper.fromRfc8601DateTime("2026-12-01T00:00:00Z")) + .lockInAt(DateTimeHelper.fromRfc8601DateTime("2025-11-15T00:00:00Z")) + .build() +) +.build(); + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.updateScheduledRenewalConfiguration(subscriptionId, id, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 123, + "site_id": 456, + "subscription_id": 12345, + "starts_at": "2025-12-01T00:00:00Z", + "ends_at": "2026-12-01T00:00:00Z", + "lock_in_at": "2025-11-15T00:00:00Z", + "created_at": "2025-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 789, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 123, + "item_id": 4, + "item_type": "Product", + "item_subclass": "Product", + "price_point_id": 7, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } + ], + "contract": { + "id": 107, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio-id", + "name": "Register", + "currency_code": "USD" + } + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Schedule Scheduled Renewal Lock In + +Schedules a future lock-in date for the renewal. + +```java +ScheduledRenewalConfigurationResponse scheduleScheduledRenewalLockIn( + final int subscriptionId, + final int id, + final ScheduledRenewalLockInRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | +| `body` | [`ScheduledRenewalLockInRequest`](../../doc/models/scheduled-renewal-lock-in-request.md) | Body, Optional | - | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; +ScheduledRenewalLockInRequest body = new ScheduledRenewalLockInRequest.Builder( + DateTimeHelper.fromSimpleDate("2025-11-15") +) +.build(); + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.scheduleScheduledRenewalLockIn(subscriptionId, id, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 123, + "site_id": 456, + "subscription_id": 12345, + "starts_at": "2025-12-01T00:00:00Z", + "ends_at": "2026-12-01T00:00:00Z", + "lock_in_at": "2025-11-15T00:00:00Z", + "created_at": "2025-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 789, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 123, + "item_id": 4, + "item_type": "Product", + "item_subclass": "Product", + "price_point_id": 7, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } + ], + "contract": { + "id": 107, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio-id", + "name": "Register", + "currency_code": "USD" + } + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Lock in Scheduled Renewal Immediately + +Locks in the renewal immediately. + +```java +ScheduledRenewalConfigurationResponse lockInScheduledRenewalImmediately( + final int subscriptionId, + final int id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.lockInScheduledRenewalImmediately(subscriptionId, id); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 987, + "site_id": 321, + "subscription_id": 12345, + "starts_at": "2025-12-01T00:00:00Z", + "ends_at": "2026-12-01T00:00:00Z", + "lock_in_at": "2025-11-15T00:00:00Z", + "created_at": "2025-09-01T12:00:00Z", + "status": "scheduled", + "scheduled_renewal_configuration_items": [ + { + "id": 555, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 987, + "item_id": 42, + "item_type": "Product", + "price_point_id": 73, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } + ], + "contract": { + "id": 222, + "maxio_id": "maxio-id", + "number": null, + "register": { + "id": 12, + "maxio_id": "maxio-id", + "name": "Register", + "currency_code": "USD" + } + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Unpublish Scheduled Renewal Configuration + +Returns a scheduled renewal configuration to an editable state. + +```java +ScheduledRenewalConfigurationResponse unpublishScheduledRenewalConfiguration( + final int subscriptionId, + final int id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.unpublishScheduledRenewalConfiguration(subscriptionId, id); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 987, + "site_id": 321, + "subscription_id": 12345, + "starts_at": "2025-12-01T00:00:00Z", + "ends_at": "2026-12-01T00:00:00Z", + "lock_in_at": "2025-11-15T00:00:00Z", + "created_at": "2025-09-01T12:00:00Z", + "status": "draft", + "scheduled_renewal_configuration_items": [ + { + "id": 555, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 987, + "item_id": 42, + "item_type": "Product", + "price_point_id": 73, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } + ], + "contract": { + "id": 222 + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Cancel Scheduled Renewal Configuration + +Cancels a scheduled renewal configuration. + +```java +ScheduledRenewalConfigurationResponse cancelScheduledRenewalConfiguration( + final int subscriptionId, + final int id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `id` | `int` | Template, Required | The renewal id. | + +## Response Type + +[`ScheduledRenewalConfigurationResponse`](../../doc/models/scheduled-renewal-configuration-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int id = 112; + +try { + ScheduledRenewalConfigurationResponse result = subscriptionRenewalsController.cancelScheduledRenewalConfiguration(subscriptionId, id); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration": { + "id": 987, + "site_id": 321, + "subscription_id": 12345, + "starts_at": "2025-12-01T00:00:00Z", + "ends_at": "2026-12-01T00:00:00Z", + "lock_in_at": "2025-11-15T00:00:00Z", + "created_at": "2025-09-01T12:00:00Z", + "status": "canceled", + "scheduled_renewal_configuration_items": [ + { + "id": 555, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 987, + "item_id": 42, + "item_type": "Product", + "price_point_id": 73, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } + ], + "contract": { + "id": 222 + } + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Create Scheduled Renewal Configuration Item + +Adds product and component line items to the scheduled renewal. + +```java +ScheduledRenewalConfigurationItemResponse createScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final ScheduledRenewalConfigurationItemRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `scheduledRenewalsConfigurationId` | `int` | Template, Required | The scheduled renewal configuration id. | +| `body` | [`ScheduledRenewalConfigurationItemRequest`](../../doc/models/scheduled-renewal-configuration-item-request.md) | Body, Optional | - | + +## Response Type + +[`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int scheduledRenewalsConfigurationId = 250; +ScheduledRenewalConfigurationItemRequest body = new ScheduledRenewalConfigurationItemRequest.Builder( + ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent.Builder( + "Component", + 57 + ) + .quantity(1) + .customPrice(new ScheduledRenewalComponentCustomPrice.Builder( + PricingScheme.STAIRSTEP, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 1 + ), + PriceUnitPrice.fromPrecision( + 5D + ) + ) + .endingQuantity(null) + .build() + ) + ) + .build()) + .build() + ) +) +.build(); + +try { + ScheduledRenewalConfigurationItemResponse result = subscriptionRenewalsController.createScheduledRenewalConfigurationItem(subscriptionId, scheduledRenewalsConfigurationId, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration_item": { + "id": 555, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 987, + "item_id": 42, + "item_type": "Product", + "item_subclass": "SubscriptionProduct", + "price_point_id": 73, + "price_point_type": "ProductPricePoint", + "quantity": 1, + "decimal_quantity": "1.0", + "created_at": "2025-09-01T12:00:00Z" + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Update Scheduled Renewal Configuration Item + +Updates an existing configuration item’s pricing and quantity. + +```java +ScheduledRenewalConfigurationItemResponse updateScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id, + final ScheduledRenewalUpdateRequest body) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `scheduledRenewalsConfigurationId` | `int` | Template, Required | The scheduled renewal configuration id. | +| `id` | `int` | Template, Required | The scheduled renewal configuration item id. | +| `body` | [`ScheduledRenewalUpdateRequest`](../../doc/models/scheduled-renewal-update-request.md) | Body, Optional | - | + +## Response Type + +[`ScheduledRenewalConfigurationItemResponse`](../../doc/models/scheduled-renewal-configuration-item-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +int scheduledRenewalsConfigurationId = 250; +int id = 112; +ScheduledRenewalUpdateRequest body = new ScheduledRenewalUpdateRequest.Builder( + ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent.Builder( + "Component", + 57 + ) + .quantity(2) + .customPrice(new ScheduledRenewalComponentCustomPrice.Builder( + PricingScheme.STAIRSTEP, + Arrays.asList( + new Price.Builder( + PriceStartingQuantity.fromNumber( + 1 + ), + PriceUnitPrice.fromPrecision( + 5D + ) + ) + .endingQuantity(null) + .build() + ) + ) + .build()) + .build() + ) +) +.build(); + +try { + ScheduledRenewalConfigurationItemResponse result = subscriptionRenewalsController.updateScheduledRenewalConfigurationItem(subscriptionId, scheduledRenewalsConfigurationId, id, body); + System.out.println(result); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "scheduled_renewal_configuration_item": { + "id": 555, + "subscription_id": 12345, + "subscription_renewal_configuration_id": 987, + "item_id": 42, + "item_type": "Component", + "item_subclass": "SubscriptionComponent", + "price_point_id": 73, + "price_point_type": "ComponentPricePoint", + "quantity": 3, + "decimal_quantity": "3.0", + "created_at": "2025-09-01T12:00:00Z" + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + +# Delete Scheduled Renewal Configuration Item + +Removes an item from the pending renewal configuration. + +```java +Void deleteScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `scheduledRenewalsConfigurationId` | `int` | Template, Required | The scheduled renewal configuration id. | +| `id` | `int` | Template, Required | The scheduled renewal configuration item id. | + +## Response Type + +`void` + +## Example Usage + +```java +int subscriptionId = 222; +int scheduledRenewalsConfigurationId = 250; +int id = 112; + +try { + subscriptionRenewalsController.deleteScheduledRenewalConfigurationItem(subscriptionId, scheduledRenewalsConfigurationId, id); +} catch (ErrorListResponseException e) { + e.printStackTrace(); +} catch (ApiException e) { + e.printStackTrace(); +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 78c0932a..b529d6a0 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -43,7 +43,7 @@ SubscriptionResponse retrySubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -57,9 +57,9 @@ int subscriptionId = 222; try { SubscriptionResponse result = subscriptionStatusController.retrySubscription(subscriptionId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -209,7 +209,8 @@ try { # Cancel Subscription -The DELETE action causes the cancellation of the Subscription. This means, the method sets the Subscription state to "canceled". +Cancels the Subscription. The Delete method sets the Subscription state to `canceled`. +To cancel the subscription immediately, omit any schedule parameters from the request. To use the schedule options, the Schedule Subscription Cancellation feature must be enabled on your site. ```java SubscriptionResponse cancelSubscription( @@ -221,7 +222,7 @@ SubscriptionResponse cancelSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`CancellationRequest`](../../doc/models/cancellation-request.md) | Body, Optional | - | ## Response Type @@ -237,8 +238,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -400,8 +399,8 @@ SubscriptionResponse resumeSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | -| `calendarBillingResumptionCharge` | [`ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled

**Default**: `ResumptionCharge.PRORATED` | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `calendarBillingResumptionCharge` | [`ResumptionCharge`](../../doc/models/resumption-charge.md) | Query, Optional | (For calendar billing subscriptions only) The way that the resumed subscription's charge should be handled.

**Default**: `ResumptionCharge.PRORATED` | ## Response Type @@ -415,9 +414,9 @@ int subscriptionId = 222; try { SubscriptionResponse result = subscriptionStatusController.resumeSubscription(subscriptionId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -556,7 +555,7 @@ SubscriptionResponse pauseSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows to pause a Subscription | ## Response Type @@ -576,9 +575,9 @@ PauseRequest body = new PauseRequest.Builder() try { SubscriptionResponse result = subscriptionStatusController.pauseSubscription(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -719,7 +718,7 @@ SubscriptionResponse updateAutomaticSubscriptionResumption( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows to pause a Subscription | ## Response Type @@ -739,9 +738,9 @@ PauseRequest body = new PauseRequest.Builder() try { SubscriptionResponse result = subscriptionStatusController.updateAutomaticSubscriptionResumption(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -875,7 +874,7 @@ try { # Reactivate Subscription -Advanced Billing offers the ability to reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). +Reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). **Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.** @@ -896,6 +895,8 @@ If a reactivation with `resume: true` were attempted _before_ what would have be If a reactivation with `resume: true` were attempted _after_ what would have been the next billing date of July 1st, then Advanced Billing would not resume the subscription, and instead it would be reactivated with a new billing period. +If a reactivation with `resume: false`, or where 'resume" is omited were attempted, then Advanced Billing would reactivate the subscription with a new billing period regardless of whether or not resuming the previous billing period were possible. + | Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June 28 | Yes | @@ -1044,7 +1045,7 @@ SubscriptionResponse reactivateSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`ReactivateSubscriptionRequest`](../../doc/models/reactivate-subscription-request.md) | Body, Optional | - | ## Response Type @@ -1071,9 +1072,9 @@ ReactivateSubscriptionRequest body = new ReactivateSubscriptionRequest.Builder() try { SubscriptionResponse result = subscriptionStatusController.reactivateSubscription(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1197,11 +1198,7 @@ try { # Initiate Delayed Cancellation -Advanced Billing offers the ability to cancel a subscription at the end of the current billing period. This period is set by its current product. - -Requesting to cancel the subscription at the end of the period sets the `cancel_at_end_of_period` flag to true. - -Note that you cannot set `cancel_at_end_of_period` at subscription creation, or if the subscription is past due. +Cancels a subscription at the end of the current billing period based on the subscription's current product. You cannot set `cancel_at_end_of_period` at subscription creation, or if the subscription is past due. ```java DelayedCancellationResponse initiateDelayedCancellation( @@ -1213,7 +1210,7 @@ DelayedCancellationResponse initiateDelayedCancellation( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`CancellationRequest`](../../doc/models/cancellation-request.md) | Body, Optional | - | ## Response Type @@ -1227,9 +1224,9 @@ int subscriptionId = 222; try { DelayedCancellationResponse result = subscriptionStatusController.initiateDelayedCancellation(subscriptionId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1257,7 +1254,7 @@ DelayedCancellationResponse cancelDelayedCancellation( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -1273,8 +1270,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1306,7 +1301,7 @@ SubscriptionResponse cancelDunning( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | ## Response Type @@ -1320,9 +1315,9 @@ int subscriptionId = 222; try { SubscriptionResponse result = subscriptionStatusController.cancelDunning(subscriptionId); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1357,7 +1352,7 @@ Optionally, **you may provide your own custom quantities** for any component to ## Subscription Side Effects -You can request a `POST` to obtain this data from the endpoint without any side effects. Plain and simple, this will preview data, not log any changes against a subscription. +You can request a `POST` to obtain this data from the endpoint without any side effects. This method allows you to preview data, but does not log any changes against a subscription. ```java RenewalPreviewResponse previewRenewal( @@ -1369,7 +1364,7 @@ RenewalPreviewResponse previewRenewal( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`RenewalPreviewRequest`](../../doc/models/renewal-preview-request.md) | Body, Optional | - | ## Response Type @@ -1412,9 +1407,9 @@ RenewalPreviewRequest body = new RenewalPreviewRequest.Builder() try { RenewalPreviewResponse result = subscriptionStatusController.previewRenewal(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 2a5f284b..12f0f219 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -85,9 +85,9 @@ CreateSubscriptionRequest body = new CreateSubscriptionRequest.Builder( try { SubscriptionResponse result = subscriptionsController.createSubscription(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -240,7 +240,7 @@ try { # List Subscriptions -This method will return an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. +returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. ## Search for a subscription @@ -259,22 +259,7 @@ List listSubscriptions( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `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` | -| `state` | [`SubscriptionStateFilter`](../../doc/models/subscription-state-filter.md) | Query, Optional | The current state of the subscription | -| `product` | `Integer` | Query, Optional | The product id of the subscription. (Note that the product handle cannot be used.) | -| `productPricePointId` | `Integer` | Query, Optional | The ID of the product price point. If supplied, product is required | -| `coupon` | `Integer` | Query, Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | -| `couponCode` | `String` | Query, Optional | The coupon code currently applied to the subscription | -| `dateField` | [`SubscriptionDateField`](../../doc/models/subscription-date-field.md) | Query, Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | -| `startDate` | `LocalDate` | Query, Optional | 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. Use in query `start_date=2022-07-01`. | -| `endDate` | `LocalDate` | Query, Optional | 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. Use in query `end_date=2022-08-01`. | -| `startDatetime` | `ZonedDateTime` | Query, Optional | 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. Use in query `start_datetime=2022-07-01 09:00:05`. | -| `endDatetime` | `ZonedDateTime` | Query, Optional | 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. Use in query `end_datetime=2022-08-01 10:00:05`. | -| `metadata` | `Map` | Query, Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | -| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `sort` | [`SubscriptionSort`](../../doc/models/subscription-sort.md) | Query, Optional | The attribute by which to sort

**Default**: `SubscriptionSort.SIGNUP_DATE` | -| `include` | [`List`](../../doc/models/subscription-list-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | +| `input` | [`ListSubscriptionsInput`](../../doc/models/list-subscriptions-input.md) | Required | Input structure for the method ListSubscriptions | ## Response Type @@ -301,8 +286,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -369,7 +352,7 @@ SubscriptionResponse updateSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`UpdateSubscriptionRequest`](../../doc/models/update-subscription-request.md) | Body, Optional | - | ## Response Type @@ -391,9 +374,9 @@ UpdateSubscriptionRequest body = new UpdateSubscriptionRequest.Builder( try { SubscriptionResponse result = subscriptionsController.updateSubscription(subscriptionId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -517,7 +500,7 @@ try { # Read Subscription -Use this endpoint to find subscription details. +Retrieves subscription details. ## Self-Service Page token @@ -533,7 +516,7 @@ SubscriptionResponse readSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `include` | [`List`](../../doc/models/subscription-include.md) | Query, Optional | Allows including additional data in the response. Use in query: `include[]=coupons&include[]=self_service_page_token`. | ## Response Type @@ -554,8 +537,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -731,7 +712,7 @@ Void overrideSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`OverrideSubscriptionRequest`](../../doc/models/override-subscription-request.md) | Body, Optional | Only these fields are available to be set. | ## Response Type @@ -754,9 +735,9 @@ OverrideSubscriptionRequest body = new OverrideSubscriptionRequest.Builder( try { subscriptionsController.overrideSubscription(subscriptionId, body); -} catch (ApiException e) { +} catch (SingleErrorResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -795,8 +776,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -830,7 +809,7 @@ SubscriptionResponse purgeSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `ack` | `int` | Query, Required | id of the customer. | | `cascade` | [`List`](../../doc/models/subscription-purge-type.md) | Query, Optional | Options are "customer" or "payment_profile".
Use in query: `cascade[]=customer&cascade[]=payment_profile`. | @@ -851,9 +830,9 @@ List cascade = Arrays.asList( try { SubscriptionResponse result = subscriptionsController.purgeSubscription(subscriptionId, ack, cascade); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionResponseErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -879,7 +858,7 @@ PrepaidConfigurationResponse updatePrepaidSubscriptionConfiguration( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`UpsertPrepaidConfigurationRequest`](../../doc/models/upsert-prepaid-configuration-request.md) | Body, Optional | - | ## Response Type @@ -905,8 +884,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -989,8 +966,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -1136,7 +1111,7 @@ SubscriptionResponse applyCouponsToSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `code` | `String` | Query, Optional | A code for the coupon that would be applied to a subscription | | `body` | [`AddCouponsRequest`](../../doc/models/add-coupons-request.md) | Body, Optional | - | @@ -1158,9 +1133,9 @@ AddCouponsRequest body = new AddCouponsRequest.Builder() try { SubscriptionResponse result = subscriptionsController.applyCouponsToSubscription(subscriptionId, null, body); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionAddCouponErrorException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1338,7 +1313,7 @@ String removeCouponFromSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `couponCode` | `String` | Query, Optional | The coupon code | ## Response Type @@ -1353,9 +1328,9 @@ int subscriptionId = 222; try { String result = subscriptionsController.removeCouponFromSubscription(subscriptionId, null); System.out.println(result); -} catch (ApiException e) { +} catch (SubscriptionRemoveCouponErrorsException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -1429,7 +1404,7 @@ SubscriptionResponse activateSubscription( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | | `body` | [`ActivateSubscriptionRequest`](../../doc/models/activate-subscription-request.md) | Body, Optional | - | ## Response Type @@ -1443,9 +1418,9 @@ int subscriptionId = 222; try { SubscriptionResponse result = subscriptionsController.activateSubscription(subscriptionId, null); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorArrayMapResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index fd23ed0c..5ee392a3 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -31,13 +31,7 @@ List listWebhooks( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `status` | [`WebhookStatus`](../../doc/models/webhook-status.md) | Query, Optional | Webhooks with matching status would be returned. | -| `sinceDate` | `String` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | -| `untilDate` | `String` | Query, Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | -| `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` | -| `order` | [`WebhookOrder`](../../doc/models/webhook-order.md) | Query, Optional | The order in which the Webhooks are returned. | -| `subscription` | `Integer` | Query, Optional | The Advanced Billing id of a subscription you'd like to filter for | +| `input` | [`ListWebhooksInput`](../../doc/models/list-webhooks-input.md) | Required | Input structure for the method ListWebhooks | ## Response Type @@ -56,8 +50,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -133,8 +125,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -182,8 +172,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -234,9 +222,9 @@ CreateOrUpdateEndpointRequest body = new CreateOrUpdateEndpointRequest.Builder( try { EndpointResponse result = webhooksController.createEndpoint(body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` @@ -285,8 +273,6 @@ try { System.out.println(result); } catch (ApiException e) { e.printStackTrace(); -} catch (IOException e) { - e.printStackTrace(); } ``` @@ -364,9 +350,9 @@ CreateOrUpdateEndpointRequest body = new CreateOrUpdateEndpointRequest.Builder( try { EndpointResponse result = webhooksController.updateEndpoint(endpointId, body); System.out.println(result); -} catch (ApiException e) { +} catch (ErrorListResponseException e) { e.printStackTrace(); -} catch (IOException e) { +} catch (ApiException e) { e.printStackTrace(); } ``` diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index 793ef918..f79ed92b 100644 --- a/doc/models/activate-event-based-component.md +++ b/doc/models/activate-event-based-component.md @@ -26,6 +26,7 @@ "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", + "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, @@ -37,8 +38,7 @@ "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } } ``` diff --git a/doc/models/all-vaults.md b/doc/models/all-vaults.md index be2f56f6..5e5e19d0 100644 --- a/doc/models/all-vaults.md +++ b/doc/models/all-vaults.md @@ -11,38 +11,38 @@ The vault that stores the payment profile with the provided `vault_token`. Use ` | Name | | --- | -| `Adyen` | -| `Authorizenet` | -| `Beanstream` | -| `BlueSnap` | -| `Bogus` | -| `Braintree1` | -| `BraintreeBlue` | -| `Checkout` | -| `Cybersource` | -| `Elavon` | -| `Eway` | -| `EwayRapid` | -| `EwayRapidStd` | -| `Firstdata` | -| `Forte` | -| `Gocardless` | -| `Litle` | -| `MaxioPayments` | -| `Maxp` | -| `Moduslink` | -| `Moneris` | -| `Nmi` | -| `Orbital` | -| `PaymentExpress` | -| `Paymill` | -| `Paypal` | -| `PaypalComplete` | -| `Pin` | -| `Square` | -| `Stripe` | -| `StripeConnect` | -| `TrustCommerce` | -| `Unipaas` | -| `Wirecard` | +| `ADYEN` | +| `AUTHORIZENET` | +| `BEANSTREAM` | +| `BLUE_SNAP` | +| `BOGUS` | +| `BRAINTREE1` | +| `BRAINTREE_BLUE` | +| `CHECKOUT` | +| `CYBERSOURCE` | +| `ELAVON` | +| `EWAY` | +| `EWAY_RAPID` | +| `EWAY_RAPID_STD` | +| `FIRSTDATA` | +| `FORTE` | +| `GOCARDLESS` | +| `LITLE` | +| `MAXIO_PAYMENTS` | +| `MAXP` | +| `MODUSLINK` | +| `MONERIS` | +| `NMI` | +| `ORBITAL` | +| `PAYMENT_EXPRESS` | +| `PAYMILL` | +| `PAYPAL` | +| `PAYPAL_COMPLETE` | +| `PIN` | +| `SQUARE` | +| `STRIPE` | +| `STRIPE_CONNECT` | +| `TRUST_COMMERCE` | +| `UNIPAAS` | +| `WIRECARD` | diff --git a/doc/models/allocate-components.md b/doc/models/allocate-components.md index 53a8c0c5..2a95318a 100644 --- a/doc/models/allocate-components.md +++ b/doc/models/allocate-components.md @@ -13,8 +13,8 @@ | `ProrationDowngradeScheme` | `String` | Optional | - | String getProrationDowngradeScheme() | setProrationDowngradeScheme(String prorationDowngradeScheme) | | `Allocations` | [`List`](../../doc/models/create-allocation.md) | Optional | - | List getAllocations() | setAllocations(List allocations) | | `AccrueCharge` | `Boolean` | Optional | - | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `PaymentCollectionMethod` | [`CollectionMethod`](../../doc/models/collection-method.md) | Optional | (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription | CollectionMethod getPaymentCollectionMethod() | setPaymentCollectionMethod(CollectionMethod paymentCollectionMethod) | | `InitiateDunning` | `Boolean` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | Boolean getInitiateDunning() | setInitiateDunning(Boolean initiateDunning) | @@ -27,19 +27,19 @@ "allocations": [ { "quantity": 26.48, + "decimal_quantity": "decimal_quantity8", + "previous_quantity": 55.5, + "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, - "memo": "memo6", - "proration_downgrade_scheme": "proration_downgrade_scheme0", - "proration_upgrade_scheme": "proration_upgrade_scheme2", - "accrue_charge": false + "memo": "memo6" }, { "quantity": 26.48, + "decimal_quantity": "decimal_quantity8", + "previous_quantity": 55.5, + "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, - "memo": "memo6", - "proration_downgrade_scheme": "proration_downgrade_scheme0", - "proration_upgrade_scheme": "proration_upgrade_scheme2", - "accrue_charge": false + "memo": "memo6" } ], "accrue_charge": false, diff --git a/doc/models/allocation-preview-direction.md b/doc/models/allocation-preview-direction.md index 26731f4c..2e124430 100644 --- a/doc/models/allocation-preview-direction.md +++ b/doc/models/allocation-preview-direction.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Upgrade` | -| `Downgrade` | +| `UPGRADE` | +| `DOWNGRADE` | diff --git a/doc/models/allocation-preview-item.md b/doc/models/allocation-preview-item.md index 2a31aaf8..5db12c03 100644 --- a/doc/models/allocation-preview-item.md +++ b/doc/models/allocation-preview-item.md @@ -18,8 +18,8 @@ | `ProrationUpgradeScheme` | `String` | Optional | - | String getProrationUpgradeScheme() | setProrationUpgradeScheme(String prorationUpgradeScheme) | | `ProrationDowngradeScheme` | `String` | Optional | - | String getProrationDowngradeScheme() | setProrationDowngradeScheme(String prorationDowngradeScheme) | | `AccrueCharge` | `Boolean` | Optional | - | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `PricePointId` | `Integer` | Optional | - | Integer getPricePointId() | setPricePointId(Integer pricePointId) | | `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | diff --git a/doc/models/allocation-preview-line-item-kind.md b/doc/models/allocation-preview-line-item-kind.md index 7fb25c3f..cc67eef1 100644 --- a/doc/models/allocation-preview-line-item-kind.md +++ b/doc/models/allocation-preview-line-item-kind.md @@ -11,8 +11,8 @@ A handle for the line item kind for allocation preview | Name | | --- | -| `QuantityBasedComponent` | -| `OnOffComponent` | -| `Coupon` | -| `Tax` | +| `QUANTITY_BASED_COMPONENT` | +| `ON_OFF_COMPONENT` | +| `COUPON` | +| `TAX` | diff --git a/doc/models/allocation-settings.md b/doc/models/allocation-settings.md index 07e4122e..acadaa87 100644 --- a/doc/models/allocation-settings.md +++ b/doc/models/allocation-settings.md @@ -9,8 +9,8 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `AccrueCharge` | `String` | Optional | Either "true" or "false". | String getAccrueCharge() | setAccrueCharge(String accrueCharge) | ## Example (as JSON) diff --git a/doc/models/allocation.md b/doc/models/allocation.md index f0c809e7..6ad0e2ca 100644 --- a/doc/models/allocation.md +++ b/doc/models/allocation.md @@ -28,8 +28,8 @@ | `PreviousPricePointId` | `Integer` | Optional | - | Integer getPreviousPricePointId() | setPreviousPricePointId(Integer previousPricePointId) | | `AccrueCharge` | `Boolean` | Optional | If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | | `InitiateDunning` | `Boolean` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | Boolean getInitiateDunning() | setInitiateDunning(Boolean initiateDunning) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `Payment` | [`PaymentForAllocation`](../../doc/models/payment-for-allocation.md) | Optional | - | PaymentForAllocation getPayment() | setPayment(PaymentForAllocation payment) | | `ExpiresAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) | | `UsedQuantity` | `Long` | Optional | - | Long getUsedQuantity() | setUsedQuantity(Long usedQuantity) | diff --git a/doc/models/apple-pay-vault.md b/doc/models/apple-pay-vault.md index ca51e9f1..9e66d7b5 100644 --- a/doc/models/apple-pay-vault.md +++ b/doc/models/apple-pay-vault.md @@ -11,5 +11,5 @@ The vault that stores the payment profile with the provided vault_token. | Name | | --- | -| `BraintreeBlue` | +| `BRAINTREE_BLUE` | diff --git a/doc/models/auto-invite.md b/doc/models/auto-invite.md index 2ee5341e..c467ad11 100644 --- a/doc/models/auto-invite.md +++ b/doc/models/auto-invite.md @@ -9,6 +9,6 @@ | Name | Description | | --- | --- | -| `No` | Do not send the invitation email. | -| `Yes` | Automatically send the invitation email. | +| `NO` | Do not send the invitation email. | +| `YES` | Automatically send the invitation email. | diff --git a/doc/models/available-actions.md b/doc/models/available-actions.md new file mode 100644 index 00000000..01a4a8ec --- /dev/null +++ b/doc/models/available-actions.md @@ -0,0 +1,24 @@ + +# Available Actions + +## Structure + +`AvailableActions` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SendEmail` | [`SendEmail`](../../doc/models/send-email.md) | Optional | - | SendEmail getSendEmail() | setSendEmail(SendEmail sendEmail) | + +## Example (as JSON) + +```json +{ + "send_email": { + "can_execute": false, + "url": "url0" + } +} +``` + diff --git a/doc/models/bank-account-holder-type.md b/doc/models/bank-account-holder-type.md index b820e92d..129dc3bc 100644 --- a/doc/models/bank-account-holder-type.md +++ b/doc/models/bank-account-holder-type.md @@ -11,6 +11,6 @@ Defaults to personal | Name | | --- | -| `Personal` | -| `Business` | +| `PERSONAL` | +| `BUSINESS` | diff --git a/doc/models/bank-account-type.md b/doc/models/bank-account-type.md index ccce016c..86a4b637 100644 --- a/doc/models/bank-account-type.md +++ b/doc/models/bank-account-type.md @@ -11,6 +11,6 @@ Defaults to checking | Name | | --- | -| `Checking` | -| `Savings` | +| `CHECKING` | +| `SAVINGS` | diff --git a/doc/models/bank-account-vault.md b/doc/models/bank-account-vault.md index cbef4ba6..9ff1b83a 100644 --- a/doc/models/bank-account-vault.md +++ b/doc/models/bank-account-vault.md @@ -11,12 +11,12 @@ The vault that stores the payment profile with the provided vault_token. Use `bo | Name | | --- | -| `Authorizenet` | -| `BlueSnap` | -| `Bogus` | -| `Forte` | -| `Gocardless` | -| `MaxioPayments` | -| `Maxp` | -| `StripeConnect` | +| `AUTHORIZENET` | +| `BLUE_SNAP` | +| `BOGUS` | +| `FORTE` | +| `GOCARDLESS` | +| `MAXIO_PAYMENTS` | +| `MAXP` | +| `STRIPE_CONNECT` | diff --git a/doc/models/basic-date-field.md b/doc/models/basic-date-field.md index ebcf891c..8bb95917 100644 --- a/doc/models/basic-date-field.md +++ b/doc/models/basic-date-field.md @@ -11,8 +11,8 @@ Allows to filter by `created_at` or `updated_at`. | Name | | --- | -| `UpdatedAt` | -| `CreatedAt` | +| `UPDATED_AT` | +| `CREATED_AT` | ## Example diff --git a/doc/models/billing-manifest-line-item-kind.md b/doc/models/billing-manifest-line-item-kind.md index dd5e0a15..1f99b4e3 100644 --- a/doc/models/billing-manifest-line-item-kind.md +++ b/doc/models/billing-manifest-line-item-kind.md @@ -11,10 +11,10 @@ A handle for the billing manifest line item kind | Name | | --- | -| `Baseline` | -| `Initial` | -| `Trial` | -| `Coupon` | -| `Component` | -| `Tax` | +| `BASELINE` | +| `INITIAL` | +| `TRIAL` | +| `COUPON` | +| `COMPONENT` | +| `TAX` | diff --git a/doc/models/calendar-billing.md b/doc/models/calendar-billing.md index 0fa7c7fa..d810e9bc 100644 --- a/doc/models/calendar-billing.md +++ b/doc/models/calendar-billing.md @@ -18,7 +18,7 @@ ```json { - "snap_day": 28, + "snap_day": 210, "calendar_billing_first_charge": "prorated" } ``` diff --git a/doc/models/cancellation-method.md b/doc/models/cancellation-method.md index ee5676d9..b0b7765a 100644 --- a/doc/models/cancellation-method.md +++ b/doc/models/cancellation-method.md @@ -11,10 +11,10 @@ The process used to cancel the subscription, if the subscription has been cancel | Name | | --- | -| `MerchantUi` | -| `MerchantApi` | -| `Dunning` | -| `BillingPortal` | -| `Unknown` | -| `Imported` | +| `MERCHANT_UI` | +| `MERCHANT_API` | +| `DUNNING` | +| `BILLING_PORTAL` | +| `UNKNOWN` | +| `IMPORTED` | diff --git a/doc/models/cancellation-options.md b/doc/models/cancellation-options.md index 1ce63b2f..1505e304 100644 --- a/doc/models/cancellation-options.md +++ b/doc/models/cancellation-options.md @@ -9,15 +9,21 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `CancellationMessage` | `String` | Optional | For your internal use. An indication as to why the subscription is being canceled. | String getCancellationMessage() | setCancellationMessage(String cancellationMessage) | -| `ReasonCode` | `String` | Optional | The reason code associated with the cancellation. See the list of reason codes associated with your site. | String getReasonCode() | setReasonCode(String reasonCode) | +| `CancellationMessage` | `String` | Optional | An indication as to why the subscription is being canceled. For your internal use. | String getCancellationMessage() | setCancellationMessage(String cancellationMessage) | +| `ReasonCode` | `String` | Optional | The reason code associated with the cancellation. Use the [List Reason Codes](../../doc/controllers/reason-codes.md#list-reason-codes) endpoint to retrieve the reason codes associated with your site. | String getReasonCode() | setReasonCode(String reasonCode) | +| `CancelAtEndOfPeriod` | `Boolean` | Optional | When true, the subscription is cancelled at the current period end instead of immediately. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | Boolean getCancelAtEndOfPeriod() | setCancelAtEndOfPeriod(Boolean cancelAtEndOfPeriod) | +| `ScheduledCancellationAt` | `ZonedDateTime` | Optional | Schedules the cancellation on the provided date. This is option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | ZonedDateTime getScheduledCancellationAt() | setScheduledCancellationAt(ZonedDateTime scheduledCancellationAt) | +| `RefundPrepaymentAccountBalance` | `Boolean` | Optional | Applies to prepaid subscriptions. When true, which is the default, the remaining prepaid balance is refunded as part of cancellation processing. When false, prepaid balance is not refunded as part of cancellation processing. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | Boolean getRefundPrepaymentAccountBalance() | setRefundPrepaymentAccountBalance(Boolean refundPrepaymentAccountBalance) | ## Example (as JSON) ```json { "cancellation_message": "cancellation_message0", - "reason_code": "reason_code6" + "reason_code": "reason_code6", + "cancel_at_end_of_period": false, + "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", + "refund_prepayment_account_balance": false } ``` diff --git a/doc/models/cancellation-request.md b/doc/models/cancellation-request.md index ca726c2f..9b5be126 100644 --- a/doc/models/cancellation-request.md +++ b/doc/models/cancellation-request.md @@ -17,7 +17,10 @@ { "subscription": { "cancellation_message": "cancellation_message2", - "reason_code": "reason_code8" + "reason_code": "reason_code8", + "cancel_at_end_of_period": false, + "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", + "refund_prepayment_account_balance": false } } ``` diff --git a/doc/models/card-type.md b/doc/models/card-type.md index 2acd7669..8ed1d690 100644 --- a/doc/models/card-type.md +++ b/doc/models/card-type.md @@ -11,40 +11,40 @@ The type of card used. | Name | | --- | -| `Visa` | -| `Master` | -| `Elo` | -| `Cabal` | -| `Alelo` | -| `Discover` | -| `AmericanExpress` | -| `Naranja` | -| `DinersClub` | -| `Jcb` | -| `Dankort` | -| `Maestro` | -| `MaestroNoLuhn` | -| `Forbrugsforeningen` | -| `Sodexo` | -| `Alia` | -| `Vr` | -| `Unionpay` | -| `Carnet` | -| `CartesBancaires` | -| `Olimpica` | -| `Creditel` | -| `Confiable` | -| `Synchrony` | -| `Routex` | -| `Mada` | -| `BpPlus` | -| `Passcard` | -| `Edenred` | -| `Anda` | -| `Tarjetad` | -| `Hipercard` | -| `Bogus` | -| `Switch` | -| `Solo` | -| `Laser` | +| `VISA` | +| `MASTER` | +| `ELO` | +| `CABAL` | +| `ALELO` | +| `DISCOVER` | +| `AMERICAN_EXPRESS` | +| `NARANJA` | +| `DINERS_CLUB` | +| `JCB` | +| `DANKORT` | +| `MAESTRO` | +| `MAESTRO_NO_LUHN` | +| `FORBRUGSFORENINGEN` | +| `SODEXO` | +| `ALIA` | +| `VR` | +| `UNIONPAY` | +| `CARNET` | +| `CARTES_BANCAIRES` | +| `OLIMPICA` | +| `CREDITEL` | +| `CONFIABLE` | +| `SYNCHRONY` | +| `ROUTEX` | +| `MADA` | +| `BP_PLUS` | +| `PASSCARD` | +| `EDENRED` | +| `ANDA` | +| `TARJETAD` | +| `HIPERCARD` | +| `BOGUS` | +| `ENUM_SWITCH` | +| `SOLO` | +| `LASER` | diff --git a/doc/models/chargeback-status.md b/doc/models/chargeback-status.md index d57bae0f..5541f264 100644 --- a/doc/models/chargeback-status.md +++ b/doc/models/chargeback-status.md @@ -11,8 +11,8 @@ The current chargeback status. | Name | | --- | -| `Open` | -| `Lost` | -| `Won` | -| `Closed` | +| `OPEN` | +| `LOST` | +| `WON` | +| `CLOSED` | diff --git a/doc/models/cleanup-scope.md b/doc/models/cleanup-scope.md index 51cb5160..234cc07c 100644 --- a/doc/models/cleanup-scope.md +++ b/doc/models/cleanup-scope.md @@ -11,6 +11,6 @@ all: Will clear all products, customers, and related subscriptions from the site | Name | | --- | -| `All` | -| `Customers` | +| `ALL` | +| `CUSTOMERS` | diff --git a/doc/models/clone-component-price-point-request.md b/doc/models/clone-component-price-point-request.md new file mode 100644 index 00000000..9a2d1b38 --- /dev/null +++ b/doc/models/clone-component-price-point-request.md @@ -0,0 +1,24 @@ + +# Clone Component Price Point Request + +## Structure + +`CloneComponentPricePointRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `PricePoint` | [`CloneComponentPricePoint`](../../doc/models/clone-component-price-point.md) | Required | - | CloneComponentPricePoint getPricePoint() | setPricePoint(CloneComponentPricePoint pricePoint) | + +## Example (as JSON) + +```json +{ + "price_point": { + "name": "name0", + "handle": "handle6" + } +} +``` + diff --git a/doc/models/clone-component-price-point.md b/doc/models/clone-component-price-point.md new file mode 100644 index 00000000..8cfab261 --- /dev/null +++ b/doc/models/clone-component-price-point.md @@ -0,0 +1,23 @@ + +# Clone Component Price Point + +## Structure + +`CloneComponentPricePoint` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Name` | `String` | Required | - | String getName() | setName(String name) | +| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) | + +## Example (as JSON) + +```json +{ + "name": "name2", + "handle": "handle8" +} +``` + diff --git a/doc/models/collection-method.md b/doc/models/collection-method.md index 337df240..50b7215d 100644 --- a/doc/models/collection-method.md +++ b/doc/models/collection-method.md @@ -11,8 +11,8 @@ The type of payment collection to be used in the subscription. For legacy Statem | Name | | --- | -| `Automatic` | -| `Remittance` | -| `Prepaid` | -| `Invoice` | +| `AUTOMATIC` | +| `REMITTANCE` | +| `PREPAID` | +| `INVOICE` | diff --git a/doc/models/component-custom-price.md b/doc/models/component-custom-price.md index 2f59b543..1c0d19af 100644 --- a/doc/models/component-custom-price.md +++ b/doc/models/component-custom-price.md @@ -15,7 +15,9 @@ Create or update custom pricing unique to the subscription. Used in place of `pr | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | Omit for On/Off components | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | | `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | -| `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1 | List getPrices() | setPrices(List prices) | +| `ListPricePointId` | `Integer` | Optional | Optional id of the price point to use for list price calculations when
overriding the customer price. | Integer getListPricePointId() | setListPricePointId(Integer listPricePointId) | +| `UseDefaultListPrice` | `Boolean` | Optional | When true, list price calculations will continue to use the default price point even when a `custom_price` is supplied. | Boolean getUseDefaultListPrice() | setUseDefaultListPrice(Boolean useDefaultListPrice) | +| `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1. | List getPrices() | setPrices(List prices) | | `RenewPrepaidAllocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether the allocated quantity renews each period. | Boolean getRenewPrepaidAllocation() | setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) | | `RolloverPrepaidRemainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Controls whether remaining units roll over to the next period. | Boolean getRolloverPrepaidRemainder() | setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) | | `ExpirationInterval` | `Integer` | Optional | Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which rollover amounts expire. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) | @@ -36,7 +38,7 @@ Create or update custom pricing unique to the subscription. Used in place of `pr "pricing_scheme": "stairstep", "interval": 162, "interval_unit": "day", - "renew_prepaid_allocation": false + "list_price_point_id": 146 } ``` diff --git a/doc/models/component-kind.md b/doc/models/component-kind.md index 915b0b68..f8b65b77 100644 --- a/doc/models/component-kind.md +++ b/doc/models/component-kind.md @@ -11,9 +11,9 @@ A handle for the component type | Name | | --- | -| `MeteredComponent` | -| `QuantityBasedComponent` | -| `OnOffComponent` | -| `PrepaidUsageComponent` | -| `EventBasedComponent` | +| `METERED_COMPONENT` | +| `QUANTITY_BASED_COMPONENT` | +| `ON_OFF_COMPONENT` | +| `PREPAID_USAGE_COMPONENT` | +| `EVENT_BASED_COMPONENT` | diff --git a/doc/models/component-price-point-currency-overage-response.md b/doc/models/component-price-point-currency-overage-response.md new file mode 100644 index 00000000..2a1ec820 --- /dev/null +++ b/doc/models/component-price-point-currency-overage-response.md @@ -0,0 +1,27 @@ + +# Component Price Point Currency Overage Response + +## Structure + +`ComponentPricePointCurrencyOverageResponse` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `PricePoint` | [`CurrencyOveragePrices`](../../doc/models/currency-overage-prices.md) | Required | Extends a component price point with currency overage prices. | CurrencyOveragePrices getPricePoint() | setPricePoint(CurrencyOveragePrices pricePoint) | + +## Example (as JSON) + +```json +{ + "price_point": { + "id": 248, + "type": "default", + "default": false, + "name": "name0", + "pricing_scheme": "per_unit" + } +} +``` + diff --git a/doc/models/component-price-point.md b/doc/models/component-price-point.md index 0bc27f89..9dee128e 100644 --- a/doc/models/component-price-point.md +++ b/doc/models/component-price-point.md @@ -25,7 +25,7 @@ | `TaxIncluded` | `Boolean` | Optional | - | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | | `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | -| `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. | List getCurrencyPrices() | setCurrencyPrices(List currencyPrices) | +| `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | List getCurrencyPrices() | setCurrencyPrices(List currencyPrices) | | `OveragePrices` | [`List`](../../doc/models/component-price.md) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | List getOveragePrices() | setOveragePrices(List overagePrices) | | `OveragePricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | Applicable only to prepaid usage components. Pricing scheme for overage pricing. | PricingScheme getOveragePricingScheme() | setOveragePricingScheme(PricingScheme overagePricingScheme) | | `RenewPrepaidAllocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | Boolean getRenewPrepaidAllocation() | setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) | diff --git a/doc/models/component.md b/doc/models/component.md index b022baee..f8d71ecf 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -31,8 +31,8 @@ | `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) | | `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) | | `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `CreatedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this component was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | | `UpdatedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this component was updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | | `ArchivedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this component was archived | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | diff --git a/doc/models/compounding-strategy.md b/doc/models/compounding-strategy.md index 2bb80c64..ec68b1f7 100644 --- a/doc/models/compounding-strategy.md +++ b/doc/models/compounding-strategy.md @@ -11,6 +11,6 @@ Applicable only to stackable coupons. For `compound`, Percentage-based discounts | Name | | --- | -| `Compound` | -| `Fullprice` | +| `COMPOUND` | +| `FULLPRICE` | diff --git a/doc/models/containers/calendar-billing-snap-day.md b/doc/models/containers/calendar-billing-snap-day.md index 69036d4a..77931080 100644 --- a/doc/models/containers/calendar-billing-snap-day.md +++ b/doc/models/containers/calendar-billing-snap-day.md @@ -10,5 +10,5 @@ | Type | Factory Method | | --- | --- | | `int` | CalendarBillingSnapDay.fromNumber(int number) | -| [`SnapDay`](../../../doc/models/snap-day.md) | CalendarBillingSnapDay.fromSnapDay(SnapDay snapDay) | +| `String` | CalendarBillingSnapDay.fromString(String string) | diff --git a/doc/models/containers/clone-component-price-point-component-id.md b/doc/models/containers/clone-component-price-point-component-id.md new file mode 100644 index 00000000..004c01c1 --- /dev/null +++ b/doc/models/containers/clone-component-price-point-component-id.md @@ -0,0 +1,14 @@ + +# Clone Component Price Point Component Id + +## Class Name + +`CloneComponentPricePointComponentId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | CloneComponentPricePointComponentId.fromNumber(int number) | +| `String` | CloneComponentPricePointComponentId.fromString(String string) | + diff --git a/doc/models/containers/clone-component-price-point-price-point-id.md b/doc/models/containers/clone-component-price-point-price-point-id.md new file mode 100644 index 00000000..015419ee --- /dev/null +++ b/doc/models/containers/clone-component-price-point-price-point-id.md @@ -0,0 +1,14 @@ + +# Clone Component Price Point Price Point Id + +## Class Name + +`CloneComponentPricePointPricePointId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | CloneComponentPricePointPricePointId.fromNumber(int number) | +| `String` | CloneComponentPricePointPricePointId.fromString(String string) | + diff --git a/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md new file mode 100644 index 00000000..4e71334e --- /dev/null +++ b/doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md @@ -0,0 +1,14 @@ + +# Scheduled Renewal Configuration Item Request Renewal Configuration Item + +## Class Name + +`ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) | +| [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) | + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-interval.md b/doc/models/containers/scheduled-renewal-product-price-point-interval.md new file mode 100644 index 00000000..f6498ed6 --- /dev/null +++ b/doc/models/containers/scheduled-renewal-product-price-point-interval.md @@ -0,0 +1,14 @@ + +# Scheduled Renewal Product Price Point Interval + +## Class Name + +`ScheduledRenewalProductPricePointInterval` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `String` | ScheduledRenewalProductPricePointInterval.fromString(String string) | +| `int` | ScheduledRenewalProductPricePointInterval.fromNumber(int number) | + diff --git a/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md new file mode 100644 index 00000000..ab39b59e --- /dev/null +++ b/doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md @@ -0,0 +1,14 @@ + +# Scheduled Renewal Product Price Point Price in Cents + +## Class Name + +`ScheduledRenewalProductPricePointPriceInCents` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `String` | ScheduledRenewalProductPricePointPriceInCents.fromString(String string) | +| `long` | ScheduledRenewalProductPricePointPriceInCents.fromLong(long mLong) | + diff --git a/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md new file mode 100644 index 00000000..3cbb524b --- /dev/null +++ b/doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md @@ -0,0 +1,14 @@ + +# Scheduled Renewal Update Request Renewal Configuration Item + +## Class Name + +`ScheduledRenewalUpdateRequestRenewalConfigurationItem` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`ScheduledRenewalItemRequestBodyComponent`](../../../doc/models/scheduled-renewal-item-request-body-component.md) | ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) | +| [`ScheduledRenewalItemRequestBodyProduct`](../../../doc/models/scheduled-renewal-item-request-body-product.md) | ScheduledRenewalUpdateRequestRenewalConfigurationItem.fromScheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) | + diff --git a/doc/models/containers/subscription-snap-day.md b/doc/models/containers/subscription-snap-day.md deleted file mode 100644 index 8a1642b6..00000000 --- a/doc/models/containers/subscription-snap-day.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Subscription Snap Day - -## Class Name - -`SubscriptionSnapDay` - -## Cases - -| Type | Factory Method | -| --- | --- | -| `int` | SubscriptionSnapDay.fromNumber(int number) | -| [`SnapDay`](../../../doc/models/snap-day.md) | SubscriptionSnapDay.fromSnapDay(SnapDay snapDay) | - diff --git a/doc/models/containers/update-subscription-snap-day.md b/doc/models/containers/update-subscription-snap-day.md index 5afc8b91..ece3e5fc 100644 --- a/doc/models/containers/update-subscription-snap-day.md +++ b/doc/models/containers/update-subscription-snap-day.md @@ -9,6 +9,6 @@ | Type | Factory Method | | --- | --- | +| `String` | UpdateSubscriptionSnapDay.fromString(String string) | | `int` | UpdateSubscriptionSnapDay.fromNumber(int number) | -| [`SnapDay`](../../../doc/models/snap-day.md) | UpdateSubscriptionSnapDay.fromSnapDay(SnapDay snapDay) | diff --git a/doc/models/contract.md b/doc/models/contract.md new file mode 100644 index 00000000..65fb7541 --- /dev/null +++ b/doc/models/contract.md @@ -0,0 +1,34 @@ + +# Contract + +Contract linked to the scheduled renewal configuration. + +## Structure + +`Contract` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) | +| `MaxioId` | `String` | Optional | - | String getMaxioId() | setMaxioId(String maxioId) | +| `Number` | `String` | Optional | - | String getNumber() | setNumber(String number) | +| `Register` | [`Register`](../../doc/models/register.md) | Optional | - | Register getRegister() | setRegister(Register register) | + +## Example (as JSON) + +```json +{ + "id": 136, + "maxio_id": "maxio_id8", + "number": "number6", + "register": { + "id": 54, + "maxio_id": "maxio_id4", + "name": "name2", + "currency_code": "currency_code2" + } +} +``` + diff --git a/doc/models/create-allocation-request.md b/doc/models/create-allocation-request.md index e6a3e0bf..1fbe5aa8 100644 --- a/doc/models/create-allocation-request.md +++ b/doc/models/create-allocation-request.md @@ -17,11 +17,11 @@ { "allocation": { "quantity": 228.94, + "decimal_quantity": "decimal_quantity6", + "previous_quantity": 254.04, + "decimal_previous_quantity": "decimal_previous_quantity8", "component_id": 8, - "memo": "memo2", - "proration_downgrade_scheme": "proration_downgrade_scheme4", - "proration_upgrade_scheme": "proration_upgrade_scheme6", - "accrue_charge": false + "memo": "memo2" } } ``` diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index 2b63157f..3bcbb915 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -10,27 +10,31 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `Quantity` | `double` | Required | The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1for on and 0 for off. | double getQuantity() | setQuantity(double quantity) | -| `ComponentId` | `Integer` | Optional | (required for the multiple allocations endpoint) The id associated with the component for which the allocation is being made | Integer getComponentId() | setComponentId(Integer componentId) | -| `Memo` | `String` | Optional | A memo to record along with the allocation | String getMemo() | setMemo(String memo) | +| `DecimalQuantity` | `String` | Optional | Decimal representation of the allocated quantity. Only valid when decimal
allocations are enabled for the component. | String getDecimalQuantity() | setDecimalQuantity(String decimalQuantity) | +| `PreviousQuantity` | `Double` | Optional | The quantity that was in effect before this allocation. Responses always
include this value; it may be supplied on preview requests to ensure the
expected change is evaluated. | Double getPreviousQuantity() | setPreviousQuantity(Double previousQuantity) | +| `DecimalPreviousQuantity` | `String` | Optional | Decimal representation of `previous_quantity`. Only valid when decimal
allocations are enabled for the component. | String getDecimalPreviousQuantity() | setDecimalPreviousQuantity(String decimalPreviousQuantity) | +| `ComponentId` | `Integer` | Optional | (required for the multiple allocations endpoint) The id associated with the component for which the allocation is being made. | Integer getComponentId() | setComponentId(Integer componentId) | +| `Memo` | `String` | Optional | A memo to record along with the allocation. | String getMemo() | setMemo(String memo) | | `ProrationDowngradeScheme` | `String` | Optional | The scheme used if the proration is a downgrade. Defaults to the site setting if one is not provided. | String getProrationDowngradeScheme() | setProrationDowngradeScheme(String prorationDowngradeScheme) | | `ProrationUpgradeScheme` | `String` | Optional | The scheme used if the proration is an upgrade. Defaults to the site setting if one is not provided. | String getProrationUpgradeScheme() | setProrationUpgradeScheme(String prorationUpgradeScheme) | -| `AccrueCharge` | `Boolean` | Optional | If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. Defaults to the site setting if one is not provided. | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`DowngradeCreditCreditType`](../../doc/models/downgrade-credit-credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are:

`full` - A full price credit is added for the amount owed.

`prorated` - A prorated credit is added for the amount owed.

`none` - No charge is added. | DowngradeCreditCreditType getDowngradeCredit() | setDowngradeCredit(DowngradeCreditCreditType downgradeCredit) | +| `UpgradeCharge` | [`UpgradeChargeCreditType`](../../doc/models/upgrade-charge-credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are:

`full` - A charge is added for the full price of the component.

`prorated` - A charge is added for the prorated price of the component change.

`none` - No charge is added. | UpgradeChargeCreditType getUpgradeCharge() | setUpgradeCharge(UpgradeChargeCreditType upgradeCharge) | +| `AccrueCharge` | `Boolean` | Optional | "If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.

`true` - Attempt to charge the customer at the next renewal.

`false` - Attempt to charge the customer right away. If it fails, the charge will be accrued until the next renewal.

Defaults to the site setting if unspecified in the request. | Boolean getAccrueCharge() | setAccrueCharge(Boolean accrueCharge) | | `InitiateDunning` | `Boolean` | Optional | If set to true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. Defaults to false. | Boolean getInitiateDunning() | setInitiateDunning(Boolean initiateDunning) | | `PricePointId` | [`CreateAllocationPricePointId`](../../doc/models/containers/create-allocation-price-point-id.md) | Optional | This is a container for one-of cases. | CreateAllocationPricePointId getPricePointId() | setPricePointId(CreateAllocationPricePointId pricePointId) | | `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled. | BillingSchedule getBillingSchedule() | setBillingSchedule(BillingSchedule billingSchedule) | +| `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | ComponentCustomPrice getCustomPrice() | setCustomPrice(ComponentCustomPrice customPrice) | ## Example (as JSON) ```json { "quantity": 8.06, + "decimal_quantity": "decimal_quantity4", + "previous_quantity": 218.92, + "decimal_previous_quantity": "decimal_previous_quantity0", "component_id": 192, - "memo": "memo4", - "proration_downgrade_scheme": "proration_downgrade_scheme2", - "proration_upgrade_scheme": "proration_upgrade_scheme4", - "accrue_charge": false + "memo": "memo4" } ``` diff --git a/doc/models/create-invoice-status.md b/doc/models/create-invoice-status.md index 6afef48f..73171a87 100644 --- a/doc/models/create-invoice-status.md +++ b/doc/models/create-invoice-status.md @@ -9,8 +9,8 @@ | Name | | --- | -| `Draft` | -| `Open` | +| `DRAFT` | +| `OPEN` | ## Example diff --git a/doc/models/create-prepayment-method.md b/doc/models/create-prepayment-method.md index 2f15e906..2b0a9c05 100644 --- a/doc/models/create-prepayment-method.md +++ b/doc/models/create-prepayment-method.md @@ -11,12 +11,12 @@ | Name | | --- | -| `Check` | -| `Cash` | -| `MoneyOrder` | -| `Ach` | -| `PaypalAccount` | -| `CreditCard` | -| `CreditCardOnFile` | -| `Other` | +| `CHECK` | +| `CASH` | +| `MONEY_ORDER` | +| `ACH` | +| `PAYPAL_ACCOUNT` | +| `CREDIT_CARD` | +| `CREDIT_CARD_ON_FILE` | +| `OTHER` | diff --git a/doc/models/create-signup-proforma-preview-include.md b/doc/models/create-signup-proforma-preview-include.md index 5330e39c..e652ba44 100644 --- a/doc/models/create-signup-proforma-preview-include.md +++ b/doc/models/create-signup-proforma-preview-include.md @@ -9,7 +9,7 @@ | Name | | --- | -| `NextProformaInvoice` | +| `NEXT_PROFORMA_INVOICE` | ## Example diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index 01620c61..95e578a4 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -13,7 +13,7 @@ | `ProductId` | `Integer` | Optional | The Product ID of the product for which you are creating a subscription. The product ID is not currently published, so we recommend using the API Handle instead. | Integer getProductId() | setProductId(Integer productId) | | `ProductPricePointHandle` | `String` | Optional | The user-friendly API handle of a product's particular price point. | String getProductPricePointHandle() | setProductPricePointHandle(String productPricePointHandle) | | `ProductPricePointId` | `Integer` | Optional | The ID of the particular price point on the product. | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | -| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | +| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | | `CouponCode` | `String` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | String getCouponCode() | setCouponCode(String couponCode) | | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | List getCouponCodes() | setCouponCodes(List couponCodes) | | `PaymentCollectionMethod` | [`CollectionMethod`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | CollectionMethod getPaymentCollectionMethod() | setPaymentCollectionMethod(CollectionMethod paymentCollectionMethod) | diff --git a/doc/models/create-usage-request.md b/doc/models/create-usage-request.md index e1e59538..d01909aa 100644 --- a/doc/models/create-usage-request.md +++ b/doc/models/create-usage-request.md @@ -27,6 +27,7 @@ "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", + "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, @@ -38,8 +39,7 @@ "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } } } diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md index 055e44df..51d6d3a1 100644 --- a/doc/models/create-usage.md +++ b/doc/models/create-usage.md @@ -30,6 +30,7 @@ "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", + "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, @@ -41,8 +42,7 @@ "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } } ``` diff --git a/doc/models/credit-card-vault.md b/doc/models/credit-card-vault.md index e2156056..64f7914a 100644 --- a/doc/models/credit-card-vault.md +++ b/doc/models/credit-card-vault.md @@ -11,37 +11,37 @@ The vault that stores the payment profile with the provided `vault_token`. Use ` | Name | | --- | -| `Adyen` | -| `Authorizenet` | -| `Beanstream` | -| `BlueSnap` | -| `Bogus` | -| `Braintree1` | -| `BraintreeBlue` | -| `Checkout` | -| `Cybersource` | -| `Elavon` | -| `Eway` | -| `EwayRapid` | -| `EwayRapidStd` | -| `Firstdata` | -| `Forte` | -| `Litle` | -| `MaxioPayments` | -| `Maxp` | -| `Moduslink` | -| `Moneris` | -| `Nmi` | -| `Orbital` | -| `PaymentExpress` | -| `Paymill` | -| `Paypal` | -| `PaypalComplete` | -| `Pin` | -| `Square` | -| `Stripe` | -| `StripeConnect` | -| `TrustCommerce` | -| `Unipaas` | -| `Wirecard` | +| `ADYEN` | +| `AUTHORIZENET` | +| `BEANSTREAM` | +| `BLUE_SNAP` | +| `BOGUS` | +| `BRAINTREE1` | +| `BRAINTREE_BLUE` | +| `CHECKOUT` | +| `CYBERSOURCE` | +| `ELAVON` | +| `EWAY` | +| `EWAY_RAPID` | +| `EWAY_RAPID_STD` | +| `FIRSTDATA` | +| `FORTE` | +| `LITLE` | +| `MAXIO_PAYMENTS` | +| `MAXP` | +| `MODUSLINK` | +| `MONERIS` | +| `NMI` | +| `ORBITAL` | +| `PAYMENT_EXPRESS` | +| `PAYMILL` | +| `PAYPAL` | +| `PAYPAL_COMPLETE` | +| `PIN` | +| `SQUARE` | +| `STRIPE` | +| `STRIPE_CONNECT` | +| `TRUST_COMMERCE` | +| `UNIPAAS` | +| `WIRECARD` | diff --git a/doc/models/credit-note-status.md b/doc/models/credit-note-status.md index 45f47344..1b4271a3 100644 --- a/doc/models/credit-note-status.md +++ b/doc/models/credit-note-status.md @@ -11,6 +11,6 @@ Current status of the credit note. | Name | | --- | -| `Open` | -| `Applied` | +| `OPEN` | +| `APPLIED` | diff --git a/doc/models/credit-scheme.md b/doc/models/credit-scheme.md index 1e2e746f..fdf3956d 100644 --- a/doc/models/credit-scheme.md +++ b/doc/models/credit-scheme.md @@ -9,7 +9,7 @@ | Name | | --- | -| `None` | -| `Credit` | -| `Refund` | +| `NONE` | +| `CREDIT` | +| `REFUND` | diff --git a/doc/models/credit-type.md b/doc/models/credit-type.md index 130b05f6..f7d2a090 100644 --- a/doc/models/credit-type.md +++ b/doc/models/credit-type.md @@ -2,7 +2,6 @@ # Credit Type The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. -Available values: `full`, `prorated`, `none`. ## Enumeration @@ -12,7 +11,7 @@ Available values: `full`, `prorated`, `none`. | Name | | --- | -| `Full` | -| `Prorated` | -| `None` | +| `FULL` | +| `PRORATED` | +| `NONE` | diff --git a/doc/models/currency-overage-prices.md b/doc/models/currency-overage-prices.md new file mode 100644 index 00000000..b30bafac --- /dev/null +++ b/doc/models/currency-overage-prices.md @@ -0,0 +1,50 @@ + +# Currency Overage Prices + +Extends a component price point with currency overage prices. + +## Structure + +`CurrencyOveragePrices` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) | +| `Type` | [`PricePointType`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | PricePointType getType() | setType(PricePointType type) | +| `Default` | `Boolean` | Optional | Note: Refer to type attribute instead | Boolean getDefault() | setDefault(Boolean mDefault) | +| `Name` | `String` | Optional | - | String getName() | setName(String name) | +| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | +| `ComponentId` | `Integer` | Optional | - | Integer getComponentId() | setComponentId(Integer componentId) | +| `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) | +| `ArchivedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | +| `CreatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `UpdatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | +| `Prices` | [`List`](../../doc/models/component-price.md) | Optional | - | List getPrices() | setPrices(List prices) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | +| `SubscriptionId` | `Integer` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `TaxIncluded` | `Boolean` | Optional | - | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | +| `Interval` | `Integer` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | Integer getInterval() | setInterval(Integer interval) | +| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | +| `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | List getCurrencyPrices() | setCurrencyPrices(List currencyPrices) | +| `OveragePrices` | [`List`](../../doc/models/component-price.md) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | List getOveragePrices() | setOveragePrices(List overagePrices) | +| `OveragePricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Optional | Applicable only to prepaid usage components. Pricing scheme for overage pricing. | PricingScheme getOveragePricingScheme() | setOveragePricingScheme(PricingScheme overagePricingScheme) | +| `RenewPrepaidAllocation` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | Boolean getRenewPrepaidAllocation() | setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) | +| `RolloverPrepaidRemainder` | `Boolean` | Optional | Applicable only to prepaid usage components. Boolean which controls whether or not remaining units should be rolled over to the next period. | Boolean getRolloverPrepaidRemainder() | setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) | +| `ExpirationInterval` | `Integer` | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The number of `expiration_interval_unit`s after which rollover amounts should expire. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) | +| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A string representing the expiration interval unit for this component, either month or day. | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) | +| `CurrencyOveragePrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | Applicable only to prepaid usage components. An array of currency pricing data for overage prices. | List getCurrencyOveragePrices() | setCurrencyOveragePrices(List currencyOveragePrices) | + +## Example (as JSON) + +```json +{ + "id": 50, + "type": "catalog", + "default": false, + "name": "name8", + "pricing_scheme": "stairstep" +} +``` + diff --git a/doc/models/currency-price-role.md b/doc/models/currency-price-role.md index 91332999..32d78475 100644 --- a/doc/models/currency-price-role.md +++ b/doc/models/currency-price-role.md @@ -11,7 +11,7 @@ Role for the price. | Name | | --- | -| `Baseline` | -| `Trial` | -| `Initial` | +| `BASELINE` | +| `TRIAL` | +| `INITIAL` | diff --git a/doc/models/custom-field-owner.md b/doc/models/custom-field-owner.md index 4fbe607e..77c2f821 100644 --- a/doc/models/custom-field-owner.md +++ b/doc/models/custom-field-owner.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Customer` | -| `Subscription` | +| `CUSTOMER` | +| `SUBSCRIPTION` | diff --git a/doc/models/debit-note-role.md b/doc/models/debit-note-role.md index d4bc83dd..9c261a9f 100644 --- a/doc/models/debit-note-role.md +++ b/doc/models/debit-note-role.md @@ -11,6 +11,6 @@ The role of the debit note. | Name | | --- | -| `Chargeback` | -| `Refund` | +| `CHARGEBACK` | +| `REFUND` | diff --git a/doc/models/debit-note-status.md b/doc/models/debit-note-status.md index 42e4a81c..48eb3cb1 100644 --- a/doc/models/debit-note-status.md +++ b/doc/models/debit-note-status.md @@ -11,8 +11,8 @@ Current status of the debit note. | Name | | --- | -| `Open` | -| `Applied` | -| `Banished` | -| `Paid` | +| `OPEN` | +| `APPLIED` | +| `BANISHED` | +| `PAID` | diff --git a/doc/models/deliver-proforma-invoice-request.md b/doc/models/deliver-proforma-invoice-request.md new file mode 100644 index 00000000..bd1eb570 --- /dev/null +++ b/doc/models/deliver-proforma-invoice-request.md @@ -0,0 +1,33 @@ + +# Deliver Proforma Invoice Request + +## Structure + +`DeliverProformaInvoiceRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `RecipientEmails` | `List` | Optional | - | List getRecipientEmails() | setRecipientEmails(List recipientEmails) | +| `CcRecipientEmails` | `List` | Optional | - | List getCcRecipientEmails() | setCcRecipientEmails(List ccRecipientEmails) | +| `BccRecipientEmails` | `List` | Optional | - | List getBccRecipientEmails() | setBccRecipientEmails(List bccRecipientEmails) | + +## Example (as JSON) + +```json +{ + "recipient_emails": [ + "recipient_emails9" + ], + "cc_recipient_emails": [ + "cc_recipient_emails8" + ], + "bcc_recipient_emails": [ + "bcc_recipient_emails2", + "bcc_recipient_emails3", + "bcc_recipient_emails4" + ] +} +``` + diff --git a/doc/models/direction.md b/doc/models/direction.md index 356aa18f..ef6c29da 100644 --- a/doc/models/direction.md +++ b/doc/models/direction.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Asc` | -| `Desc` | +| `ASC` | +| `DESC` | diff --git a/doc/models/discount-type.md b/doc/models/discount-type.md index b08252c9..77357ece 100644 --- a/doc/models/discount-type.md +++ b/doc/models/discount-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Amount` | -| `Percent` | +| `AMOUNT` | +| `PERCENT` | diff --git a/doc/models/downgrade-credit-credit-type.md b/doc/models/downgrade-credit-credit-type.md new file mode 100644 index 00000000..50858a3b --- /dev/null +++ b/doc/models/downgrade-credit-credit-type.md @@ -0,0 +1,23 @@ + +# Downgrade Credit Credit Type + +The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are: + +`full` - A full price credit is added for the amount owed. + +`prorated` - A prorated credit is added for the amount owed. + +`none` - No charge is added. + +## Enumeration + +`DowngradeCreditCreditType` + +## Fields + +| Name | +| --- | +| `FULL` | +| `PRORATED` | +| `NONE` | + diff --git a/doc/models/event-key.md b/doc/models/event-key.md index d38126df..feb40461 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -9,84 +9,84 @@ | Name | | --- | -| `PaymentSuccess` | -| `PaymentFailure` | -| `SignupSuccess` | -| `SignupFailure` | -| `DelayedSignupCreationSuccess` | -| `DelayedSignupCreationFailure` | -| `BillingDateChange` | -| `ExpirationDateChange` | -| `RenewalSuccess` | -| `RenewalFailure` | -| `SubscriptionStateChange` | -| `SubscriptionProductChange` | -| `PendingCancellationChange` | -| `ExpiringCard` | -| `CustomerUpdate` | -| `CustomerCreate` | -| `CustomerDelete` | -| `ComponentAllocationChange` | -| `MeteredUsage` | -| `PrepaidUsage` | -| `UpgradeDowngradeSuccess` | -| `UpgradeDowngradeFailure` | -| `StatementClosed` | -| `StatementSettled` | -| `SubscriptionCardUpdate` | -| `SubscriptionGroupCardUpdate` | -| `SubscriptionBankAccountUpdate` | -| `RefundSuccess` | -| `RefundFailure` | -| `UpcomingRenewalNotice` | -| `TrialEndNotice` | -| `DunningStepReached` | -| `InvoiceIssued` | -| `PrepaidSubscriptionBalanceChanged` | -| `SubscriptionGroupSignupSuccess` | -| `SubscriptionGroupSignupFailure` | -| `DirectDebitPaymentPaidOut` | -| `DirectDebitPaymentRejected` | -| `DirectDebitPaymentPending` | -| `PendingPaymentCreated` | -| `PendingPaymentFailed` | -| `PendingPaymentCompleted` | -| `ProformaInvoiceIssued` | -| `SubscriptionPrepaymentAccountBalanceChanged` | -| `SubscriptionServiceCreditAccountBalanceChanged` | -| `CustomFieldValueChange` | -| `ItemPricePointChanged` | -| `RenewalSuccessRecreated` | -| `RenewalFailureRecreated` | -| `PaymentSuccessRecreated` | -| `PaymentFailureRecreated` | -| `SubscriptionDeletion` | -| `SubscriptionGroupBankAccountUpdate` | -| `SubscriptionPaypalAccountUpdate` | -| `SubscriptionGroupPaypalAccountUpdate` | -| `SubscriptionCustomerChange` | -| `AccountTransactionChanged` | -| `GoCardlessPaymentPaidOut` | -| `GoCardlessPaymentRejected` | -| `GoCardlessPaymentPending` | -| `StripeDirectDebitPaymentPaidOut` | -| `StripeDirectDebitPaymentRejected` | -| `StripeDirectDebitPaymentPending` | -| `MaxioPaymentsDirectDebitPaymentPaidOut` | -| `MaxioPaymentsDirectDebitPaymentRejected` | -| `MaxioPaymentsDirectDebitPaymentPending` | -| `InvoiceInCollectionsCanceled` | -| `SubscriptionAddedToGroup` | -| `SubscriptionRemovedFromGroup` | -| `ChargebackOpened` | -| `ChargebackLost` | -| `ChargebackAccepted` | -| `ChargebackClosed` | -| `ChargebackWon` | -| `PaymentCollectionMethodChanged` | -| `ComponentBillingDateChanged` | -| `SubscriptionTermRenewalScheduled` | -| `SubscriptionTermRenewalPending` | -| `SubscriptionTermRenewalActivated` | -| `SubscriptionTermRenewalRemoved` | +| `PAYMENT_SUCCESS` | +| `PAYMENT_FAILURE` | +| `SIGNUP_SUCCESS` | +| `SIGNUP_FAILURE` | +| `DELAYED_SIGNUP_CREATION_SUCCESS` | +| `DELAYED_SIGNUP_CREATION_FAILURE` | +| `BILLING_DATE_CHANGE` | +| `EXPIRATION_DATE_CHANGE` | +| `RENEWAL_SUCCESS` | +| `RENEWAL_FAILURE` | +| `SUBSCRIPTION_STATE_CHANGE` | +| `SUBSCRIPTION_PRODUCT_CHANGE` | +| `PENDING_CANCELLATION_CHANGE` | +| `EXPIRING_CARD` | +| `CUSTOMER_UPDATE` | +| `CUSTOMER_CREATE` | +| `CUSTOMER_DELETE` | +| `COMPONENT_ALLOCATION_CHANGE` | +| `METERED_USAGE` | +| `PREPAID_USAGE` | +| `UPGRADE_DOWNGRADE_SUCCESS` | +| `UPGRADE_DOWNGRADE_FAILURE` | +| `STATEMENT_CLOSED` | +| `STATEMENT_SETTLED` | +| `SUBSCRIPTION_CARD_UPDATE` | +| `SUBSCRIPTION_GROUP_CARD_UPDATE` | +| `SUBSCRIPTION_BANK_ACCOUNT_UPDATE` | +| `REFUND_SUCCESS` | +| `REFUND_FAILURE` | +| `UPCOMING_RENEWAL_NOTICE` | +| `TRIAL_END_NOTICE` | +| `DUNNING_STEP_REACHED` | +| `INVOICE_ISSUED` | +| `PREPAID_SUBSCRIPTION_BALANCE_CHANGED` | +| `SUBSCRIPTION_GROUP_SIGNUP_SUCCESS` | +| `SUBSCRIPTION_GROUP_SIGNUP_FAILURE` | +| `DIRECT_DEBIT_PAYMENT_PAID_OUT` | +| `DIRECT_DEBIT_PAYMENT_REJECTED` | +| `DIRECT_DEBIT_PAYMENT_PENDING` | +| `PENDING_PAYMENT_CREATED` | +| `PENDING_PAYMENT_FAILED` | +| `PENDING_PAYMENT_COMPLETED` | +| `PROFORMA_INVOICE_ISSUED` | +| `SUBSCRIPTION_PREPAYMENT_ACCOUNT_BALANCE_CHANGED` | +| `SUBSCRIPTION_SERVICE_CREDIT_ACCOUNT_BALANCE_CHANGED` | +| `CUSTOM_FIELD_VALUE_CHANGE` | +| `ITEM_PRICE_POINT_CHANGED` | +| `RENEWAL_SUCCESS_RECREATED` | +| `RENEWAL_FAILURE_RECREATED` | +| `PAYMENT_SUCCESS_RECREATED` | +| `PAYMENT_FAILURE_RECREATED` | +| `SUBSCRIPTION_DELETION` | +| `SUBSCRIPTION_GROUP_BANK_ACCOUNT_UPDATE` | +| `SUBSCRIPTION_PAYPAL_ACCOUNT_UPDATE` | +| `SUBSCRIPTION_GROUP_PAYPAL_ACCOUNT_UPDATE` | +| `SUBSCRIPTION_CUSTOMER_CHANGE` | +| `ACCOUNT_TRANSACTION_CHANGED` | +| `GO_CARDLESS_PAYMENT_PAID_OUT` | +| `GO_CARDLESS_PAYMENT_REJECTED` | +| `GO_CARDLESS_PAYMENT_PENDING` | +| `STRIPE_DIRECT_DEBIT_PAYMENT_PAID_OUT` | +| `STRIPE_DIRECT_DEBIT_PAYMENT_REJECTED` | +| `STRIPE_DIRECT_DEBIT_PAYMENT_PENDING` | +| `MAXIO_PAYMENTS_DIRECT_DEBIT_PAYMENT_PAID_OUT` | +| `MAXIO_PAYMENTS_DIRECT_DEBIT_PAYMENT_REJECTED` | +| `MAXIO_PAYMENTS_DIRECT_DEBIT_PAYMENT_PENDING` | +| `INVOICE_IN_COLLECTIONS_CANCELED` | +| `SUBSCRIPTION_ADDED_TO_GROUP` | +| `SUBSCRIPTION_REMOVED_FROM_GROUP` | +| `CHARGEBACK_OPENED` | +| `CHARGEBACK_LOST` | +| `CHARGEBACK_ACCEPTED` | +| `CHARGEBACK_CLOSED` | +| `CHARGEBACK_WON` | +| `PAYMENT_COLLECTION_METHOD_CHANGED` | +| `COMPONENT_BILLING_DATE_CHANGED` | +| `SUBSCRIPTION_TERM_RENEWAL_SCHEDULED` | +| `SUBSCRIPTION_TERM_RENEWAL_PENDING` | +| `SUBSCRIPTION_TERM_RENEWAL_ACTIVATED` | +| `SUBSCRIPTION_TERM_RENEWAL_REMOVED` | diff --git a/doc/models/expiration-interval-unit.md b/doc/models/expiration-interval-unit.md index c0ee210b..d6b75bef 100644 --- a/doc/models/expiration-interval-unit.md +++ b/doc/models/expiration-interval-unit.md @@ -9,7 +9,7 @@ | Name | | --- | -| `Day` | -| `Month` | -| `Never` | +| `DAY` | +| `MONTH` | +| `NEVER` | diff --git a/doc/models/failed-payment-action.md b/doc/models/failed-payment-action.md index 9a6a809b..4d48d023 100644 --- a/doc/models/failed-payment-action.md +++ b/doc/models/failed-payment-action.md @@ -15,7 +15,7 @@ Action taken when payment for an invoice fails: | Name | | --- | -| `LeaveOpenInvoice` | -| `RollbackToPending` | -| `InitiateDunning` | +| `LEAVE_OPEN_INVOICE` | +| `ROLLBACK_TO_PENDING` | +| `INITIATE_DUNNING` | diff --git a/doc/models/first-charge-type.md b/doc/models/first-charge-type.md index c35a7c93..9fa953d6 100644 --- a/doc/models/first-charge-type.md +++ b/doc/models/first-charge-type.md @@ -9,7 +9,7 @@ | Name | | --- | -| `Prorated` | -| `Immediate` | -| `Delayed` | +| `PRORATED` | +| `IMMEDIATE` | +| `DELAYED` | diff --git a/doc/models/group-target-type.md b/doc/models/group-target-type.md index bce9ce84..431d4fba 100644 --- a/doc/models/group-target-type.md +++ b/doc/models/group-target-type.md @@ -11,9 +11,9 @@ The type of object indicated by the id attribute. | Name | | --- | -| `Customer` | -| `Subscription` | -| `Self` | -| `Parent` | -| `Eldest` | +| `CUSTOMER` | +| `SUBSCRIPTION` | +| `SELF` | +| `PARENT` | +| `ELDEST` | diff --git a/doc/models/group-type.md b/doc/models/group-type.md index 97c0dfbc..bc9c31b9 100644 --- a/doc/models/group-type.md +++ b/doc/models/group-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `SingleCustomer` | -| `MultipleCustomers` | +| `SINGLE_CUSTOMER` | +| `MULTIPLE_CUSTOMERS` | diff --git a/doc/models/include-not-null.md b/doc/models/include-not-null.md index 3b297da0..694ffcf9 100644 --- a/doc/models/include-not-null.md +++ b/doc/models/include-not-null.md @@ -11,7 +11,7 @@ Passed as a parameter to list methods to return only non null values. | Name | | --- | -| `NotNull` | +| `NOT_NULL` | ## Example diff --git a/doc/models/include-null-or-not-null.md b/doc/models/include-null-or-not-null.md index c9209811..1c9e442d 100644 --- a/doc/models/include-null-or-not-null.md +++ b/doc/models/include-null-or-not-null.md @@ -11,8 +11,8 @@ Allows to filter by `not_null` or `null`. | Name | | --- | -| `NotNull` | -| `Null` | +| `NOT_NULL` | +| `ENUM_NULL` | ## Example diff --git a/doc/models/include-option.md b/doc/models/include-option.md index 41d05156..0ad125f0 100644 --- a/doc/models/include-option.md +++ b/doc/models/include-option.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Exclude` | -| `Include` | +| `EXCLUDE` | +| `INCLUDE` | diff --git a/doc/models/interval-unit.md b/doc/models/interval-unit.md index 94829529..7e4cab3b 100644 --- a/doc/models/interval-unit.md +++ b/doc/models/interval-unit.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Day` | -| `Month` | +| `DAY` | +| `MONTH` | diff --git a/doc/models/invoice-consolidation-level.md b/doc/models/invoice-consolidation-level.md index 9afb1551..8b4786e9 100644 --- a/doc/models/invoice-consolidation-level.md +++ b/doc/models/invoice-consolidation-level.md @@ -19,7 +19,7 @@ See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/ | Name | | --- | -| `None` | -| `Child` | -| `Parent` | +| `NONE` | +| `CHILD` | +| `PARENT` | diff --git a/doc/models/invoice-date-field.md b/doc/models/invoice-date-field.md index 350228c9..05d7f5f1 100644 --- a/doc/models/invoice-date-field.md +++ b/doc/models/invoice-date-field.md @@ -9,11 +9,11 @@ | Name | | --- | -| `CreatedAt` | -| `DueDate` | -| `IssueDate` | -| `UpdatedAt` | -| `PaidDate` | +| `CREATED_AT` | +| `DUE_DATE` | +| `ISSUE_DATE` | +| `UPDATED_AT` | +| `PAID_DATE` | ## Example diff --git a/doc/models/invoice-discount-source-type.md b/doc/models/invoice-discount-source-type.md index fe7f4087..7218f6c9 100644 --- a/doc/models/invoice-discount-source-type.md +++ b/doc/models/invoice-discount-source-type.md @@ -9,7 +9,7 @@ | Name | | --- | -| `Coupon` | -| `Referral` | -| `EnumAdHocCoupon` | +| `COUPON` | +| `REFERRAL` | +| `ENUM_AD_HOC_COUPON` | diff --git a/doc/models/invoice-discount-type.md b/doc/models/invoice-discount-type.md index 186af0a5..3e5355b5 100644 --- a/doc/models/invoice-discount-type.md +++ b/doc/models/invoice-discount-type.md @@ -9,7 +9,7 @@ | Name | | --- | -| `Percentage` | -| `FlatAmount` | -| `Rollover` | +| `PERCENTAGE` | +| `FLAT_AMOUNT` | +| `ROLLOVER` | diff --git a/doc/models/invoice-event-payment-method.md b/doc/models/invoice-event-payment-method.md index 56503b33..8df097ea 100644 --- a/doc/models/invoice-event-payment-method.md +++ b/doc/models/invoice-event-payment-method.md @@ -9,9 +9,9 @@ | Name | | --- | -| `ApplePay` | -| `BankAccount` | -| `CreditCard` | -| `External` | -| `PaypalAccount` | +| `APPLE_PAY` | +| `BANK_ACCOUNT` | +| `CREDIT_CARD` | +| `EXTERNAL` | +| `PAYPAL_ACCOUNT` | diff --git a/doc/models/invoice-event-type.md b/doc/models/invoice-event-type.md index a6318ab4..c6c09926 100644 --- a/doc/models/invoice-event-type.md +++ b/doc/models/invoice-event-type.md @@ -11,19 +11,19 @@ Invoice Event Type | Name | | --- | -| `IssueInvoice` | -| `ApplyCreditNote` | -| `CreateCreditNote` | -| `ApplyPayment` | -| `ApplyDebitNote` | -| `CreateDebitNote` | -| `RefundInvoice` | -| `VoidInvoice` | -| `VoidRemainder` | -| `BackportInvoice` | -| `ChangeInvoiceStatus` | -| `ChangeInvoiceCollectionMethod` | -| `RemovePayment` | -| `FailedPayment` | -| `ChangeChargebackStatus` | +| `ISSUE_INVOICE` | +| `APPLY_CREDIT_NOTE` | +| `CREATE_CREDIT_NOTE` | +| `APPLY_PAYMENT` | +| `APPLY_DEBIT_NOTE` | +| `CREATE_DEBIT_NOTE` | +| `REFUND_INVOICE` | +| `VOID_INVOICE` | +| `VOID_REMAINDER` | +| `BACKPORT_INVOICE` | +| `CHANGE_INVOICE_STATUS` | +| `CHANGE_INVOICE_COLLECTION_METHOD` | +| `REMOVE_PAYMENT` | +| `FAILED_PAYMENT` | +| `CHANGE_CHARGEBACK_STATUS` | diff --git a/doc/models/invoice-payment-method-type.md b/doc/models/invoice-payment-method-type.md index 5b3c3461..a920712d 100644 --- a/doc/models/invoice-payment-method-type.md +++ b/doc/models/invoice-payment-method-type.md @@ -11,10 +11,10 @@ The type of payment method used. Defaults to other. | Name | | --- | -| `CreditCard` | -| `Check` | -| `Cash` | -| `MoneyOrder` | -| `Ach` | -| `Other` | +| `CREDIT_CARD` | +| `CHECK` | +| `CASH` | +| `MONEY_ORDER` | +| `ACH` | +| `OTHER` | diff --git a/doc/models/invoice-payment-type.md b/doc/models/invoice-payment-type.md index 1547e4f9..8283fc2f 100644 --- a/doc/models/invoice-payment-type.md +++ b/doc/models/invoice-payment-type.md @@ -11,8 +11,8 @@ The type of payment to be applied to an Invoice. Defaults to external. | Name | | --- | -| `External` | -| `Prepayment` | -| `ServiceCredit` | -| `Payment` | +| `EXTERNAL` | +| `PREPAYMENT` | +| `SERVICE_CREDIT` | +| `PAYMENT` | diff --git a/doc/models/invoice-role.md b/doc/models/invoice-role.md index 0fb77224..2f75a786 100644 --- a/doc/models/invoice-role.md +++ b/doc/models/invoice-role.md @@ -9,14 +9,14 @@ | Name | | --- | -| `Unset` | -| `Signup` | -| `Renewal` | -| `Usage` | -| `Reactivation` | -| `Proration` | -| `Migration` | -| `Adhoc` | -| `Backport` | -| `Backportbalancereconciliation` | +| `UNSET` | +| `SIGNUP` | +| `RENEWAL` | +| `USAGE` | +| `REACTIVATION` | +| `PRORATION` | +| `MIGRATION` | +| `ADHOC` | +| `BACKPORT` | +| `BACKPORTBALANCERECONCILIATION` | diff --git a/doc/models/invoice-sort-field.md b/doc/models/invoice-sort-field.md index 030ebb64..83fcdee2 100644 --- a/doc/models/invoice-sort-field.md +++ b/doc/models/invoice-sort-field.md @@ -9,14 +9,14 @@ | Name | | --- | -| `Status` | -| `TotalAmount` | -| `DueAmount` | -| `CreatedAt` | -| `UpdatedAt` | -| `IssueDate` | -| `DueDate` | -| `Number` | +| `STATUS` | +| `TOTAL_AMOUNT` | +| `DUE_AMOUNT` | +| `CREATED_AT` | +| `UPDATED_AT` | +| `ISSUE_DATE` | +| `DUE_DATE` | +| `NUMBER` | ## Example diff --git a/doc/models/invoice-status.md b/doc/models/invoice-status.md index 43da5bc4..87ba0765 100644 --- a/doc/models/invoice-status.md +++ b/doc/models/invoice-status.md @@ -11,11 +11,11 @@ The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk. | Name | | --- | -| `Draft` | -| `Open` | -| `Paid` | -| `Pending` | -| `Voided` | -| `Canceled` | -| `Processing` | +| `DRAFT` | +| `OPEN` | +| `PAID` | +| `PENDING` | +| `VOIDED` | +| `CANCELED` | +| `PROCESSING` | diff --git a/doc/models/item-category.md b/doc/models/item-category.md index 3d882ad3..8a73b8c3 100644 --- a/doc/models/item-category.md +++ b/doc/models/item-category.md @@ -11,11 +11,11 @@ One of the following: Business Software, Consumer Software, Digital Services, Ph | Name | | --- | -| `EnumBusinessSoftware` | -| `EnumConsumerSoftware` | -| `EnumDigitalServices` | -| `EnumPhysicalGoods` | -| `Other` | +| `ENUM_BUSINESS_SOFTWARE` | +| `ENUM_CONSUMER_SOFTWARE` | +| `ENUM_DIGITAL_SERVICES` | +| `ENUM_PHYSICAL_GOODS` | +| `OTHER` | ## Example diff --git a/doc/models/line-item-kind.md b/doc/models/line-item-kind.md index 3e5e5d1d..380d29ea 100644 --- a/doc/models/line-item-kind.md +++ b/doc/models/line-item-kind.md @@ -11,14 +11,14 @@ A handle for the line item kind | Name | | --- | -| `Baseline` | -| `Initial` | -| `Trial` | -| `QuantityBasedComponent` | -| `PrepaidUsageComponent` | -| `OnOffComponent` | -| `MeteredComponent` | -| `EventBasedComponent` | -| `Coupon` | -| `Tax` | +| `BASELINE` | +| `INITIAL` | +| `TRIAL` | +| `QUANTITY_BASED_COMPONENT` | +| `PREPAID_USAGE_COMPONENT` | +| `ON_OFF_COMPONENT` | +| `METERED_COMPONENT` | +| `EVENT_BASED_COMPONENT` | +| `COUPON` | +| `TAX` | diff --git a/doc/models/line-item-transaction-type.md b/doc/models/line-item-transaction-type.md index 64e30b89..f5847f6b 100644 --- a/doc/models/line-item-transaction-type.md +++ b/doc/models/line-item-transaction-type.md @@ -11,11 +11,11 @@ A handle for the line item transaction type | Name | | --- | -| `Charge` | -| `Credit` | -| `Adjustment` | -| `Payment` | -| `Refund` | -| `InfoTransaction` | -| `PaymentAuthorization` | +| `CHARGE` | +| `CREDIT` | +| `ADJUSTMENT` | +| `PAYMENT` | +| `REFUND` | +| `INFO_TRANSACTION` | +| `PAYMENT_AUTHORIZATION` | diff --git a/doc/models/list-all-component-price-points-input.md b/doc/models/list-all-component-price-points-input.md new file mode 100644 index 00000000..147038ca --- /dev/null +++ b/doc/models/list-all-component-price-points-input.md @@ -0,0 +1,56 @@ + +# List All Component Price Points Input + +Input structure for the method ListAllComponentPricePoints + +## Structure + +`ListAllComponentPricePointsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Include` | [`ListComponentsPricePointsInclude`](../../doc/models/list-components-price-points-include.md) | Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | ListComponentsPricePointsInclude getInclude() | setInclude(ListComponentsPricePointsInclude include) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Optional | Filter to use for List PricePoints operations | ListPricePointsFilter getFilter() | setFilter(ListPricePointsFilter filter) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListAllComponentPricePointsInput; +import com.maxio.advancedbilling.models.ListComponentsPricePointsInclude; +import com.maxio.advancedbilling.models.ListPricePointsFilter; +import com.maxio.advancedbilling.models.PricePointType; +import com.maxio.advancedbilling.models.SortingDirection; +import java.util.Arrays; + +ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllComponentPricePointsInput.Builder() + .include(ListComponentsPricePointsInclude.CURRENCY_PRICES) + .page(1) + .perPage(50) + .direction(SortingDirection.ASC) + .filter(new ListPricePointsFilter.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .type(Arrays.asList( + PricePointType.CATALOG, + PricePointType.ENUM_DEFAULT, + PricePointType.CUSTOM + )) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .build(); +``` + diff --git a/doc/models/list-all-product-price-points-input.md b/doc/models/list-all-product-price-points-input.md new file mode 100644 index 00000000..0daddd6f --- /dev/null +++ b/doc/models/list-all-product-price-points-input.md @@ -0,0 +1,56 @@ + +# List All Product Price Points Input + +Input structure for the method ListAllProductPricePoints + +## Structure + +`ListAllProductPricePointsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Filter` | [`ListPricePointsFilter`](../../doc/models/list-price-points-filter.md) | Optional | Filter to use for List PricePoints operations | ListPricePointsFilter getFilter() | setFilter(ListPricePointsFilter filter) | +| `Include` | [`ListProductsPricePointsInclude`](../../doc/models/list-products-price-points-include.md) | Optional | Allows including additional data in the response. Use in query: `include=currency_prices`. | ListProductsPricePointsInclude getInclude() | setInclude(ListProductsPricePointsInclude include) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListAllProductPricePointsInput; +import com.maxio.advancedbilling.models.ListPricePointsFilter; +import com.maxio.advancedbilling.models.ListProductsPricePointsInclude; +import com.maxio.advancedbilling.models.PricePointType; +import com.maxio.advancedbilling.models.SortingDirection; +import java.util.Arrays; + +ListAllProductPricePointsInput listAllProductPricePointsInput = new ListAllProductPricePointsInput.Builder() + .direction(SortingDirection.ASC) + .filter(new ListPricePointsFilter.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .type(Arrays.asList( + PricePointType.CATALOG, + PricePointType.ENUM_DEFAULT, + PricePointType.CUSTOM + )) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .include(ListProductsPricePointsInclude.CURRENCY_PRICES) + .page(1) + .perPage(50) + .build(); +``` + diff --git a/doc/models/list-chargify-js-public-keys-input.md b/doc/models/list-chargify-js-public-keys-input.md new file mode 100644 index 00000000..3a6e4a1c --- /dev/null +++ b/doc/models/list-chargify-js-public-keys-input.md @@ -0,0 +1,27 @@ + +# List Chargify Js Public Keys Input + +Input structure for the method ListChargifyJsPublicKeys + +## Structure + +`ListChargifyJsPublicKeysInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListChargifyJsPublicKeysInput; + +ListChargifyJsPublicKeysInput listChargifyJsPublicKeysInput = new ListChargifyJsPublicKeysInput.Builder() + .page(1) + .perPage(50) + .build(); +``` + diff --git a/doc/models/list-component-price-points-input.md b/doc/models/list-component-price-points-input.md new file mode 100644 index 00000000..cd5eb622 --- /dev/null +++ b/doc/models/list-component-price-points-input.md @@ -0,0 +1,34 @@ + +# List Component Price Points Input + +Input structure for the method ListComponentPricePoints + +## Structure + +`ListComponentPricePointsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ComponentId` | `int` | Required | The Advanced Billing id of the component | int getComponentId() | setComponentId(int componentId) | +| `CurrencyPrices` | `Boolean` | Optional | Include an array of currency price data | Boolean getCurrencyPrices() | setCurrencyPrices(Boolean currencyPrices) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `FilterType` | [`List`](../../doc/models/price-point-type.md) | Optional | Use in query: `filter[type]=catalog,default`. | List getFilterType() | setFilterType(List filterType) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListComponentPricePointsInput; + +ListComponentPricePointsInput listComponentPricePointsInput = new ListComponentPricePointsInput.Builder( + 222 +) +.currencyPrices(false) +.page(1) +.perPage(50) +.filterType(Liquid error: Value cannot be null. (Parameter 'key')) +.build(); +``` + diff --git a/doc/models/list-components-for-product-family-input.md b/doc/models/list-components-for-product-family-input.md new file mode 100644 index 00000000..8c3ff83e --- /dev/null +++ b/doc/models/list-components-for-product-family-input.md @@ -0,0 +1,54 @@ + +# List Components for Product Family Input + +Input structure for the method ListComponentsForProductFamily + +## Structure + +`ListComponentsForProductFamilyInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ProductFamilyId` | `int` | Required | The Advanced Billing id of the product family | int getProductFamilyId() | setProductFamilyId(int productFamilyId) | +| `IncludeArchived` | `Boolean` | Optional | Include archived items. | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Optional | Filter to use for List Components operations | ListComponentsFilter getFilter() | setFilter(ListComponentsFilter filter) | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `EndDate` | `String` | 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. | String getEndDate() | setEndDate(String endDate) | +| `EndDatetime` | `String` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional. | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `StartDate` | `String` | 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. | String getStartDate() | setStartDate(String startDate) | +| `StartDatetime` | `String` | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | + +## Example + +```java +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListComponentsFilter; +import com.maxio.advancedbilling.models.ListComponentsForProductFamilyInput; +import java.util.Arrays; + +ListComponentsForProductFamilyInput listComponentsForProductFamilyInput = new ListComponentsForProductFamilyInput.Builder( + 140 +) +.includeArchived(false) +.page(1) +.perPage(50) +.filter(new ListComponentsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .useSiteExchangeRate(false) + .build()) +.dateField(BasicDateField.UPDATED_AT) +.endDate("end_date0") +.endDatetime("end_datetime8") +.startDate("start_date6") +.startDatetime("start_datetime0") +.build(); +``` + diff --git a/doc/models/list-components-input.md b/doc/models/list-components-input.md new file mode 100644 index 00000000..44ea5f44 --- /dev/null +++ b/doc/models/list-components-input.md @@ -0,0 +1,51 @@ + +# List Components Input + +Input structure for the method ListComponents + +## Structure + +`ListComponentsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `String` | 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. | String getStartDate() | setStartDate(String startDate) | +| `EndDate` | `String` | 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. | String getEndDate() | setEndDate(String endDate) | +| `StartDatetime` | `String` | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `EndDatetime` | `String` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `IncludeArchived` | `Boolean` | Optional | Include archived items | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Optional | Filter to use for List Components operations | ListComponentsFilter getFilter() | setFilter(ListComponentsFilter filter) | + +## Example + +```java +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListComponentsFilter; +import com.maxio.advancedbilling.models.ListComponentsInput; +import java.util.Arrays; + +ListComponentsInput listComponentsInput = new ListComponentsInput.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate("start_date6") + .endDate("end_date0") + .startDatetime("start_datetime0") + .endDatetime("end_datetime8") + .includeArchived(false) + .page(1) + .perPage(50) + .filter(new ListComponentsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .useSiteExchangeRate(false) + .build()) + .build(); +``` + diff --git a/doc/models/list-components-price-points-include.md b/doc/models/list-components-price-points-include.md index 78039a91..31cc7ea7 100644 --- a/doc/models/list-components-price-points-include.md +++ b/doc/models/list-components-price-points-include.md @@ -9,7 +9,7 @@ | Name | | --- | -| `CurrencyPrices` | +| `CURRENCY_PRICES` | ## Example diff --git a/doc/models/list-consolidated-invoice-segments-input.md b/doc/models/list-consolidated-invoice-segments-input.md new file mode 100644 index 00000000..389eb153 --- /dev/null +++ b/doc/models/list-consolidated-invoice-segments-input.md @@ -0,0 +1,33 @@ + +# List Consolidated Invoice Segments Input + +Input structure for the method ListConsolidatedInvoiceSegments + +## Structure + +`ListConsolidatedInvoiceSegmentsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `InvoiceUid` | `String` | Required | The unique identifier of the consolidated invoice | String getInvoiceUid() | setInvoiceUid(String invoiceUid) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | Sort direction of the returned segments.

**Default**: `Direction.ASC` | Direction getDirection() | setDirection(Direction direction) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.ListConsolidatedInvoiceSegmentsInput; + +ListConsolidatedInvoiceSegmentsInput listConsolidatedInvoiceSegmentsInput = new ListConsolidatedInvoiceSegmentsInput.Builder( + "invoice_uid0" +) +.page(1) +.perPage(50) +.direction(Direction.ASC) +.build(); +``` + diff --git a/doc/models/list-coupon-subcodes-input.md b/doc/models/list-coupon-subcodes-input.md new file mode 100644 index 00000000..7f6f69f0 --- /dev/null +++ b/doc/models/list-coupon-subcodes-input.md @@ -0,0 +1,30 @@ + +# List Coupon Subcodes Input + +Input structure for the method ListCouponSubcodes + +## Structure + +`ListCouponSubcodesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `CouponId` | `int` | Required | The Advanced Billing id of the coupon | int getCouponId() | setCouponId(int couponId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListCouponSubcodesInput; + +ListCouponSubcodesInput listCouponSubcodesInput = new ListCouponSubcodesInput.Builder( + 162 +) +.page(1) +.perPage(50) +.build(); +``` + diff --git a/doc/models/list-coupons-for-product-family-input.md b/doc/models/list-coupons-for-product-family-input.md new file mode 100644 index 00000000..e3314da7 --- /dev/null +++ b/doc/models/list-coupons-for-product-family-input.md @@ -0,0 +1,53 @@ + +# List Coupons for Product Family Input + +Input structure for the method ListCouponsForProductFamily + +## Structure + +`ListCouponsForProductFamilyInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ProductFamilyId` | `int` | Required | The Advanced Billing id of the product family to which the coupon belongs | int getProductFamilyId() | setProductFamilyId(int productFamilyId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Optional | Filter to use for List Coupons operations | ListCouponsFilter getFilter() | setFilter(ListCouponsFilter filter) | +| `CurrencyPrices` | `Boolean` | Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | Boolean getCurrencyPrices() | setCurrencyPrices(Boolean currencyPrices) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListCouponsFilter; +import com.maxio.advancedbilling.models.ListCouponsForProductFamilyInput; +import java.util.Arrays; + +ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCouponsForProductFamilyInput.Builder( + 140 +) +.page(1) +.perPage(50) +.filter(new ListCouponsFilter.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .codes(Arrays.asList( + "free", + "free_trial" + )) + .build()) +.currencyPrices(true) +.build(); +``` + diff --git a/doc/models/list-coupons-input.md b/doc/models/list-coupons-input.md new file mode 100644 index 00000000..9c398a19 --- /dev/null +++ b/doc/models/list-coupons-input.md @@ -0,0 +1,50 @@ + +# List Coupons Input + +Input structure for the method ListCoupons + +## Structure + +`ListCouponsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Optional | Filter to use for List Coupons operations | ListCouponsFilter getFilter() | setFilter(ListCouponsFilter filter) | +| `CurrencyPrices` | `Boolean` | Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | Boolean getCurrencyPrices() | setCurrencyPrices(Boolean currencyPrices) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListCouponsFilter; +import com.maxio.advancedbilling.models.ListCouponsInput; +import java.util.Arrays; + +ListCouponsInput listCouponsInput = new ListCouponsInput.Builder() + .page(1) + .perPage(50) + .filter(new ListCouponsFilter.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2011-12-17")) + .endDate(DateTimeHelper.fromSimpleDate("2011-12-15")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("12/19/2011 09:15:30")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("06/07/2019 17:20:06")) + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .codes(Arrays.asList( + "free", + "free_trial" + )) + .build()) + .currencyPrices(true) + .build(); +``` + diff --git a/doc/models/list-credit-notes-input.md b/doc/models/list-credit-notes-input.md new file mode 100644 index 00000000..2ea76a0d --- /dev/null +++ b/doc/models/list-credit-notes-input.md @@ -0,0 +1,39 @@ + +# List Credit Notes Input + +Input structure for the method ListCreditNotes + +## Structure + +`ListCreditNotesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `Integer` | Optional | The subscription's Advanced Billing id | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `LineItems` | `Boolean` | Optional | Include line items data

**Default**: `false` | Boolean getLineItems() | setLineItems(Boolean lineItems) | +| `Discounts` | `Boolean` | Optional | Include discounts data

**Default**: `false` | Boolean getDiscounts() | setDiscounts(Boolean discounts) | +| `Taxes` | `Boolean` | Optional | Include taxes data

**Default**: `false` | Boolean getTaxes() | setTaxes(Boolean taxes) | +| `Refunds` | `Boolean` | Optional | Include refunds data

**Default**: `false` | Boolean getRefunds() | setRefunds(Boolean refunds) | +| `Applications` | `Boolean` | Optional | Include applications data

**Default**: `false` | Boolean getApplications() | setApplications(Boolean applications) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListCreditNotesInput; + +ListCreditNotesInput listCreditNotesInput = new ListCreditNotesInput.Builder() + .subscriptionId(222) + .page(1) + .perPage(50) + .lineItems(false) + .discounts(false) + .taxes(false) + .refunds(false) + .applications(false) + .build(); +``` + diff --git a/doc/models/list-customers-input.md b/doc/models/list-customers-input.md new file mode 100644 index 00000000..ff555d49 --- /dev/null +++ b/doc/models/list-customers-input.md @@ -0,0 +1,43 @@ + +# List Customers Input + +Input structure for the method ListCustomers + +## Structure + +`ListCustomersInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Direction to sort customers by time of creation | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `String` | Optional | 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. | String getStartDate() | setStartDate(String startDate) | +| `EndDate` | `String` | Optional | 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. | String getEndDate() | setEndDate(String endDate) | +| `StartDatetime` | `String` | Optional | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `EndDatetime` | `String` | Optional | 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. | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `Q` | `String` | Optional | A search query by which to filter customers (can be an email, an ID, a reference, organization) | String getQ() | setQ(String q) | + +## Example + +```java +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListCustomersInput; +import com.maxio.advancedbilling.models.SortingDirection; + +ListCustomersInput listCustomersInput = new ListCustomersInput.Builder() + .direction(SortingDirection.ASC) + .page(1) + .perPage(30) + .dateField(BasicDateField.UPDATED_AT) + .startDate("start_date6") + .endDate("end_date0") + .startDatetime("start_datetime0") + .endDatetime("end_datetime8") + .q("q0") + .build(); +``` + diff --git a/doc/models/list-events-date-field.md b/doc/models/list-events-date-field.md index d6364419..7ac6c5f0 100644 --- a/doc/models/list-events-date-field.md +++ b/doc/models/list-events-date-field.md @@ -9,7 +9,7 @@ | Name | | --- | -| `CreatedAt` | +| `CREATED_AT` | ## Example diff --git a/doc/models/list-events-input.md b/doc/models/list-events-input.md new file mode 100644 index 00000000..f153baf7 --- /dev/null +++ b/doc/models/list-events-input.md @@ -0,0 +1,52 @@ + +# List Events Input + +Input structure for the method ListEvents + +## Structure + +`ListEventsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `SinceId` | `Long` | Optional | Returns events with an id greater than or equal to the one specified | Long getSinceId() | setSinceId(Long sinceId) | +| `MaxId` | `Long` | Optional | Returns events with an id less than or equal to the one specified | Long getMaxId() | setMaxId(Long maxId) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | Direction getDirection() | setDirection(Direction direction) | +| `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | List getFilter() | setFilter(List filter) | +| `DateField` | [`ListEventsDateField`](../../doc/models/list-events-date-field.md) | Optional | The type of filter you would like to apply to your search. | ListEventsDateField getDateField() | setDateField(ListEventsDateField dateField) | +| `StartDate` | `String` | 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. | String getStartDate() | setStartDate(String startDate) | +| `EndDate` | `String` | 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. | String getEndDate() | setEndDate(String endDate) | +| `StartDatetime` | `String` | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `EndDatetime` | `String` | 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. | String getEndDatetime() | setEndDatetime(String endDatetime) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.EventKey; +import com.maxio.advancedbilling.models.ListEventsDateField; +import com.maxio.advancedbilling.models.ListEventsInput; +import java.util.Arrays; + +ListEventsInput listEventsInput = new ListEventsInput.Builder() + .page(1) + .perPage(50) + .sinceId(104L) + .maxId(0L) + .direction(Direction.DESC) + .filter(Arrays.asList( + EventKey.CUSTOM_FIELD_VALUE_CHANGE, + EventKey.PAYMENT_SUCCESS + )) + .dateField(ListEventsDateField.CREATED_AT) + .startDate("start_date6") + .endDate("end_date0") + .startDatetime("start_datetime0") + .endDatetime("end_datetime8") + .build(); +``` + diff --git a/doc/models/list-exported-invoices-input.md b/doc/models/list-exported-invoices-input.md new file mode 100644 index 00000000..04c9cd90 --- /dev/null +++ b/doc/models/list-exported-invoices-input.md @@ -0,0 +1,30 @@ + +# List Exported Invoices Input + +Input structure for the method ListExportedInvoices + +## Structure + +`ListExportedInvoicesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `BatchId` | `String` | Required | Id of a Batch Job. | String getBatchId() | setBatchId(String batchId) | +| `PerPage` | `Integer` | Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListExportedInvoicesInput; + +ListExportedInvoicesInput listExportedInvoicesInput = new ListExportedInvoicesInput.Builder( + "batch_id8" +) +.perPage(100) +.page(1) +.build(); +``` + diff --git a/doc/models/list-exported-proforma-invoices-input.md b/doc/models/list-exported-proforma-invoices-input.md new file mode 100644 index 00000000..39b26348 --- /dev/null +++ b/doc/models/list-exported-proforma-invoices-input.md @@ -0,0 +1,30 @@ + +# List Exported Proforma Invoices Input + +Input structure for the method ListExportedProformaInvoices + +## Structure + +`ListExportedProformaInvoicesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `BatchId` | `String` | Required | Id of a Batch Job. | String getBatchId() | setBatchId(String batchId) | +| `PerPage` | `Integer` | Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListExportedProformaInvoicesInput; + +ListExportedProformaInvoicesInput listExportedProformaInvoicesInput = new ListExportedProformaInvoicesInput.Builder( + "batch_id8" +) +.perPage(100) +.page(1) +.build(); +``` + diff --git a/doc/models/list-exported-subscriptions-input.md b/doc/models/list-exported-subscriptions-input.md new file mode 100644 index 00000000..49f61f60 --- /dev/null +++ b/doc/models/list-exported-subscriptions-input.md @@ -0,0 +1,30 @@ + +# List Exported Subscriptions Input + +Input structure for the method ListExportedSubscriptions + +## Structure + +`ListExportedSubscriptionsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `BatchId` | `String` | Required | Id of a Batch Job. | String getBatchId() | setBatchId(String batchId) | +| `PerPage` | `Integer` | Optional | 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.

**Default**: `100`

**Constraints**: `>= 1`, `<= 10000` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListExportedSubscriptionsInput; + +ListExportedSubscriptionsInput listExportedSubscriptionsInput = new ListExportedSubscriptionsInput.Builder( + "batch_id8" +) +.perPage(100) +.page(1) +.build(); +``` + diff --git a/doc/models/list-invoice-events-input.md b/doc/models/list-invoice-events-input.md new file mode 100644 index 00000000..a6b22bfe --- /dev/null +++ b/doc/models/list-invoice-events-input.md @@ -0,0 +1,42 @@ + +# List Invoice Events Input + +Input structure for the method ListInvoiceEvents + +## Structure + +`ListInvoiceEventsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SinceDate` | `String` | Optional | 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. | String getSinceDate() | setSinceDate(String sinceDate) | +| `SinceId` | `Long` | Optional | 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. | Long getSinceId() | setSinceId(Long sinceId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | 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.

**Default**: `100` | Integer getPerPage() | setPerPage(Integer perPage) | +| `InvoiceUid` | `String` | Optional | Providing an invoice_uid allows for scoping of the invoice events to a single invoice or credit note. | String getInvoiceUid() | setInvoiceUid(String invoiceUid) | +| `WithChangeInvoiceStatus` | `String` | Optional | Use this parameter if you want to fetch also invoice events with change_invoice_status type. | String getWithChangeInvoiceStatus() | setWithChangeInvoiceStatus(String withChangeInvoiceStatus) | +| `EventTypes` | [`List`](../../doc/models/invoice-event-type.md) | Optional | Filter results by event_type. Supply a comma separated list of event types (listed above). Use in query: `event_types=void_invoice,void_remainder`. | List getEventTypes() | setEventTypes(List eventTypes) | + +## Example + +```java +import com.maxio.advancedbilling.models.InvoiceEventType; +import com.maxio.advancedbilling.models.ListInvoiceEventsInput; +import java.util.Arrays; + +ListInvoiceEventsInput listInvoiceEventsInput = new ListInvoiceEventsInput.Builder() + .sinceDate("since_date4") + .sinceId(104L) + .page(1) + .perPage(100) + .invoiceUid("invoice_uid0") + .withChangeInvoiceStatus("with_change_invoice_status2") + .eventTypes(Arrays.asList( + InvoiceEventType.APPLY_PAYMENT, + InvoiceEventType.APPLY_DEBIT_NOTE + )) + .build(); +``` + diff --git a/doc/models/list-invoices-input.md b/doc/models/list-invoices-input.md new file mode 100644 index 00000000..9f56df85 --- /dev/null +++ b/doc/models/list-invoices-input.md @@ -0,0 +1,84 @@ + +# List Invoices Input + +Input structure for the method ListInvoices + +## Structure + +`ListInvoicesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `StartDate` | `String` | Optional | 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. | String getStartDate() | setStartDate(String startDate) | +| `EndDate` | `String` | Optional | 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. | String getEndDate() | setEndDate(String endDate) | +| `Status` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | InvoiceStatus getStatus() | setStatus(InvoiceStatus status) | +| `SubscriptionId` | `Integer` | Optional | The subscription's ID. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `SubscriptionGroupUid` | `String` | Optional | 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. | String getSubscriptionGroupUid() | setSubscriptionGroupUid(String subscriptionGroupUid) | +| `ConsolidationLevel` | `String` | Optional | The consolidation level of the invoice. Allowed Values: none, parent, child or comma-separated lists of thereof, e.g. none,parent. | String getConsolidationLevel() | setConsolidationLevel(String consolidationLevel) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | The sort direction of the returned invoices.

**Default**: `Direction.DESC` | Direction getDirection() | setDirection(Direction direction) | +| `LineItems` | `Boolean` | Optional | Include line items data

**Default**: `false` | Boolean getLineItems() | setLineItems(Boolean lineItems) | +| `Discounts` | `Boolean` | Optional | Include discounts data

**Default**: `false` | Boolean getDiscounts() | setDiscounts(Boolean discounts) | +| `Taxes` | `Boolean` | Optional | Include taxes data

**Default**: `false` | Boolean getTaxes() | setTaxes(Boolean taxes) | +| `Credits` | `Boolean` | Optional | Include credits data

**Default**: `false` | Boolean getCredits() | setCredits(Boolean credits) | +| `Payments` | `Boolean` | Optional | Include payments data

**Default**: `false` | Boolean getPayments() | setPayments(Boolean payments) | +| `CustomFields` | `Boolean` | Optional | Include custom fields data

**Default**: `false` | Boolean getCustomFields() | setCustomFields(Boolean customFields) | +| `Refunds` | `Boolean` | Optional | Include refunds data

**Default**: `false` | Boolean getRefunds() | setRefunds(Boolean refunds) | +| `DateField` | [`InvoiceDateField`](../../doc/models/invoice-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `InvoiceDateField.DUE_DATE` | InvoiceDateField getDateField() | setDateField(InvoiceDateField dateField) | +| `StartDatetime` | `String` | Optional | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `EndDatetime` | `String` | Optional | 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. | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `CustomerIds` | `List` | Optional | Allows fetching invoices with matching customer id based on provided values. Use in query `customer_ids=1,2,3`. | List getCustomerIds() | setCustomerIds(List customerIds) | +| `Number` | `List` | Optional | Allows fetching invoices with matching invoice number based on provided values. Use in query `number=1234,1235`. | List getNumber() | setNumber(List number) | +| `ProductIds` | `List` | Optional | Allows fetching invoices with matching line items product ids based on provided values. Use in query `product_ids=23,34`. | List getProductIds() | setProductIds(List productIds) | +| `Sort` | [`InvoiceSortField`](../../doc/models/invoice-sort-field.md) | Optional | Allows specification of the order of the returned list. Use in query `sort=total_amount`.

**Default**: `InvoiceSortField.NUMBER` | InvoiceSortField getSort() | setSort(InvoiceSortField sort) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.InvoiceDateField; +import com.maxio.advancedbilling.models.InvoiceSortField; +import com.maxio.advancedbilling.models.InvoiceStatus; +import com.maxio.advancedbilling.models.ListInvoicesInput; +import java.util.Arrays; + +ListInvoicesInput listInvoicesInput = new ListInvoicesInput.Builder() + .startDate("start_date6") + .endDate("end_date0") + .status(InvoiceStatus.VOIDED) + .subscriptionId(222) + .subscriptionGroupUid("subscription_group_uid6") + .consolidationLevel("consolidation_level8") + .page(1) + .perPage(50) + .direction(Direction.DESC) + .lineItems(false) + .discounts(false) + .taxes(false) + .credits(false) + .payments(false) + .customFields(false) + .refunds(false) + .dateField(InvoiceDateField.ISSUE_DATE) + .startDatetime("start_datetime0") + .endDatetime("end_datetime8") + .customerIds(Arrays.asList( + 1, + 2, + 3 + )) + .number(Arrays.asList( + "1234", + "1235" + )) + .productIds(Arrays.asList( + 23, + 34 + )) + .sort(InvoiceSortField.TOTAL_AMOUNT) + .build(); +``` + diff --git a/doc/models/list-metadata-for-resource-type-input.md b/doc/models/list-metadata-for-resource-type-input.md new file mode 100644 index 00000000..7c8468bf --- /dev/null +++ b/doc/models/list-metadata-for-resource-type-input.md @@ -0,0 +1,54 @@ + +# List Metadata for Resource Type Input + +Input structure for the method ListMetadataForResourceType + +## Structure + +`ListMetadataForResourceTypeInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ResourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Required | The resource type to which the metafields belong. | ResourceType getResourceType() | setResourceType(ResourceType resourceType) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `LocalDate` | Optional | 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. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | 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. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `WithDeleted` | `Boolean` | Optional | Allow to fetch deleted metadata. | Boolean getWithDeleted() | setWithDeleted(Boolean withDeleted) | +| `ResourceIds` | `List` | 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` | List getResourceIds() | setResourceIds(List resourceIds) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListMetadataForResourceTypeInput; +import com.maxio.advancedbilling.models.ResourceType; +import com.maxio.advancedbilling.models.SortingDirection; +import java.util.Arrays; + +ListMetadataForResourceTypeInput listMetadataForResourceTypeInput = new ListMetadataForResourceTypeInput.Builder( + ResourceType.SUBSCRIPTIONS +) +.page(1) +.perPage(50) +.dateField(BasicDateField.UPDATED_AT) +.startDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.endDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.startDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) +.endDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) +.withDeleted(false) +.resourceIds(Arrays.asList( + 198, + 199 + )) +.direction(SortingDirection.ASC) +.build(); +``` + diff --git a/doc/models/list-metadata-input.md b/doc/models/list-metadata-input.md new file mode 100644 index 00000000..278a715f --- /dev/null +++ b/doc/models/list-metadata-input.md @@ -0,0 +1,33 @@ + +# List Metadata Input + +Input structure for the method ListMetadata + +## Structure + +`ListMetadataInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ResourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Required | The resource type to which the metafields belong. | ResourceType getResourceType() | setResourceType(ResourceType resourceType) | +| `ResourceId` | `int` | Required | The Advanced Billing id of the customer or the subscription for which the metadata applies | int getResourceId() | setResourceId(int resourceId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListMetadataInput; +import com.maxio.advancedbilling.models.ResourceType; + +ListMetadataInput listMetadataInput = new ListMetadataInput.Builder( + ResourceType.SUBSCRIPTIONS, + 60 +) +.page(1) +.perPage(50) +.build(); +``` + diff --git a/doc/models/list-metafields-input.md b/doc/models/list-metafields-input.md new file mode 100644 index 00000000..47cde10a --- /dev/null +++ b/doc/models/list-metafields-input.md @@ -0,0 +1,36 @@ + +# List Metafields Input + +Input structure for the method ListMetafields + +## Structure + +`ListMetafieldsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ResourceType` | [`ResourceType`](../../doc/models/resource-type.md) | Required | The resource type to which the metafields belong. | ResourceType getResourceType() | setResourceType(ResourceType resourceType) | +| `Name` | `String` | Optional | Filter by the name of the metafield. | String getName() | setName(String name) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListMetafieldsInput; +import com.maxio.advancedbilling.models.ResourceType; +import com.maxio.advancedbilling.models.SortingDirection; + +ListMetafieldsInput listMetafieldsInput = new ListMetafieldsInput.Builder( + ResourceType.SUBSCRIPTIONS +) +.name("name0") +.page(1) +.perPage(50) +.direction(SortingDirection.ASC) +.build(); +``` + diff --git a/doc/models/list-mrr-movements-input.md b/doc/models/list-mrr-movements-input.md new file mode 100644 index 00000000..c265e623 --- /dev/null +++ b/doc/models/list-mrr-movements-input.md @@ -0,0 +1,32 @@ + +# List Mrr Movements Input + +Input structure for the method ListMrrMovements + +## Structure + +`ListMrrMovementsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `Integer` | Optional | optionally filter results by subscription | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListMrrMovementsInput; +import com.maxio.advancedbilling.models.SortingDirection; + +ListMrrMovementsInput listMrrMovementsInput = new ListMrrMovementsInput.Builder() + .subscriptionId(222) + .page(1) + .perPage(20) + .direction(SortingDirection.ASC) + .build(); +``` + diff --git a/doc/models/list-mrr-per-subscription-input.md b/doc/models/list-mrr-per-subscription-input.md new file mode 100644 index 00000000..d0293cd5 --- /dev/null +++ b/doc/models/list-mrr-per-subscription-input.md @@ -0,0 +1,42 @@ + +# List Mrr Per Subscription Input + +Input structure for the method ListMrrPerSubscription + +## Structure + +`ListMrrPerSubscriptionInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Filter` | [`ListMrrFilter`](../../doc/models/list-mrr-filter.md) | Optional | Filter to use for List MRR per subscription operation | ListMrrFilter getFilter() | setFilter(ListMrrFilter filter) | +| `AtTime` | `String` | Optional | Submit a timestamp in ISO8601 format to request MRR for a historic time. Use in query: `at_time=2022-01-10T10:00:00-05:00`. | String getAtTime() | setAtTime(String atTime) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | Controls the order in which results are returned. Records are ordered by subscription_id in ascending order by default. Use in query `direction=desc`. | Direction getDirection() | setDirection(Direction direction) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.ListMrrFilter; +import com.maxio.advancedbilling.models.ListMrrPerSubscriptionInput; +import java.util.Arrays; + +ListMrrPerSubscriptionInput listMrrPerSubscriptionInput = new ListMrrPerSubscriptionInput.Builder() + .filter(new ListMrrFilter.Builder() + .subscriptionIds(Arrays.asList( + 1, + 2, + 3 + )) + .build()) + .atTime("at_time=2022-01-10T10:00:00-05:00") + .page(1) + .perPage(50) + .direction(Direction.DESC) + .build(); +``` + diff --git a/doc/models/list-offers-input.md b/doc/models/list-offers-input.md new file mode 100644 index 00000000..19d8c667 --- /dev/null +++ b/doc/models/list-offers-input.md @@ -0,0 +1,29 @@ + +# List Offers Input + +Input structure for the method ListOffers + +## Structure + +`ListOffersInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `IncludeArchived` | `Boolean` | Optional | Include archived products. Use in query: `include_archived=true`. | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListOffersInput; + +ListOffersInput listOffersInput = new ListOffersInput.Builder() + .page(1) + .perPage(50) + .includeArchived(true) + .build(); +``` + diff --git a/doc/models/list-payment-profiles-input.md b/doc/models/list-payment-profiles-input.md new file mode 100644 index 00000000..72c9aef6 --- /dev/null +++ b/doc/models/list-payment-profiles-input.md @@ -0,0 +1,29 @@ + +# List Payment Profiles Input + +Input structure for the method ListPaymentProfiles + +## Structure + +`ListPaymentProfilesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `CustomerId` | `Integer` | Optional | The ID of the customer for which you wish to list payment profiles | Integer getCustomerId() | setCustomerId(Integer customerId) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListPaymentProfilesInput; + +ListPaymentProfilesInput listPaymentProfilesInput = new ListPaymentProfilesInput.Builder() + .page(1) + .perPage(50) + .customerId(150) + .build(); +``` + diff --git a/doc/models/list-prepayment-date-field.md b/doc/models/list-prepayment-date-field.md index a143aa4d..fb729cda 100644 --- a/doc/models/list-prepayment-date-field.md +++ b/doc/models/list-prepayment-date-field.md @@ -9,8 +9,8 @@ | Name | | --- | -| `CreatedAt` | -| `ApplicationAt` | +| `CREATED_AT` | +| `APPLICATION_AT` | ## Example diff --git a/doc/models/list-prepayments-for-subscription-group-input.md b/doc/models/list-prepayments-for-subscription-group-input.md new file mode 100644 index 00000000..f360484a --- /dev/null +++ b/doc/models/list-prepayments-for-subscription-group-input.md @@ -0,0 +1,39 @@ + +# List Prepayments for Subscription Group Input + +Input structure for the method ListPrepaymentsForSubscriptionGroup + +## Structure + +`ListPrepaymentsForSubscriptionGroupInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Uid` | `String` | Required | The uid of the subscription group | String getUid() | setUid(String uid) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Optional | Filter to use for List Prepayments operations | ListPrepaymentsFilter getFilter() | setFilter(ListPrepaymentsFilter filter) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.ListPrepaymentDateField; +import com.maxio.advancedbilling.models.ListPrepaymentsFilter; +import com.maxio.advancedbilling.models.ListPrepaymentsForSubscriptionGroupInput; + +ListPrepaymentsForSubscriptionGroupInput listPrepaymentsForSubscriptionGroupInput = new ListPrepaymentsForSubscriptionGroupInput.Builder( + "uid0" +) +.page(1) +.perPage(50) +.filter(new ListPrepaymentsFilter.Builder() + .dateField(ListPrepaymentDateField.CREATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .endDate(DateTimeHelper.fromSimpleDate("2024-01-31")) + .build()) +.build(); +``` + diff --git a/doc/models/list-prepayments-input.md b/doc/models/list-prepayments-input.md new file mode 100644 index 00000000..7e7e422e --- /dev/null +++ b/doc/models/list-prepayments-input.md @@ -0,0 +1,39 @@ + +# List Prepayments Input + +Input structure for the method ListPrepayments + +## Structure + +`ListPrepaymentsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | int getSubscriptionId() | setSubscriptionId(int subscriptionId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListPrepaymentsFilter`](../../doc/models/list-prepayments-filter.md) | Optional | Filter to use for List Prepayments operations | ListPrepaymentsFilter getFilter() | setFilter(ListPrepaymentsFilter filter) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.ListPrepaymentDateField; +import com.maxio.advancedbilling.models.ListPrepaymentsFilter; +import com.maxio.advancedbilling.models.ListPrepaymentsInput; + +ListPrepaymentsInput listPrepaymentsInput = new ListPrepaymentsInput.Builder( + 222 +) +.page(1) +.perPage(50) +.filter(new ListPrepaymentsFilter.Builder() + .dateField(ListPrepaymentDateField.CREATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2024-01-01")) + .endDate(DateTimeHelper.fromSimpleDate("2024-01-31")) + .build()) +.build(); +``` + diff --git a/doc/models/list-product-families-input.md b/doc/models/list-product-families-input.md new file mode 100644 index 00000000..d8e1cc58 --- /dev/null +++ b/doc/models/list-product-families-input.md @@ -0,0 +1,35 @@ + +# List Product Families Input + +Input structure for the method ListProductFamilies + +## Structure + +`ListProductFamiliesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListProductFamiliesInput; + +ListProductFamiliesInput listProductFamiliesInput = new ListProductFamiliesInput.Builder() + .dateField(BasicDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .endDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) + .build(); +``` + diff --git a/doc/models/list-product-price-points-input.md b/doc/models/list-product-price-points-input.md new file mode 100644 index 00000000..7bf2e19b --- /dev/null +++ b/doc/models/list-product-price-points-input.md @@ -0,0 +1,39 @@ + +# List Product Price Points Input + +Input structure for the method ListProductPricePoints + +## Structure + +`ListProductPricePointsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ProductId` | [`ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Required | This is a container for one-of cases. | ListProductPricePointsInputProductId getProductId() | setProductId(ListProductPricePointsInputProductId productId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | 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.

**Default**: `10`

**Constraints**: `<= 200` | Integer getPerPage() | setPerPage(Integer perPage) | +| `CurrencyPrices` | `Boolean` | Optional | 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. | Boolean getCurrencyPrices() | setCurrencyPrices(Boolean currencyPrices) | +| `FilterType` | [`List`](../../doc/models/price-point-type.md) | Optional | Use in query: `filter[type]=catalog,default`. | List getFilterType() | setFilterType(List filterType) | +| `Archived` | `Boolean` | Optional | Set to include archived price points in the response. | Boolean getArchived() | setArchived(Boolean archived) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListProductPricePointsInput; +import com.maxio.advancedbilling.models.containers.ListProductPricePointsInputProductId; + +ListProductPricePointsInput listProductPricePointsInput = new ListProductPricePointsInput.Builder( + ListProductPricePointsInputProductId.fromNumber( + 124 + ) +) +.page(1) +.perPage(10) +.currencyPrices(false) +.filterType(Liquid error: Value cannot be null. (Parameter 'key')) +.archived(false) +.build(); +``` + diff --git a/doc/models/list-products-for-product-family-input.md b/doc/models/list-products-for-product-family-input.md new file mode 100644 index 00000000..16148544 --- /dev/null +++ b/doc/models/list-products-for-product-family-input.md @@ -0,0 +1,63 @@ + +# List Products for Product Family Input + +Input structure for the method ListProductsForProductFamily + +## Structure + +`ListProductsForProductFamilyInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ProductFamilyId` | `String` | Required | Either the product family's id or its handle prefixed with `handle:` | String getProductFamilyId() | setProductFamilyId(String productFamilyId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `Filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Optional | Filter to use for List Products operations | ListProductsFilter getFilter() | setFilter(ListProductsFilter filter) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `IncludeArchived` | `Boolean` | Optional | Include archived products | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) | +| `Include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | ListProductsInclude getInclude() | setInclude(ListProductsInclude include) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListProductsFilter; +import com.maxio.advancedbilling.models.ListProductsForProductFamilyInput; +import com.maxio.advancedbilling.models.ListProductsInclude; +import com.maxio.advancedbilling.models.PrepaidProductPricePointFilter; +import java.util.Arrays; + +ListProductsForProductFamilyInput listProductsForProductFamilyInput = new ListProductsForProductFamilyInput.Builder( + "product_family_id4" +) +.page(1) +.perPage(50) +.dateField(BasicDateField.UPDATED_AT) +.filter(new ListProductsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .prepaidProductPricePoint(new PrepaidProductPricePointFilter.Builder( + "product_price_point_id2" + ) + .build()) + .useSiteExchangeRate(false) + .build()) +.startDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.endDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.startDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) +.endDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) +.includeArchived(false) +.include(ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT) +.build(); +``` + diff --git a/doc/models/list-products-include.md b/doc/models/list-products-include.md index 9cfc57b4..f2847330 100644 --- a/doc/models/list-products-include.md +++ b/doc/models/list-products-include.md @@ -9,7 +9,7 @@ | Name | | --- | -| `PrepaidProductPricePoint` | +| `PREPAID_PRODUCT_PRICE_POINT` | ## Example diff --git a/doc/models/list-products-input.md b/doc/models/list-products-input.md new file mode 100644 index 00000000..2b45ddc8 --- /dev/null +++ b/doc/models/list-products-input.md @@ -0,0 +1,60 @@ + +# List Products Input + +Input structure for the method ListProducts + +## Structure + +`ListProductsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `DateField` | [`BasicDateField`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search.
Use in query: `date_field=created_at`. | BasicDateField getDateField() | setDateField(BasicDateField dateField) | +| `Filter` | [`ListProductsFilter`](../../doc/models/list-products-filter.md) | Optional | Filter to use for List Products operations | ListProductsFilter getFilter() | setFilter(ListProductsFilter filter) | +| `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `IncludeArchived` | `Boolean` | Optional | Include archived products. Use in query: `include_archived=true`. | Boolean getIncludeArchived() | setIncludeArchived(Boolean includeArchived) | +| `Include` | [`ListProductsInclude`](../../doc/models/list-products-include.md) | Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | ListProductsInclude getInclude() | setInclude(ListProductsInclude include) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.BasicDateField; +import com.maxio.advancedbilling.models.ListProductsFilter; +import com.maxio.advancedbilling.models.ListProductsInclude; +import com.maxio.advancedbilling.models.ListProductsInput; +import com.maxio.advancedbilling.models.PrepaidProductPricePointFilter; +import java.util.Arrays; + +ListProductsInput listProductsInput = new ListProductsInput.Builder() + .dateField(BasicDateField.UPDATED_AT) + .filter(new ListProductsFilter.Builder() + .ids(Arrays.asList( + 1, + 2, + 3 + )) + .prepaidProductPricePoint(new PrepaidProductPricePointFilter.Builder( + "product_price_point_id2" + ) + .build()) + .useSiteExchangeRate(false) + .build()) + .endDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) + .startDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) + .page(1) + .perPage(50) + .includeArchived(true) + .include(ListProductsInclude.PREPAID_PRODUCT_PRICE_POINT) + .build(); +``` + diff --git a/doc/models/list-products-price-points-include.md b/doc/models/list-products-price-points-include.md index 45aaf37f..99e40235 100644 --- a/doc/models/list-products-price-points-include.md +++ b/doc/models/list-products-price-points-include.md @@ -9,7 +9,7 @@ | Name | | --- | -| `CurrencyPrices` | +| `CURRENCY_PRICES` | ## Example diff --git a/doc/models/list-proforma-invoices-input.md b/doc/models/list-proforma-invoices-input.md new file mode 100644 index 00000000..3d7982a4 --- /dev/null +++ b/doc/models/list-proforma-invoices-input.md @@ -0,0 +1,52 @@ + +# List Proforma Invoices Input + +Input structure for the method ListProformaInvoices + +## Structure + +`ListProformaInvoicesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | int getSubscriptionId() | setSubscriptionId(int subscriptionId) | +| `StartDate` | `String` | Optional | The beginning date range for the invoice's Due Date, in the YYYY-MM-DD format. | String getStartDate() | setStartDate(String startDate) | +| `EndDate` | `String` | Optional | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. | String getEndDate() | setEndDate(String endDate) | +| `Status` | [`ProformaInvoiceStatus`](../../doc/models/proforma-invoice-status.md) | Optional | The current status of the invoice. Allowed Values: draft, open, paid, pending, voided | ProformaInvoiceStatus getStatus() | setStatus(ProformaInvoiceStatus status) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | The sort direction of the returned invoices.

**Default**: `Direction.DESC` | Direction getDirection() | setDirection(Direction direction) | +| `LineItems` | `Boolean` | Optional | Include line items data

**Default**: `false` | Boolean getLineItems() | setLineItems(Boolean lineItems) | +| `Discounts` | `Boolean` | Optional | Include discounts data

**Default**: `false` | Boolean getDiscounts() | setDiscounts(Boolean discounts) | +| `Taxes` | `Boolean` | Optional | Include taxes data

**Default**: `false` | Boolean getTaxes() | setTaxes(Boolean taxes) | +| `Credits` | `Boolean` | Optional | Include credits data

**Default**: `false` | Boolean getCredits() | setCredits(Boolean credits) | +| `Payments` | `Boolean` | Optional | Include payments data

**Default**: `false` | Boolean getPayments() | setPayments(Boolean payments) | +| `CustomFields` | `Boolean` | Optional | Include custom fields data

**Default**: `false` | Boolean getCustomFields() | setCustomFields(Boolean customFields) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.ListProformaInvoicesInput; +import com.maxio.advancedbilling.models.ProformaInvoiceStatus; + +ListProformaInvoicesInput listProformaInvoicesInput = new ListProformaInvoicesInput.Builder( + 222 +) +.startDate("start_date6") +.endDate("end_date0") +.status(ProformaInvoiceStatus.ARCHIVED) +.page(1) +.perPage(50) +.direction(Direction.DESC) +.lineItems(false) +.discounts(false) +.taxes(false) +.credits(false) +.payments(false) +.customFields(false) +.build(); +``` + diff --git a/doc/models/list-reason-codes-input.md b/doc/models/list-reason-codes-input.md new file mode 100644 index 00000000..9f0b5cc8 --- /dev/null +++ b/doc/models/list-reason-codes-input.md @@ -0,0 +1,27 @@ + +# List Reason Codes Input + +Input structure for the method ListReasonCodes + +## Structure + +`ListReasonCodesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListReasonCodesInput; + +ListReasonCodesInput listReasonCodesInput = new ListReasonCodesInput.Builder() + .page(1) + .perPage(50) + .build(); +``` + diff --git a/doc/models/list-sales-commission-settings-input.md b/doc/models/list-sales-commission-settings-input.md new file mode 100644 index 00000000..b4618276 --- /dev/null +++ b/doc/models/list-sales-commission-settings-input.md @@ -0,0 +1,34 @@ + +# List Sales Commission Settings Input + +Input structure for the method ListSalesCommissionSettings + +## Structure + +`ListSalesCommissionSettingsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SellerId` | `String` | Required | The Chargify id of your seller account | String getSellerId() | setSellerId(String sellerId) | +| `Authorization` | `String` | Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `"Bearer <>"` | String getAuthorization() | setAuthorization(String authorization) | +| `LiveMode` | `Boolean` | Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | Boolean getLiveMode() | setLiveMode(Boolean liveMode) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSalesCommissionSettingsInput; + +ListSalesCommissionSettingsInput listSalesCommissionSettingsInput = new ListSalesCommissionSettingsInput.Builder( + "seller_id8" +) +.authorization("Bearer <>") +.liveMode(false) +.page(1) +.perPage(100) +.build(); +``` + diff --git a/doc/models/list-sales-reps-input.md b/doc/models/list-sales-reps-input.md new file mode 100644 index 00000000..ab4bc74b --- /dev/null +++ b/doc/models/list-sales-reps-input.md @@ -0,0 +1,34 @@ + +# List Sales Reps Input + +Input structure for the method ListSalesReps + +## Structure + +`ListSalesRepsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SellerId` | `String` | Required | The Chargify id of your seller account | String getSellerId() | setSellerId(String sellerId) | +| `Authorization` | `String` | Optional | For authorization use user API key. See details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).

**Default**: `"Bearer <>"` | String getAuthorization() | setAuthorization(String authorization) | +| `LiveMode` | `Boolean` | Optional | This parameter indicates if records should be fetched from live mode sites. Default value is true. | Boolean getLiveMode() | setLiveMode(Boolean liveMode) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | This parameter indicates how many records to fetch in each request. Default value is 100.

**Default**: `100` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSalesRepsInput; + +ListSalesRepsInput listSalesRepsInput = new ListSalesRepsInput.Builder( + "seller_id8" +) +.authorization("Bearer <>") +.liveMode(false) +.page(1) +.perPage(100) +.build(); +``` + diff --git a/doc/models/list-segments-for-price-point-input.md b/doc/models/list-segments-for-price-point-input.md new file mode 100644 index 00000000..c3b3081b --- /dev/null +++ b/doc/models/list-segments-for-price-point-input.md @@ -0,0 +1,40 @@ + +# List Segments for Price Point Input + +Input structure for the method ListSegmentsForPricePoint + +## Structure + +`ListSegmentsForPricePointInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ComponentId` | `String` | Required | ID or Handle for the Component | String getComponentId() | setComponentId(String componentId) | +| `PricePointId` | `String` | Required | ID or Handle for the Price Point belonging to the Component | String getPricePointId() | setPricePointId(String pricePointId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Filter` | [`ListSegmentsFilter`](../../doc/models/list-segments-filter.md) | Optional | Filter to use for List Segments for a Price Point operation | ListSegmentsFilter getFilter() | setFilter(ListSegmentsFilter filter) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSegmentsFilter; +import com.maxio.advancedbilling.models.ListSegmentsForPricePointInput; + +ListSegmentsForPricePointInput listSegmentsForPricePointInput = new ListSegmentsForPricePointInput.Builder( + "component_id8", + "price_point_id8" +) +.page(1) +.perPage(50) +.filter(new ListSegmentsFilter.Builder() + .segmentProperty1Value("EU") + .segmentProperty2Value("segment_property_2_value2") + .segmentProperty3Value("segment_property_3_value0") + .segmentProperty4Value("segment_property_4_value4") + .build()) +.build(); +``` + diff --git a/doc/models/list-subscription-components-for-site-input.md b/doc/models/list-subscription-components-for-site-input.md new file mode 100644 index 00000000..f00f315b --- /dev/null +++ b/doc/models/list-subscription-components-for-site-input.md @@ -0,0 +1,86 @@ + +# List Subscription Components for Site Input + +Input structure for the method ListSubscriptionComponentsForSite + +## Structure + +`ListSubscriptionComponentsForSiteInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Optional | The attribute by which to sort. Use in query: `sort=updated_at`. | ListSubscriptionComponentsSort getSort() | setSort(ListSubscriptionComponentsSort sort) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Filter` | [`ListSubscriptionComponentsForSiteFilter`](../../doc/models/list-subscription-components-for-site-filter.md) | Optional | Filter to use for List Subscription Components For Site operation | ListSubscriptionComponentsForSiteFilter getFilter() | setFilter(ListSubscriptionComponentsForSiteFilter filter) | +| `DateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. Use in query: `date_field=updated_at`. | SubscriptionListDateField getDateField() | setDateField(SubscriptionListDateField dateField) | +| `StartDate` | `String` | 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`. | String getStartDate() | setStartDate(String startDate) | +| `StartDatetime` | `String` | 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`. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `EndDate` | `String` | 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. Use in query `end_date=2011-12-16`. | String getEndDate() | setEndDate(String endDate) | +| `EndDatetime` | `String` | 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. Use in query `end_datetime=2022-07-01 09:00:05`. | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `SubscriptionIds` | `List` | Optional | Allows fetching components allocation with matching subscription id based on provided ids. Use in query `subscription_ids=1,2,3`.

**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `200` | List getSubscriptionIds() | setSubscriptionIds(List subscriptionIds) | +| `PricePointIds` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | IncludeNotNull getPricePointIds() | setPricePointIds(IncludeNotNull pricePointIds) | +| `ProductFamilyIds` | `List` | Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | List getProductFamilyIds() | setProductFamilyIds(List productFamilyIds) | +| `Include` | [`ListSubscriptionComponentsInclude`](../../doc/models/list-subscription-components-include.md) | Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | ListSubscriptionComponentsInclude getInclude() | setInclude(ListSubscriptionComponentsInclude include) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.IncludeNotNull; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsForSiteFilter; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsForSiteInput; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsInclude; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsSort; +import com.maxio.advancedbilling.models.SortingDirection; +import com.maxio.advancedbilling.models.SubscriptionFilter; +import com.maxio.advancedbilling.models.SubscriptionListDateField; +import com.maxio.advancedbilling.models.SubscriptionStateFilter; +import java.util.Arrays; + +ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = new ListSubscriptionComponentsForSiteInput.Builder() + .page(1) + .perPage(50) + .sort(ListSubscriptionComponentsSort.UPDATED_AT) + .direction(SortingDirection.ASC) + .filter(new ListSubscriptionComponentsForSiteFilter.Builder() + .currencies(Arrays.asList( + "EUR", + "USD" + )) + .useSiteExchangeRate(false) + .subscription(new SubscriptionFilter.Builder() + .states(Arrays.asList( + SubscriptionStateFilter.ACTIVE, + SubscriptionStateFilter.CANCELED, + SubscriptionStateFilter.EXPIRED + )) + .dateField(SubscriptionListDateField.UPDATED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .endDate(DateTimeHelper.fromSimpleDate("2016-03-13")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("2016-03-13T12:52:32.123Z")) + .build()) + .build()) + .dateField(SubscriptionListDateField.UPDATED_AT) + .startDate("start_date6") + .startDatetime("start_datetime0") + .endDate("end_date0") + .endDatetime("end_datetime8") + .subscriptionIds(Arrays.asList( + 1, + 2, + 3 + )) + .pricePointIds(IncludeNotNull.NOT_NULL) + .productFamilyIds(Arrays.asList( + 1, + 2, + 3 + )) + .include(ListSubscriptionComponentsInclude.SUBSCRIPTION) + .build(); +``` + diff --git a/doc/models/list-subscription-components-include.md b/doc/models/list-subscription-components-include.md index 2f68f49e..4bb14dd1 100644 --- a/doc/models/list-subscription-components-include.md +++ b/doc/models/list-subscription-components-include.md @@ -9,8 +9,8 @@ | Name | | --- | -| `Subscription` | -| `HistoricUsages` | +| `SUBSCRIPTION` | +| `HISTORIC_USAGES` | ## Example diff --git a/doc/models/list-subscription-components-input.md b/doc/models/list-subscription-components-input.md new file mode 100644 index 00000000..1560ddb0 --- /dev/null +++ b/doc/models/list-subscription-components-input.md @@ -0,0 +1,70 @@ + +# List Subscription Components Input + +Input structure for the method ListSubscriptionComponents + +## Structure + +`ListSubscriptionComponentsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | int getSubscriptionId() | setSubscriptionId(int subscriptionId) | +| `DateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. Use in query `date_field=updated_at`. | SubscriptionListDateField getDateField() | setDateField(SubscriptionListDateField dateField) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Filter` | [`ListSubscriptionComponentsFilter`](../../doc/models/list-subscription-components-filter.md) | Optional | Filter to use for List Subscription Components operation | ListSubscriptionComponentsFilter getFilter() | setFilter(ListSubscriptionComponentsFilter filter) | +| `EndDate` | `String` | 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. | String getEndDate() | setEndDate(String endDate) | +| `EndDatetime` | `String` | 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. | String getEndDatetime() | setEndDatetime(String endDatetime) | +| `PricePointIds` | [`IncludeNotNull`](../../doc/models/include-not-null.md) | Optional | Allows fetching components allocation only if price point id is present. Use in query `price_point_ids=not_null`. | IncludeNotNull getPricePointIds() | setPricePointIds(IncludeNotNull pricePointIds) | +| `ProductFamilyIds` | `List` | Optional | Allows fetching components allocation with matching product family id based on provided ids. Use in query `product_family_ids=1,2,3`. | List getProductFamilyIds() | setProductFamilyIds(List productFamilyIds) | +| `Sort` | [`ListSubscriptionComponentsSort`](../../doc/models/list-subscription-components-sort.md) | Optional | The attribute by which to sort. Use in query `sort=updated_at`. | ListSubscriptionComponentsSort getSort() | setSort(ListSubscriptionComponentsSort sort) | +| `StartDate` | `String` | 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. | String getStartDate() | setStartDate(String startDate) | +| `StartDatetime` | `String` | 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. | String getStartDatetime() | setStartDatetime(String startDatetime) | +| `Include` | [`List`](../../doc/models/list-subscription-components-include.md) | Optional | Allows including additional data in the response. Use in query `include=subscription,historic_usages`. | List getInclude() | setInclude(List include) | +| `InUse` | `Boolean` | Optional | If in_use is set to true, it returns only components that are currently in use. However, if it's set to false or not provided, it returns all components connected with the subscription. | Boolean getInUse() | setInUse(Boolean inUse) | + +## Example + +```java +import com.maxio.advancedbilling.models.IncludeNotNull; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsFilter; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsInclude; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsInput; +import com.maxio.advancedbilling.models.ListSubscriptionComponentsSort; +import com.maxio.advancedbilling.models.SortingDirection; +import com.maxio.advancedbilling.models.SubscriptionListDateField; +import java.util.Arrays; + +ListSubscriptionComponentsInput listSubscriptionComponentsInput = new ListSubscriptionComponentsInput.Builder( + 222 +) +.dateField(SubscriptionListDateField.UPDATED_AT) +.direction(SortingDirection.ASC) +.filter(new ListSubscriptionComponentsFilter.Builder() + .currencies(Arrays.asList( + "EUR", + "USD" + )) + .useSiteExchangeRate(false) + .build()) +.endDate("end_date0") +.endDatetime("end_datetime8") +.pricePointIds(IncludeNotNull.NOT_NULL) +.productFamilyIds(Arrays.asList( + 1, + 2, + 3 + )) +.sort(ListSubscriptionComponentsSort.UPDATED_AT) +.startDate("start_date6") +.startDatetime("start_datetime0") +.include(Arrays.asList( + ListSubscriptionComponentsInclude.SUBSCRIPTION, + ListSubscriptionComponentsInclude.HISTORIC_USAGES + )) +.inUse(true) +.build(); +``` + diff --git a/doc/models/list-subscription-components-sort.md b/doc/models/list-subscription-components-sort.md index d0d59aed..03af5d15 100644 --- a/doc/models/list-subscription-components-sort.md +++ b/doc/models/list-subscription-components-sort.md @@ -9,8 +9,8 @@ | Name | | --- | -| `Id` | -| `UpdatedAt` | +| `ID` | +| `UPDATED_AT` | ## Example diff --git a/doc/models/list-subscription-events-input.md b/doc/models/list-subscription-events-input.md new file mode 100644 index 00000000..2a269dff --- /dev/null +++ b/doc/models/list-subscription-events-input.md @@ -0,0 +1,44 @@ + +# List Subscription Events Input + +Input structure for the method ListSubscriptionEvents + +## Structure + +`ListSubscriptionEventsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | int getSubscriptionId() | setSubscriptionId(int subscriptionId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `SinceId` | `Long` | Optional | Returns events with an id greater than or equal to the one specified | Long getSinceId() | setSinceId(Long sinceId) | +| `MaxId` | `Long` | Optional | Returns events with an id less than or equal to the one specified | Long getMaxId() | setMaxId(Long maxId) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | Direction getDirection() | setDirection(Direction direction) | +| `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | List getFilter() | setFilter(List filter) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.EventKey; +import com.maxio.advancedbilling.models.ListSubscriptionEventsInput; +import java.util.Arrays; + +ListSubscriptionEventsInput listSubscriptionEventsInput = new ListSubscriptionEventsInput.Builder( + 222 +) +.page(1) +.perPage(50) +.sinceId(104L) +.maxId(0L) +.direction(Direction.DESC) +.filter(Arrays.asList( + EventKey.CUSTOM_FIELD_VALUE_CHANGE, + EventKey.PAYMENT_SUCCESS + )) +.build(); +``` + diff --git a/doc/models/list-subscription-group-proforma-invoices-input.md b/doc/models/list-subscription-group-proforma-invoices-input.md new file mode 100644 index 00000000..bd4e1b58 --- /dev/null +++ b/doc/models/list-subscription-group-proforma-invoices-input.md @@ -0,0 +1,38 @@ + +# List Subscription Group Proforma Invoices Input + +Input structure for the method ListSubscriptionGroupProformaInvoices + +## Structure + +`ListSubscriptionGroupProformaInvoicesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Uid` | `String` | Required | The uid of the subscription group | String getUid() | setUid(String uid) | +| `LineItems` | `Boolean` | Optional | Include line items data

**Default**: `false` | Boolean getLineItems() | setLineItems(Boolean lineItems) | +| `Discounts` | `Boolean` | Optional | Include discounts data

**Default**: `false` | Boolean getDiscounts() | setDiscounts(Boolean discounts) | +| `Taxes` | `Boolean` | Optional | Include taxes data

**Default**: `false` | Boolean getTaxes() | setTaxes(Boolean taxes) | +| `Credits` | `Boolean` | Optional | Include credits data

**Default**: `false` | Boolean getCredits() | setCredits(Boolean credits) | +| `Payments` | `Boolean` | Optional | Include payments data

**Default**: `false` | Boolean getPayments() | setPayments(Boolean payments) | +| `CustomFields` | `Boolean` | Optional | Include custom fields data

**Default**: `false` | Boolean getCustomFields() | setCustomFields(Boolean customFields) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSubscriptionGroupProformaInvoicesInput; + +ListSubscriptionGroupProformaInvoicesInput listSubscriptionGroupProformaInvoicesInput = new ListSubscriptionGroupProformaInvoicesInput.Builder( + "uid0" +) +.lineItems(false) +.discounts(false) +.taxes(false) +.credits(false) +.payments(false) +.customFields(false) +.build(); +``` + diff --git a/doc/models/list-subscription-groups-input.md b/doc/models/list-subscription-groups-input.md new file mode 100644 index 00000000..005ddc2e --- /dev/null +++ b/doc/models/list-subscription-groups-input.md @@ -0,0 +1,33 @@ + +# List Subscription Groups Input + +Input structure for the method ListSubscriptionGroups + +## Structure + +`ListSubscriptionGroupsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Include` | [`List`](../../doc/models/subscription-groups-list-include.md) | Optional | 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` | List getInclude() | setInclude(List include) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSubscriptionGroupsInput; +import com.maxio.advancedbilling.models.SubscriptionGroupsListInclude; +import java.util.Arrays; + +ListSubscriptionGroupsInput listSubscriptionGroupsInput = new ListSubscriptionGroupsInput.Builder() + .page(1) + .perPage(50) + .include(Arrays.asList( + SubscriptionGroupsListInclude.ACCOUNT_BALANCES + )) + .build(); +``` + diff --git a/doc/models/list-subscription-notes-input.md b/doc/models/list-subscription-notes-input.md new file mode 100644 index 00000000..b79f3b0c --- /dev/null +++ b/doc/models/list-subscription-notes-input.md @@ -0,0 +1,30 @@ + +# List Subscription Notes Input + +Input structure for the method ListSubscriptionNotes + +## Structure + +`ListSubscriptionNotesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | int getSubscriptionId() | setSubscriptionId(int subscriptionId) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListSubscriptionNotesInput; + +ListSubscriptionNotesInput listSubscriptionNotesInput = new ListSubscriptionNotesInput.Builder( + 222 +) +.page(1) +.perPage(50) +.build(); +``` + diff --git a/doc/models/list-subscriptions-input.md b/doc/models/list-subscriptions-input.md new file mode 100644 index 00000000..ed7e697a --- /dev/null +++ b/doc/models/list-subscriptions-input.md @@ -0,0 +1,69 @@ + +# List Subscriptions Input + +Input structure for the method ListSubscriptions + +## Structure + +`ListSubscriptionsInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `State` | [`SubscriptionStateFilter`](../../doc/models/subscription-state-filter.md) | Optional | The current state of the subscription | SubscriptionStateFilter getState() | setState(SubscriptionStateFilter state) | +| `Product` | `Integer` | Optional | The product id of the subscription. (Note that the product handle cannot be used.) | Integer getProduct() | setProduct(Integer product) | +| `ProductPricePointId` | `Integer` | Optional | The ID of the product price point. If supplied, product is required | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | +| `Coupon` | `Integer` | Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | Integer getCoupon() | setCoupon(Integer coupon) | +| `CouponCode` | `String` | Optional | The coupon code currently applied to the subscription | String getCouponCode() | setCouponCode(String couponCode) | +| `DateField` | [`SubscriptionDateField`](../../doc/models/subscription-date-field.md) | Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | SubscriptionDateField getDateField() | setDateField(SubscriptionDateField dateField) | +| `StartDate` | `LocalDate` | Optional | 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. Use in query `start_date=2022-07-01`. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | +| `EndDate` | `LocalDate` | Optional | 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. Use in query `end_date=2022-08-01`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | +| `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. Use in query `start_datetime=2022-07-01 09:00:05`. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | +| `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns 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. Use in query `end_datetime=2022-08-01 10:00:05`. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | +| `Metadata` | `Map` | Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | Map getMetadata() | setMetadata(Map metadata) | +| `Direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | SortingDirection getDirection() | setDirection(SortingDirection direction) | +| `Sort` | [`SubscriptionSort`](../../doc/models/subscription-sort.md) | Optional | The attribute by which to sort

**Default**: `SubscriptionSort.SIGNUP_DATE` | SubscriptionSort getSort() | setSort(SubscriptionSort sort) | +| `Include` | [`List`](../../doc/models/subscription-list-include.md) | Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | List getInclude() | setInclude(List include) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.ListSubscriptionsInput; +import com.maxio.advancedbilling.models.SortingDirection; +import com.maxio.advancedbilling.models.SubscriptionDateField; +import com.maxio.advancedbilling.models.SubscriptionListInclude; +import com.maxio.advancedbilling.models.SubscriptionSort; +import com.maxio.advancedbilling.models.SubscriptionStateFilter; +import java.util.Arrays; +import java.util.LinkedHashMap; + +ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput.Builder() + .page(1) + .perPage(50) + .state(SubscriptionStateFilter.SUSPENDED) + .product(22) + .productPricePointId(234) + .coupon(84) + .couponCode("coupon_code4") + .dateField(SubscriptionDateField.TRIAL_STARTED_AT) + .startDate(DateTimeHelper.fromSimpleDate("2022-07-01")) + .endDate(DateTimeHelper.fromSimpleDate("2022-08-01")) + .startDatetime(DateTimeHelper.fromRfc8601DateTime("2022-07-01 09:00:05")) + .endDatetime(DateTimeHelper.fromRfc8601DateTime("2022-08-01 10:00:05")) + .metadata(new LinkedHashMap() {{ + put("key0", "metadata3"); + put("key1", "metadata4"); + put("key2", "metadata5"); + }}) + .direction(SortingDirection.ASC) + .sort(SubscriptionSort.SIGNUP_DATE) + .include(Arrays.asList( + SubscriptionListInclude.SELF_SERVICE_PAGE_TOKEN + )) + .build(); +``` + diff --git a/doc/models/list-usages-input.md b/doc/models/list-usages-input.md new file mode 100644 index 00000000..d1a5747f --- /dev/null +++ b/doc/models/list-usages-input.md @@ -0,0 +1,47 @@ + +# List Usages Input + +Input structure for the method ListUsages + +## Structure + +`ListUsagesInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `SubscriptionIdOrReference` | [`ListUsagesInputSubscriptionIdOrReference`](../../doc/models/containers/list-usages-input-subscription-id-or-reference.md) | Required | This is a container for one-of cases. | ListUsagesInputSubscriptionIdOrReference getSubscriptionIdOrReference() | setSubscriptionIdOrReference(ListUsagesInputSubscriptionIdOrReference subscriptionIdOrReference) | +| `ComponentId` | [`ListUsagesInputComponentId`](../../doc/models/containers/list-usages-input-component-id.md) | Required | This is a container for one-of cases. | ListUsagesInputComponentId getComponentId() | setComponentId(ListUsagesInputComponentId componentId) | +| `SinceId` | `Long` | Optional | Returns usages with an id greater than or equal to the one specified | Long getSinceId() | setSinceId(Long sinceId) | +| `MaxId` | `Long` | Optional | Returns usages with an id less than or equal to the one specified | Long getMaxId() | setMaxId(Long maxId) | +| `SinceDate` | `LocalDate` | Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | LocalDate getSinceDate() | setSinceDate(LocalDate sinceDate) | +| `UntilDate` | `LocalDate` | Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | LocalDate getUntilDate() | setUntilDate(LocalDate untilDate) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | + +## Example + +```java +import com.maxio.advancedbilling.DateTimeHelper; +import com.maxio.advancedbilling.models.ListUsagesInput; +import com.maxio.advancedbilling.models.containers.ListUsagesInputComponentId; +import com.maxio.advancedbilling.models.containers.ListUsagesInputSubscriptionIdOrReference; + +ListUsagesInput listUsagesInput = new ListUsagesInput.Builder( + ListUsagesInputSubscriptionIdOrReference.fromNumber( + 234 + ), + ListUsagesInputComponentId.fromNumber( + 144 + ) +) +.sinceId(104L) +.maxId(0L) +.sinceDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.untilDate(DateTimeHelper.fromSimpleDate("2016-03-13")) +.page(1) +.perPage(50) +.build(); +``` + diff --git a/doc/models/list-webhooks-input.md b/doc/models/list-webhooks-input.md new file mode 100644 index 00000000..db8a7763 --- /dev/null +++ b/doc/models/list-webhooks-input.md @@ -0,0 +1,39 @@ + +# List Webhooks Input + +Input structure for the method ListWebhooks + +## Structure + +`ListWebhooksInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Status` | [`WebhookStatus`](../../doc/models/webhook-status.md) | Optional | Webhooks with matching status would be returned. | WebhookStatus getStatus() | setStatus(WebhookStatus status) | +| `SinceDate` | `String` | Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date greater than or equal to the one specified. | String getSinceDate() | setSinceDate(String sinceDate) | +| `UntilDate` | `String` | Optional | Format YYYY-MM-DD. Returns Webhooks with the created_at date less than or equal to the one specified. | String getUntilDate() | setUntilDate(String untilDate) | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `Order` | [`WebhookOrder`](../../doc/models/webhook-order.md) | Optional | The order in which the Webhooks are returned. | WebhookOrder getOrder() | setOrder(WebhookOrder order) | +| `Subscription` | `Integer` | Optional | The Advanced Billing id of a subscription you'd like to filter for | Integer getSubscription() | setSubscription(Integer subscription) | + +## Example + +```java +import com.maxio.advancedbilling.models.ListWebhooksInput; +import com.maxio.advancedbilling.models.WebhookOrder; +import com.maxio.advancedbilling.models.WebhookStatus; + +ListWebhooksInput listWebhooksInput = new ListWebhooksInput.Builder() + .status(WebhookStatus.SUCCESSFUL) + .sinceDate("since_date4") + .untilDate("until_date6") + .page(1) + .perPage(50) + .order(WebhookOrder.NEWEST_FIRST) + .subscription(152) + .build(); +``` + diff --git a/doc/models/metafield-input.md b/doc/models/metafield-input.md index 74bf0d5b..75443bd3 100644 --- a/doc/models/metafield-input.md +++ b/doc/models/metafield-input.md @@ -11,8 +11,8 @@ Indicates the type of metafield. A text metafield allows any string value. Dropd | Name | | --- | -| `BalanceTracker` | -| `Text` | -| `Radio` | -| `Dropdown` | +| `BALANCE_TRACKER` | +| `TEXT` | +| `RADIO` | +| `DROPDOWN` | diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md index 9431839e..35e2c5dc 100644 --- a/doc/models/on-off-component.md +++ b/doc/models/on-off-component.md @@ -13,8 +13,8 @@ | `Description` | `String` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | String getDescription() | setDescription(String description) | | `Handle` | `String` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | String getHandle() | setHandle(String handle) | | `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) | | `UnitPrice` | [`OnOffComponentUnitPrice`](../../doc/models/containers/on-off-component-unit-price.md) | Required | This is a container for one-of cases. | OnOffComponentUnitPrice getUnitPrice() | setUnitPrice(OnOffComponentUnitPrice unitPrice) | | `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) | diff --git a/doc/models/pay-pal-vault.md b/doc/models/pay-pal-vault.md index fc7462f6..00445c6c 100644 --- a/doc/models/pay-pal-vault.md +++ b/doc/models/pay-pal-vault.md @@ -11,8 +11,8 @@ The vault that stores the payment profile with the provided vault_token. | Name | | --- | -| `BraintreeBlue` | -| `Paypal` | -| `Moduslink` | -| `PaypalComplete` | +| `BRAINTREE_BLUE` | +| `PAYPAL` | +| `MODUSLINK` | +| `PAYPAL_COMPLETE` | diff --git a/doc/models/payment-type.md b/doc/models/payment-type.md index 8b72290f..44b7cba6 100644 --- a/doc/models/payment-type.md +++ b/doc/models/payment-type.md @@ -9,8 +9,8 @@ | Name | | --- | -| `CreditCard` | -| `BankAccount` | -| `PaypalAccount` | -| `ApplePay` | +| `CREDIT_CARD` | +| `BANK_ACCOUNT` | +| `PAYPAL_ACCOUNT` | +| `APPLE_PAY` | diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md index cadc22a7..242985d2 100644 --- a/doc/models/prepaid-usage-component.md +++ b/doc/models/prepaid-usage-component.md @@ -16,8 +16,8 @@ | `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | List getPrices() | setPrices(List prices) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `PricePoints` | [`List`](../../doc/models/create-prepaid-usage-component-price-point.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) | | `UnitPrice` | [`PrepaidUsageComponentUnitPrice`](../../doc/models/containers/prepaid-usage-component-unit-price.md) | Optional | This is a container for one-of cases. | PrepaidUsageComponentUnitPrice getUnitPrice() | setUnitPrice(PrepaidUsageComponentUnitPrice unitPrice) | | `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) | diff --git a/doc/models/prepayment-method.md b/doc/models/prepayment-method.md index 10b58a6e..adbddd85 100644 --- a/doc/models/prepayment-method.md +++ b/doc/models/prepayment-method.md @@ -9,11 +9,11 @@ | Name | | --- | -| `Check` | -| `Cash` | -| `MoneyOrder` | -| `Ach` | -| `PaypalAccount` | -| `CreditCard` | -| `Other` | +| `CHECK` | +| `CASH` | +| `MONEY_ORDER` | +| `ACH` | +| `PAYPAL_ACCOUNT` | +| `CREDIT_CARD` | +| `OTHER` | diff --git a/doc/models/preview-allocations-request.md b/doc/models/preview-allocations-request.md index ec45619b..eec318e6 100644 --- a/doc/models/preview-allocations-request.md +++ b/doc/models/preview-allocations-request.md @@ -11,8 +11,8 @@ | --- | --- | --- | --- | --- | --- | | `Allocations` | [`List`](../../doc/models/create-allocation.md) | Required | - | List getAllocations() | setAllocations(List allocations) | | `EffectiveProrationDate` | `LocalDate` | Optional | To calculate proration amounts for a future time. Only within a current subscription period. Only ISO8601 format is supported. | LocalDate getEffectiveProrationDate() | setEffectiveProrationDate(LocalDate effectiveProrationDate) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | ## Example (as JSON) @@ -21,11 +21,11 @@ "allocations": [ { "quantity": 26.48, + "decimal_quantity": "decimal_quantity8", + "previous_quantity": 55.5, + "decimal_previous_quantity": "decimal_previous_quantity2", "component_id": 242, - "memo": "memo6", - "proration_downgrade_scheme": "proration_downgrade_scheme0", - "proration_upgrade_scheme": "proration_upgrade_scheme2", - "accrue_charge": false + "memo": "memo6" } ], "effective_proration_date": "2023-12-01", diff --git a/doc/models/price-point-type.md b/doc/models/price-point-type.md index aa976681..f62e2acb 100644 --- a/doc/models/price-point-type.md +++ b/doc/models/price-point-type.md @@ -15,7 +15,7 @@ Price point type. We expose the following types: | Name | | --- | -| `Catalog` | -| `Default` | -| `Custom` | +| `CATALOG` | +| `ENUM_DEFAULT` | +| `CUSTOM` | diff --git a/doc/models/pricing-scheme.md b/doc/models/pricing-scheme.md index 2d4daff3..6be09a7a 100644 --- a/doc/models/pricing-scheme.md +++ b/doc/models/pricing-scheme.md @@ -11,8 +11,8 @@ The identifier for the pricing scheme. See [Product Components](https://help.cha | Name | | --- | -| `Stairstep` | -| `Volume` | -| `PerUnit` | -| `Tiered` | +| `STAIRSTEP` | +| `VOLUME` | +| `PER_UNIT` | +| `TIERED` | diff --git a/doc/models/product-family.md b/doc/models/product-family.md index a7514819..5d76a243 100644 --- a/doc/models/product-family.md +++ b/doc/models/product-family.md @@ -16,6 +16,7 @@ | `Description` | `String` | Optional | - | String getDescription() | setDescription(String description) | | `CreatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | | `UpdatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | +| `ArchivedAt` | `ZonedDateTime` | Optional | Timestamp indicating when this product family was archived. `null` if the product family is not archived. | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | ## Example (as JSON) diff --git a/doc/models/proforma-invoice-discount-source-type.md b/doc/models/proforma-invoice-discount-source-type.md index 4618f4f7..9ca7d08f 100644 --- a/doc/models/proforma-invoice-discount-source-type.md +++ b/doc/models/proforma-invoice-discount-source-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Coupon` | -| `Referral` | +| `COUPON` | +| `REFERRAL` | diff --git a/doc/models/proforma-invoice-role.md b/doc/models/proforma-invoice-role.md index 21f1d26b..1ccf553b 100644 --- a/doc/models/proforma-invoice-role.md +++ b/doc/models/proforma-invoice-role.md @@ -11,8 +11,8 @@ | Name | | --- | -| `Unset` | -| `Proforma` | -| `ProformaAdhoc` | -| `ProformaAutomatic` | +| `UNSET` | +| `PROFORMA` | +| `PROFORMA_ADHOC` | +| `PROFORMA_AUTOMATIC` | diff --git a/doc/models/proforma-invoice-status.md b/doc/models/proforma-invoice-status.md index 95854de9..73e3ddef 100644 --- a/doc/models/proforma-invoice-status.md +++ b/doc/models/proforma-invoice-status.md @@ -9,7 +9,7 @@ | Name | | --- | -| `Draft` | -| `Voided` | -| `Archived` | +| `DRAFT` | +| `VOIDED` | +| `ARCHIVED` | diff --git a/doc/models/proforma-invoice-tax-source-type.md b/doc/models/proforma-invoice-tax-source-type.md index 4bd4e3ee..fab176de 100644 --- a/doc/models/proforma-invoice-tax-source-type.md +++ b/doc/models/proforma-invoice-tax-source-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Tax` | -| `Avalara` | +| `TAX` | +| `AVALARA` | diff --git a/doc/models/proforma-invoice.md b/doc/models/proforma-invoice.md index 9a905c79..67b096f1 100644 --- a/doc/models/proforma-invoice.md +++ b/doc/models/proforma-invoice.md @@ -45,6 +45,7 @@ | `Payments` | [`List`](../../doc/models/proforma-invoice-payment.md) | Optional | - | List getPayments() | setPayments(List payments) | | `CustomFields` | [`List`](../../doc/models/invoice-custom-field.md) | Optional | - | List getCustomFields() | setCustomFields(List customFields) | | `PublicUrl` | `String` | Optional | - | String getPublicUrl() | setPublicUrl(String publicUrl) | +| `AvailableActions` | [`AvailableActions`](../../doc/models/available-actions.md) | Optional | - | AvailableActions getAvailableActions() | setAvailableActions(AvailableActions availableActions) | ## Example (as JSON) diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md index d462f670..f4adb89e 100644 --- a/doc/models/quantity-based-component.md +++ b/doc/models/quantity-based-component.md @@ -16,8 +16,8 @@ | `Taxable` | `Boolean` | Optional | Boolean flag describing whether a component is taxable or not. | Boolean getTaxable() | setTaxable(Boolean taxable) | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | List getPrices() | setPrices(List prices) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `PricePoints` | [`List`](../../doc/models/component-price-point-item.md) | Optional | - | List getPricePoints() | setPricePoints(List pricePoints) | | `UnitPrice` | [`QuantityBasedComponentUnitPrice`](../../doc/models/containers/quantity-based-component-unit-price.md) | Optional | This is a container for one-of cases. | QuantityBasedComponentUnitPrice getUnitPrice() | setUnitPrice(QuantityBasedComponentUnitPrice unitPrice) | | `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) | diff --git a/doc/models/reactivate-subscription-request.md b/doc/models/reactivate-subscription-request.md index 33f67e16..e6e3bdd2 100644 --- a/doc/models/reactivate-subscription-request.md +++ b/doc/models/reactivate-subscription-request.md @@ -13,7 +13,7 @@ | `IncludeTrial` | `Boolean` | Optional | If `true` is sent, the reactivated Subscription will include a trial if one is available. If `false` is sent, the trial period will be ignored. | Boolean getIncludeTrial() | setIncludeTrial(Boolean includeTrial) | | `PreserveBalance` | `Boolean` | Optional | If `true` is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges. | Boolean getPreserveBalance() | setPreserveBalance(Boolean preserveBalance) | | `CouponCode` | `String` | Optional | The coupon code to be applied during reactivation. | String getCouponCode() | setCouponCode(String couponCode) | -| `UseCreditsAndPrepayments` | `Boolean` | Optional | If true is sent, Chargify will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored. | Boolean getUseCreditsAndPrepayments() | setUseCreditsAndPrepayments(Boolean useCreditsAndPrepayments) | +| `UseCreditsAndPrepayments` | `Boolean` | Optional | If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored. | Boolean getUseCreditsAndPrepayments() | setUseCreditsAndPrepayments(Boolean useCreditsAndPrepayments) | | `Resume` | [`ReactivateSubscriptionRequestResume`](../../doc/models/containers/reactivate-subscription-request-resume.md) | Optional | This is a container for one-of cases. | ReactivateSubscriptionRequestResume getResume() | setResume(ReactivateSubscriptionRequestResume resume) | ## Example (as JSON) diff --git a/doc/models/reactivation-charge.md b/doc/models/reactivation-charge.md index a661edd3..dbe0bc6e 100644 --- a/doc/models/reactivation-charge.md +++ b/doc/models/reactivation-charge.md @@ -11,7 +11,7 @@ You may choose how to handle the reactivation charge for that subscription: 1) ` | Name | | --- | -| `Prorated` | -| `Immediate` | -| `Delayed` | +| `PRORATED` | +| `IMMEDIATE` | +| `DELAYED` | diff --git a/doc/models/read-events-count-input.md b/doc/models/read-events-count-input.md new file mode 100644 index 00000000..96c967c9 --- /dev/null +++ b/doc/models/read-events-count-input.md @@ -0,0 +1,41 @@ + +# Read Events Count Input + +Input structure for the method ReadEventsCount + +## Structure + +`ReadEventsCountInput` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Page` | `Integer` | 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` | Integer getPage() | setPage(Integer page) | +| `PerPage` | `Integer` | 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` | Integer getPerPage() | setPerPage(Integer perPage) | +| `SinceId` | `Long` | Optional | Returns events with an id greater than or equal to the one specified | Long getSinceId() | setSinceId(Long sinceId) | +| `MaxId` | `Long` | Optional | Returns events with an id less than or equal to the one specified | Long getMaxId() | setMaxId(Long maxId) | +| `Direction` | [`Direction`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.DESC` | Direction getDirection() | setDirection(Direction direction) | +| `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | List getFilter() | setFilter(List filter) | + +## Example + +```java +import com.maxio.advancedbilling.models.Direction; +import com.maxio.advancedbilling.models.EventKey; +import com.maxio.advancedbilling.models.ReadEventsCountInput; +import java.util.Arrays; + +ReadEventsCountInput readEventsCountInput = new ReadEventsCountInput.Builder() + .page(1) + .perPage(50) + .sinceId(104L) + .maxId(0L) + .direction(Direction.DESC) + .filter(Arrays.asList( + EventKey.CUSTOM_FIELD_VALUE_CHANGE, + EventKey.PAYMENT_SUCCESS + )) + .build(); +``` + diff --git a/doc/models/recurring-scheme.md b/doc/models/recurring-scheme.md index 547307c3..8e378217 100644 --- a/doc/models/recurring-scheme.md +++ b/doc/models/recurring-scheme.md @@ -9,7 +9,7 @@ | Name | | --- | -| `DoNotRecur` | -| `RecurIndefinitely` | -| `RecurWithDuration` | +| `DO_NOT_RECUR` | +| `RECUR_INDEFINITELY` | +| `RECUR_WITH_DURATION` | diff --git a/doc/models/register.md b/doc/models/register.md new file mode 100644 index 00000000..f279af67 --- /dev/null +++ b/doc/models/register.md @@ -0,0 +1,27 @@ + +# Register + +## Structure + +`Register` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) | +| `MaxioId` | `String` | Optional | - | String getMaxioId() | setMaxioId(String maxioId) | +| `Name` | `String` | Optional | - | String getName() | setName(String name) | +| `CurrencyCode` | `String` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | String getCurrencyCode() | setCurrencyCode(String currencyCode) | + +## Example (as JSON) + +```json +{ + "id": 90, + "maxio_id": "maxio_id0", + "name": "name6", + "currency_code": "currency_code2" +} +``` + diff --git a/doc/models/resource-type.md b/doc/models/resource-type.md index c72afba5..1490b923 100644 --- a/doc/models/resource-type.md +++ b/doc/models/resource-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Subscriptions` | -| `Customers` | +| `SUBSCRIPTIONS` | +| `CUSTOMERS` | diff --git a/doc/models/restriction-type.md b/doc/models/restriction-type.md index c69ef31a..816172f6 100644 --- a/doc/models/restriction-type.md +++ b/doc/models/restriction-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Component` | -| `Product` | +| `COMPONENT` | +| `PRODUCT` | diff --git a/doc/models/resumption-charge.md b/doc/models/resumption-charge.md index f3a3fd80..799f3d35 100644 --- a/doc/models/resumption-charge.md +++ b/doc/models/resumption-charge.md @@ -11,7 +11,7 @@ | Name | | --- | -| `Prorated` | -| `Immediate` | -| `Delayed` | +| `PRORATED` | +| `IMMEDIATE` | +| `DELAYED` | diff --git a/doc/models/scheduled-renewal-component-custom-price.md b/doc/models/scheduled-renewal-component-custom-price.md new file mode 100644 index 00000000..0d82dafe --- /dev/null +++ b/doc/models/scheduled-renewal-component-custom-price.md @@ -0,0 +1,33 @@ + +# Scheduled Renewal Component Custom Price + +Custom pricing for a component within a scheduled renewal. + +## Structure + +`ScheduledRenewalComponentCustomPrice` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `TaxIncluded` | `Boolean` | Optional | Whether or not the price point includes tax | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | +| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | Omit for On/Off components | PricingScheme getPricingScheme() | setPricingScheme(PricingScheme pricingScheme) | +| `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1. | List getPrices() | setPrices(List prices) | + +## Example (as JSON) + +```json +{ + "pricing_scheme": "stairstep", + "prices": [ + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + } + ], + "tax_included": false +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-item-request.md b/doc/models/scheduled-renewal-configuration-item-request.md new file mode 100644 index 00000000..5a967344 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-item-request.md @@ -0,0 +1,42 @@ + +# Scheduled Renewal Configuration Item Request + +## Structure + +`ScheduledRenewalConfigurationItemRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `RenewalConfigurationItem` | [`ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem`](../../doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md) | Required | This is a container for one-of cases. | ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem getRenewalConfigurationItem() | setRenewalConfigurationItem(ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem) | + +## Example (as JSON) + +```json +{ + "renewal_configuration_item": { + "item_type": "Component", + "item_id": 108, + "price_point_id": 122, + "quantity": 212, + "custom_price": { + "tax_included": false, + "pricing_scheme": "stairstep", + "prices": [ + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + }, + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + } + ] + } + } +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-item-response.md b/doc/models/scheduled-renewal-configuration-item-response.md new file mode 100644 index 00000000..1abaa4b1 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-item-response.md @@ -0,0 +1,27 @@ + +# Scheduled Renewal Configuration Item Response + +## Structure + +`ScheduledRenewalConfigurationItemResponse` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ScheduledRenewalConfigurationItem` | [`ScheduledRenewalConfigurationItem`](../../doc/models/scheduled-renewal-configuration-item.md) | Optional | - | ScheduledRenewalConfigurationItem getScheduledRenewalConfigurationItem() | setScheduledRenewalConfigurationItem(ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem) | + +## Example (as JSON) + +```json +{ + "scheduled_renewal_configuration_item": { + "id": 98, + "subscription_id": 208, + "subscription_renewal_configuration_id": 108, + "item_id": 246, + "item_type": "item_type2" + } +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-item.md b/doc/models/scheduled-renewal-configuration-item.md new file mode 100644 index 00000000..9592d0f6 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-item.md @@ -0,0 +1,35 @@ + +# Scheduled Renewal Configuration Item + +## Structure + +`ScheduledRenewalConfigurationItem` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) | +| `SubscriptionId` | `Integer` | Optional | - | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `SubscriptionRenewalConfigurationId` | `Integer` | Optional | - | Integer getSubscriptionRenewalConfigurationId() | setSubscriptionRenewalConfigurationId(Integer subscriptionRenewalConfigurationId) | +| `ItemId` | `Integer` | Optional | - | Integer getItemId() | setItemId(Integer itemId) | +| `ItemType` | `String` | Optional | - | String getItemType() | setItemType(String itemType) | +| `ItemSubclass` | `String` | Optional | - | String getItemSubclass() | setItemSubclass(String itemSubclass) | +| `PricePointId` | `Integer` | Optional | - | Integer getPricePointId() | setPricePointId(Integer pricePointId) | +| `PricePointType` | `String` | Optional | - | String getPricePointType() | setPricePointType(String pricePointType) | +| `Quantity` | `Integer` | Optional | - | Integer getQuantity() | setQuantity(Integer quantity) | +| `DecimalQuantity` | `String` | Optional | - | String getDecimalQuantity() | setDecimalQuantity(String decimalQuantity) | +| `CreatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | + +## Example (as JSON) + +```json +{ + "id": 146, + "subscription_id": 0, + "subscription_renewal_configuration_id": 156, + "item_id": 38, + "item_type": "item_type4" +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-request-body.md b/doc/models/scheduled-renewal-configuration-request-body.md new file mode 100644 index 00000000..c2c23629 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-request-body.md @@ -0,0 +1,29 @@ + +# Scheduled Renewal Configuration Request Body + +## Structure + +`ScheduledRenewalConfigurationRequestBody` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `StartsAt` | `ZonedDateTime` | Optional | (Optional) Start of the renewal term. | ZonedDateTime getStartsAt() | setStartsAt(ZonedDateTime startsAt) | +| `EndsAt` | `ZonedDateTime` | Optional | (Optional) End of the renewal term. | ZonedDateTime getEndsAt() | setEndsAt(ZonedDateTime endsAt) | +| `LockInAt` | `ZonedDateTime` | Optional | (Optional) Lock-in date for the renewal. | ZonedDateTime getLockInAt() | setLockInAt(ZonedDateTime lockInAt) | +| `ContractId` | `Integer` | Optional | (Optional) Existing contract to associate with the scheduled renewal. Contracts must be enabled for your site. | Integer getContractId() | setContractId(Integer contractId) | +| `CreateNewContract` | `Boolean` | Optional | (Optional) Set to true to create a new contract when contracts are enabled. Contracts must be enabled for your site. | Boolean getCreateNewContract() | setCreateNewContract(Boolean createNewContract) | + +## Example (as JSON) + +```json +{ + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z", + "lock_in_at": "2016-03-13T12:52:32.123Z", + "contract_id": 110, + "create_new_contract": false +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-request.md b/doc/models/scheduled-renewal-configuration-request.md new file mode 100644 index 00000000..6ec6201a --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-request.md @@ -0,0 +1,27 @@ + +# Scheduled Renewal Configuration Request + +## Structure + +`ScheduledRenewalConfigurationRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `RenewalConfiguration` | [`ScheduledRenewalConfigurationRequestBody`](../../doc/models/scheduled-renewal-configuration-request-body.md) | Required | - | ScheduledRenewalConfigurationRequestBody getRenewalConfiguration() | setRenewalConfiguration(ScheduledRenewalConfigurationRequestBody renewalConfiguration) | + +## Example (as JSON) + +```json +{ + "renewal_configuration": { + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z", + "lock_in_at": "2016-03-13T12:52:32.123Z", + "contract_id": 244, + "create_new_contract": false + } +} +``` + diff --git a/doc/models/scheduled-renewal-configuration-response.md b/doc/models/scheduled-renewal-configuration-response.md new file mode 100644 index 00000000..ea94f252 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration-response.md @@ -0,0 +1,27 @@ + +# Scheduled Renewal Configuration Response + +## Structure + +`ScheduledRenewalConfigurationResponse` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ScheduledRenewalConfiguration` | [`ScheduledRenewalConfiguration`](../../doc/models/scheduled-renewal-configuration.md) | Optional | - | ScheduledRenewalConfiguration getScheduledRenewalConfiguration() | setScheduledRenewalConfiguration(ScheduledRenewalConfiguration scheduledRenewalConfiguration) | + +## Example (as JSON) + +```json +{ + "scheduled_renewal_configuration": { + "id": 134, + "site_id": 60, + "subscription_id": 244, + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z" + } +} +``` + diff --git a/doc/models/scheduled-renewal-configuration.md b/doc/models/scheduled-renewal-configuration.md new file mode 100644 index 00000000..b7e29e95 --- /dev/null +++ b/doc/models/scheduled-renewal-configuration.md @@ -0,0 +1,34 @@ + +# Scheduled Renewal Configuration + +## Structure + +`ScheduledRenewalConfiguration` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | ID of the renewal. | Integer getId() | setId(Integer id) | +| `SiteId` | `Integer` | Optional | ID of the site to which the renewal belongs. | Integer getSiteId() | setSiteId(Integer siteId) | +| `SubscriptionId` | `Integer` | Optional | The id of the subscription. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | +| `StartsAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getStartsAt() | setStartsAt(ZonedDateTime startsAt) | +| `EndsAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getEndsAt() | setEndsAt(ZonedDateTime endsAt) | +| `LockInAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getLockInAt() | setLockInAt(ZonedDateTime lockInAt) | +| `CreatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `Status` | `String` | Optional | - | String getStatus() | setStatus(String status) | +| `ScheduledRenewalConfigurationItems` | [`List`](../../doc/models/scheduled-renewal-configuration-item.md) | Optional | - | List getScheduledRenewalConfigurationItems() | setScheduledRenewalConfigurationItems(List scheduledRenewalConfigurationItems) | +| `Contract` | [`Contract`](../../doc/models/contract.md) | Optional | Contract linked to the scheduled renewal configuration. | Contract getContract() | setContract(Contract contract) | + +## Example (as JSON) + +```json +{ + "id": 152, + "site_id": 78, + "subscription_id": 6, + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z" +} +``` + diff --git a/doc/models/scheduled-renewal-configurations-response.md b/doc/models/scheduled-renewal-configurations-response.md new file mode 100644 index 00000000..d0ee3067 --- /dev/null +++ b/doc/models/scheduled-renewal-configurations-response.md @@ -0,0 +1,43 @@ + +# Scheduled Renewal Configurations Response + +## Structure + +`ScheduledRenewalConfigurationsResponse` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ScheduledRenewalConfigurations` | [`List`](../../doc/models/scheduled-renewal-configuration.md) | Optional | - | List getScheduledRenewalConfigurations() | setScheduledRenewalConfigurations(List scheduledRenewalConfigurations) | + +## Example (as JSON) + +```json +{ + "scheduled_renewal_configurations": [ + { + "id": 122, + "site_id": 48, + "subscription_id": 232, + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z" + }, + { + "id": 122, + "site_id": 48, + "subscription_id": 232, + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z" + }, + { + "id": 122, + "site_id": 48, + "subscription_id": 232, + "starts_at": "2016-03-13T12:52:32.123Z", + "ends_at": "2016-03-13T12:52:32.123Z" + } + ] +} +``` + diff --git a/doc/models/scheduled-renewal-item-request-body-component.md b/doc/models/scheduled-renewal-item-request-body-component.md new file mode 100644 index 00000000..fad2625e --- /dev/null +++ b/doc/models/scheduled-renewal-item-request-body-component.md @@ -0,0 +1,44 @@ + +# Scheduled Renewal Item Request Body Component + +## Structure + +`ScheduledRenewalItemRequestBodyComponent` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ItemType` | `String` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `"Component"` | String getItemType() | setItemType(String itemType) | +| `ItemId` | `int` | Required | Product or component identifier. | int getItemId() | setItemId(int itemId) | +| `PricePointId` | `Integer` | Optional | Price point identifier. | Integer getPricePointId() | setPricePointId(Integer pricePointId) | +| `Quantity` | `Integer` | Optional | Optional quantity for the item. | Integer getQuantity() | setQuantity(Integer quantity) | +| `CustomPrice` | [`ScheduledRenewalComponentCustomPrice`](../../doc/models/scheduled-renewal-component-custom-price.md) | Optional | Custom pricing for a component within a scheduled renewal. | ScheduledRenewalComponentCustomPrice getCustomPrice() | setCustomPrice(ScheduledRenewalComponentCustomPrice customPrice) | + +## Example (as JSON) + +```json +{ + "item_type": "Component", + "item_id": 108, + "price_point_id": 122, + "quantity": 212, + "custom_price": { + "tax_included": false, + "pricing_scheme": "stairstep", + "prices": [ + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + }, + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + } + ] + } +} +``` + diff --git a/doc/models/scheduled-renewal-item-request-body-product.md b/doc/models/scheduled-renewal-item-request-body-product.md new file mode 100644 index 00000000..06efff3d --- /dev/null +++ b/doc/models/scheduled-renewal-item-request-body-product.md @@ -0,0 +1,38 @@ + +# Scheduled Renewal Item Request Body Product + +## Structure + +`ScheduledRenewalItemRequestBodyProduct` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ItemType` | `String` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `"Product"` | String getItemType() | setItemType(String itemType) | +| `ItemId` | `int` | Required | Product or component identifier. | int getItemId() | setItemId(int itemId) | +| `PricePointId` | `Integer` | Optional | Price point identifier. | Integer getPricePointId() | setPricePointId(Integer pricePointId) | +| `Quantity` | `Integer` | Optional | Optional quantity for the item. | Integer getQuantity() | setQuantity(Integer quantity) | +| `CustomPrice` | [`ScheduledRenewalProductPricePoint`](../../doc/models/scheduled-renewal-product-price-point.md) | Optional | Custom pricing for a product within a scheduled renewal. | ScheduledRenewalProductPricePoint getCustomPrice() | setCustomPrice(ScheduledRenewalProductPricePoint customPrice) | + +## Example (as JSON) + +```json +{ + "item_type": "Product", + "item_id": 32, + "price_point_id": 18, + "quantity": 96, + "custom_price": { + "name": "name4", + "handle": "handle0", + "price_in_cents": "String3", + "interval": "String3", + "interval_unit": "day", + "tax_included": false, + "initial_charge_in_cents": 30, + "expiration_interval": 52 + } +} +``` + diff --git a/doc/models/scheduled-renewal-lock-in-request.md b/doc/models/scheduled-renewal-lock-in-request.md new file mode 100644 index 00000000..9a25fdb2 --- /dev/null +++ b/doc/models/scheduled-renewal-lock-in-request.md @@ -0,0 +1,21 @@ + +# Scheduled Renewal Lock in Request + +## Structure + +`ScheduledRenewalLockInRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `LockInAt` | `LocalDate` | Required | Date to lock in the renewal. | LocalDate getLockInAt() | setLockInAt(LocalDate lockInAt) | + +## Example (as JSON) + +```json +{ + "lock_in_at": "2016-03-13" +} +``` + diff --git a/doc/models/scheduled-renewal-product-price-point.md b/doc/models/scheduled-renewal-product-price-point.md new file mode 100644 index 00000000..1b7fe884 --- /dev/null +++ b/doc/models/scheduled-renewal-product-price-point.md @@ -0,0 +1,38 @@ + +# Scheduled Renewal Product Price Point + +Custom pricing for a product within a scheduled renewal. + +## Structure + +`ScheduledRenewalProductPricePoint` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Name` | `String` | Optional | (Optional) | String getName() | setName(String name) | +| `Handle` | `String` | Optional | (Optional) | String getHandle() | setHandle(String handle) | +| `PriceInCents` | [`ScheduledRenewalProductPricePointPriceInCents`](../../doc/models/containers/scheduled-renewal-product-price-point-price-in-cents.md) | Required | This is a container for one-of cases. | ScheduledRenewalProductPricePointPriceInCents getPriceInCents() | setPriceInCents(ScheduledRenewalProductPricePointPriceInCents priceInCents) | +| `Interval` | [`ScheduledRenewalProductPricePointInterval`](../../doc/models/containers/scheduled-renewal-product-price-point-interval.md) | Required | This is a container for one-of cases. | ScheduledRenewalProductPricePointInterval getInterval() | setInterval(ScheduledRenewalProductPricePointInterval interval) | +| `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | Required if using `custom_price` attribute. | IntervalUnit getIntervalUnit() | setIntervalUnit(IntervalUnit intervalUnit) | +| `TaxIncluded` | `Boolean` | Optional | (Optional) | Boolean getTaxIncluded() | setTaxIncluded(Boolean taxIncluded) | +| `InitialChargeInCents` | `Long` | Optional | The product price point initial charge, in integer cents. | Long getInitialChargeInCents() | setInitialChargeInCents(Long initialChargeInCents) | +| `ExpirationInterval` | `Integer` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | Integer getExpirationInterval() | setExpirationInterval(Integer expirationInterval) | +| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) | + +## Example (as JSON) + +```json +{ + "name": "name4", + "handle": "handle0", + "price_in_cents": "String3", + "interval": "String9", + "interval_unit": "day", + "tax_included": false, + "initial_charge_in_cents": 86, + "expiration_interval": 108 +} +``` + diff --git a/doc/models/scheduled-renewal-update-request.md b/doc/models/scheduled-renewal-update-request.md new file mode 100644 index 00000000..b09f32c7 --- /dev/null +++ b/doc/models/scheduled-renewal-update-request.md @@ -0,0 +1,42 @@ + +# Scheduled Renewal Update Request + +## Structure + +`ScheduledRenewalUpdateRequest` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `RenewalConfigurationItem` | [`ScheduledRenewalUpdateRequestRenewalConfigurationItem`](../../doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md) | Required | This is a container for one-of cases. | ScheduledRenewalUpdateRequestRenewalConfigurationItem getRenewalConfigurationItem() | setRenewalConfigurationItem(ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem) | + +## Example (as JSON) + +```json +{ + "renewal_configuration_item": { + "item_type": "Component", + "item_id": 108, + "price_point_id": 122, + "quantity": 212, + "custom_price": { + "tax_included": false, + "pricing_scheme": "stairstep", + "prices": [ + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + }, + { + "starting_quantity": 242, + "ending_quantity": 40, + "unit_price": 23.26 + } + ] + } + } +} +``` + diff --git a/doc/models/send-email.md b/doc/models/send-email.md new file mode 100644 index 00000000..d8d7b53f --- /dev/null +++ b/doc/models/send-email.md @@ -0,0 +1,23 @@ + +# Send Email + +## Structure + +`SendEmail` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `CanExecute` | `boolean` | Required | - | boolean getCanExecute() | setCanExecute(boolean canExecute) | +| `Url` | `String` | Required | - | String getUrl() | setUrl(String url) | + +## Example (as JSON) + +```json +{ + "can_execute": false, + "url": "url2" +} +``` + diff --git a/doc/models/send-invoice-request.md b/doc/models/send-invoice-request.md index 297b4700..46c4af53 100644 --- a/doc/models/send-invoice-request.md +++ b/doc/models/send-invoice-request.md @@ -12,6 +12,7 @@ | `RecipientEmails` | `List` | Optional | **Constraints**: *Maximum Items*: `5` | List getRecipientEmails() | setRecipientEmails(List recipientEmails) | | `CcRecipientEmails` | `List` | Optional | **Constraints**: *Maximum Items*: `5` | List getCcRecipientEmails() | setCcRecipientEmails(List ccRecipientEmails) | | `BccRecipientEmails` | `List` | Optional | **Constraints**: *Maximum Items*: `5` | List getBccRecipientEmails() | setBccRecipientEmails(List bccRecipientEmails) | +| `AttachmentUrls` | `List` | Optional | Array of URLs to files to attach to the invoice email. Max 10 files, 10MB each.

**Constraints**: *Maximum Items*: `10` | List getAttachmentUrls() | setAttachmentUrls(List attachmentUrls) | ## Example (as JSON) @@ -27,6 +28,10 @@ ], "bcc_recipient_emails": [ "bcc_recipient_emails6" + ], + "attachment_urls": [ + "attachment_urls0", + "attachment_urls1" ] } ``` diff --git a/doc/models/service-credit-type.md b/doc/models/service-credit-type.md index 6d70a37f..e4763845 100644 --- a/doc/models/service-credit-type.md +++ b/doc/models/service-credit-type.md @@ -11,6 +11,6 @@ The type of entry | Name | | --- | -| `Credit` | -| `Debit` | +| `CREDIT` | +| `DEBIT` | diff --git a/doc/models/snap-day.md b/doc/models/snap-day.md deleted file mode 100644 index 92da90e2..00000000 --- a/doc/models/snap-day.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Snap Day - -## Enumeration - -`SnapDay` - -## Fields - -| Name | -| --- | -| `End` | - diff --git a/doc/models/sorting-direction.md b/doc/models/sorting-direction.md index 047e9eda..547aa444 100644 --- a/doc/models/sorting-direction.md +++ b/doc/models/sorting-direction.md @@ -11,6 +11,6 @@ Used for sorting results. | Name | | --- | -| `Asc` | -| `Desc` | +| `ASC` | +| `DESC` | diff --git a/doc/models/status.md b/doc/models/status.md new file mode 100644 index 00000000..3531d2ce --- /dev/null +++ b/doc/models/status.md @@ -0,0 +1,18 @@ + +# Status + +## Enumeration + +`Status` + +## Fields + +| Name | +| --- | +| `DRAFT` | +| `SCHEDULED` | +| `PENDING` | +| `CANCELED` | +| `ACTIVE` | +| `FULFILLED` | + diff --git a/doc/models/subscription-component.md b/doc/models/subscription-component.md index 988ed214..8d7f2c27 100644 --- a/doc/models/subscription-component.md +++ b/doc/models/subscription-component.md @@ -22,8 +22,8 @@ | `ComponentHandle` | `String` | Optional | - | String getComponentHandle() | setComponentHandle(String componentHandle) | | `SubscriptionId` | `Integer` | Optional | - | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | | `Recurring` | `Boolean` | Optional | - | Boolean getRecurring() | setRecurring(Boolean recurring) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | -| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `DowngradeCredit` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getDowngradeCredit() | setDowngradeCredit(CreditType downgradeCredit) | | `ArchivedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getArchivedAt() | setArchivedAt(ZonedDateTime archivedAt) | | `PricePointId` | `Integer` | Optional | - | Integer getPricePointId() | setPricePointId(Integer pricePointId) | | `PricePointHandle` | `String` | Optional | - | String getPricePointHandle() | setPricePointHandle(String pricePointHandle) | diff --git a/doc/models/subscription-custom-price.md b/doc/models/subscription-custom-price.md index 5020f8a5..b21b15fc 100644 --- a/doc/models/subscription-custom-price.md +++ b/doc/models/subscription-custom-price.md @@ -1,7 +1,7 @@ # Subscription Custom Price -(Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription +(Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. ## Structure diff --git a/doc/models/subscription-date-field.md b/doc/models/subscription-date-field.md index 96ed6f37..3de7f3b6 100644 --- a/doc/models/subscription-date-field.md +++ b/doc/models/subscription-date-field.md @@ -9,13 +9,13 @@ | Name | | --- | -| `CurrentPeriodEndsAt` | -| `CurrentPeriodStartsAt` | -| `CreatedAt` | -| `ActivatedAt` | -| `CanceledAt` | -| `ExpiresAt` | -| `TrialStartedAt` | -| `TrialEndedAt` | -| `UpdatedAt` | +| `CURRENT_PERIOD_ENDS_AT` | +| `CURRENT_PERIOD_STARTS_AT` | +| `CREATED_AT` | +| `ACTIVATED_AT` | +| `CANCELED_AT` | +| `EXPIRES_AT` | +| `TRIAL_STARTED_AT` | +| `TRIAL_ENDED_AT` | +| `UPDATED_AT` | diff --git a/doc/models/subscription-group-component-custom-price.md b/doc/models/subscription-group-component-custom-price.md index f5ce5e42..5d01736f 100644 --- a/doc/models/subscription-group-component-custom-price.md +++ b/doc/models/subscription-group-component-custom-price.md @@ -33,14 +33,14 @@ Used in place of `price_point_id` to define a custom price point unique to the s "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", + "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } ] } diff --git a/doc/models/subscription-group-include.md b/doc/models/subscription-group-include.md index a9b79d1a..3225e28e 100644 --- a/doc/models/subscription-group-include.md +++ b/doc/models/subscription-group-include.md @@ -9,5 +9,5 @@ | Name | | --- | -| `CurrentBillingAmountInCents` | +| `CURRENT_BILLING_AMOUNT_IN_CENTS` | diff --git a/doc/models/subscription-group-prepayment-method.md b/doc/models/subscription-group-prepayment-method.md index fb11c3df..dc41027f 100644 --- a/doc/models/subscription-group-prepayment-method.md +++ b/doc/models/subscription-group-prepayment-method.md @@ -9,10 +9,10 @@ | Name | | --- | -| `Check` | -| `Cash` | -| `MoneyOrder` | -| `Ach` | -| `PaypalAccount` | -| `Other` | +| `CHECK` | +| `CASH` | +| `MONEY_ORDER` | +| `ACH` | +| `PAYPAL_ACCOUNT` | +| `OTHER` | diff --git a/doc/models/subscription-group-response.md b/doc/models/subscription-group-response.md index 85a0ae7c..e43d5ce1 100644 --- a/doc/models/subscription-group-response.md +++ b/doc/models/subscription-group-response.md @@ -16,6 +16,7 @@ ```json { "subscription_group": { + "uid": "uid8", "customer_id": 220, "payment_profile": { "id": 44, @@ -27,8 +28,7 @@ "subscription_ids": [ 74, 75 - ], - "created_at": "2016-03-13T12:52:32.123Z" + ] } } ``` diff --git a/doc/models/subscription-group-signup-component.md b/doc/models/subscription-group-signup-component.md index 6593f51c..08a30d69 100644 --- a/doc/models/subscription-group-signup-component.md +++ b/doc/models/subscription-group-signup-component.md @@ -43,42 +43,42 @@ "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", + "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] }, { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", + "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] }, { "tax_included": false, "pricing_scheme": "stairstep", "interval": 230, "interval_unit": "day", + "list_price_point_id": 10, "prices": [ { "starting_quantity": 242, "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } ] } diff --git a/doc/models/subscription-group-signup-item.md b/doc/models/subscription-group-signup-item.md index 51ea99e2..03881048 100644 --- a/doc/models/subscription-group-signup-item.md +++ b/doc/models/subscription-group-signup-item.md @@ -19,7 +19,7 @@ | `Currency` | `String` | Optional | (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription. | String getCurrency() | setCurrency(String currency) | | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | List getCouponCodes() | setCouponCodes(List couponCodes) | | `Components` | [`List`](../../doc/models/subscription-group-signup-component.md) | Optional | - | List getComponents() | setComponents(List components) | -| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | +| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | | `CalendarBilling` | [`CalendarBilling`](../../doc/models/calendar-billing.md) | Optional | (Optional). Cannot be used when also specifying next_billing_at | CalendarBilling getCalendarBilling() | setCalendarBilling(CalendarBilling calendarBilling) | | `Metafields` | `Map` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | Map getMetafields() | setMetafields(Map metafields) | diff --git a/doc/models/subscription-group.md b/doc/models/subscription-group.md index 93c51881..93e431b4 100644 --- a/doc/models/subscription-group.md +++ b/doc/models/subscription-group.md @@ -9,6 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | +| `Uid` | `String` | Optional | - | String getUid() | setUid(String uid) | | `CustomerId` | `Integer` | Optional | - | Integer getCustomerId() | setCustomerId(Integer customerId) | | `PaymentProfile` | [`SubscriptionGroupPaymentProfile`](../../doc/models/subscription-group-payment-profile.md) | Optional | - | SubscriptionGroupPaymentProfile getPaymentProfile() | setPaymentProfile(SubscriptionGroupPaymentProfile paymentProfile) | | `PaymentCollectionMethod` | [`CollectionMethod`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | CollectionMethod getPaymentCollectionMethod() | setPaymentCollectionMethod(CollectionMethod paymentCollectionMethod) | @@ -19,6 +20,7 @@ ```json { + "uid": "uid4", "customer_id": 36, "payment_profile": { "id": 44, @@ -31,8 +33,7 @@ 146, 147, 148 - ], - "created_at": "2016-03-13T12:52:32.123Z" + ] } ``` diff --git a/doc/models/subscription-groups-list-include.md b/doc/models/subscription-groups-list-include.md index fc6245e9..27d18a04 100644 --- a/doc/models/subscription-groups-list-include.md +++ b/doc/models/subscription-groups-list-include.md @@ -9,5 +9,5 @@ | Name | | --- | -| `AccountBalances` | +| `ACCOUNT_BALANCES` | diff --git a/doc/models/subscription-include.md b/doc/models/subscription-include.md index a5f953d1..639f7da2 100644 --- a/doc/models/subscription-include.md +++ b/doc/models/subscription-include.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Coupons` | -| `SelfServicePageToken` | +| `COUPONS` | +| `SELF_SERVICE_PAGE_TOKEN` | diff --git a/doc/models/subscription-list-date-field.md b/doc/models/subscription-list-date-field.md index da66051e..dc18409d 100644 --- a/doc/models/subscription-list-date-field.md +++ b/doc/models/subscription-list-date-field.md @@ -9,7 +9,7 @@ | Name | | --- | -| `UpdatedAt` | +| `UPDATED_AT` | ## Example diff --git a/doc/models/subscription-list-include.md b/doc/models/subscription-list-include.md index 27359075..27fb9c1d 100644 --- a/doc/models/subscription-list-include.md +++ b/doc/models/subscription-list-include.md @@ -9,5 +9,5 @@ | Name | | --- | -| `SelfServicePageToken` | +| `SELF_SERVICE_PAGE_TOKEN` | diff --git a/doc/models/subscription-purge-type.md b/doc/models/subscription-purge-type.md index e8d5857e..cd25299c 100644 --- a/doc/models/subscription-purge-type.md +++ b/doc/models/subscription-purge-type.md @@ -9,6 +9,6 @@ | Name | | --- | -| `Customer` | -| `PaymentProfile` | +| `CUSTOMER` | +| `PAYMENT_PROFILE` | diff --git a/doc/models/subscription-sort.md b/doc/models/subscription-sort.md index cfae8370..b07e8ee0 100644 --- a/doc/models/subscription-sort.md +++ b/doc/models/subscription-sort.md @@ -9,10 +9,14 @@ | Name | | --- | -| `SignupDate` | -| `PeriodStart` | -| `PeriodEnd` | -| `NextAssessment` | -| `UpdatedAt` | -| `CreatedAt` | +| `SIGNUP_DATE` | +| `PERIOD_START` | +| `PERIOD_END` | +| `NEXT_ASSESSMENT` | +| `UPDATED_AT` | +| `CREATED_AT` | +| `TOTAL_PAYMENTS` | +| `ID` | +| `OPEN_BALANCE` | +| `EXPIRES_AT` | diff --git a/doc/models/subscription-state-filter.md b/doc/models/subscription-state-filter.md index aaf21877..148d4118 100644 --- a/doc/models/subscription-state-filter.md +++ b/doc/models/subscription-state-filter.md @@ -11,16 +11,16 @@ Allowed values for filtering by the current state of the subscription. | Name | | --- | -| `Active` | -| `Canceled` | -| `Expired` | -| `ExpiredCards` | -| `OnHold` | -| `PastDue` | -| `PendingCancellation` | -| `PendingRenewal` | -| `Suspended` | -| `TrialEnded` | -| `Trialing` | -| `Unpaid` | +| `ACTIVE` | +| `CANCELED` | +| `EXPIRED` | +| `EXPIRED_CARDS` | +| `ON_HOLD` | +| `PAST_DUE` | +| `PENDING_CANCELLATION` | +| `PENDING_RENEWAL` | +| `SUSPENDED` | +| `TRIAL_ENDED` | +| `TRIALING` | +| `UNPAID` | diff --git a/doc/models/subscription-state.md b/doc/models/subscription-state.md index 3b99ac5e..6e893623 100644 --- a/doc/models/subscription-state.md +++ b/doc/models/subscription-state.md @@ -32,19 +32,19 @@ See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/2425211902 | Name | | --- | -| `Pending` | -| `FailedToCreate` | -| `Trialing` | -| `Assessing` | -| `Active` | -| `SoftFailure` | -| `PastDue` | -| `Suspended` | -| `Canceled` | -| `Expired` | -| `Paused` | -| `Unpaid` | -| `TrialEnded` | -| `OnHold` | -| `AwaitingSignup` | +| `PENDING` | +| `FAILED_TO_CREATE` | +| `TRIALING` | +| `ASSESSING` | +| `ACTIVE` | +| `SOFT_FAILURE` | +| `PAST_DUE` | +| `SUSPENDED` | +| `CANCELED` | +| `EXPIRED` | +| `PAUSED` | +| `UNPAID` | +| `TRIAL_ENDED` | +| `ON_HOLD` | +| `AWAITING_SIGNUP` | diff --git a/doc/models/subscription.md b/doc/models/subscription.md index ef7db3a7..cd34c6fc 100644 --- a/doc/models/subscription.md +++ b/doc/models/subscription.md @@ -33,7 +33,7 @@ | `SignupRevenue` | `String` | Optional | The revenue, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,50.00) | String getSignupRevenue() | setSignupRevenue(String signupRevenue) | | `DelayedCancelAt` | `ZonedDateTime` | Optional | Timestamp for when the subscription is currently set to cancel. | ZonedDateTime getDelayedCancelAt() | setDelayedCancelAt(ZonedDateTime delayedCancelAt) | | `CouponCode` | `String` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | String getCouponCode() | setCouponCode(String couponCode) | -| `SnapDay` | [`SubscriptionSnapDay`](../../doc/models/containers/subscription-snap-day.md) | Optional | This is a container for one-of cases. | SubscriptionSnapDay getSnapDay() | setSnapDay(SubscriptionSnapDay snapDay) | +| `SnapDay` | `String` | Optional | A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. | String getSnapDay() | setSnapDay(String snapDay) | | `PaymentCollectionMethod` | [`CollectionMethod`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | CollectionMethod getPaymentCollectionMethod() | setPaymentCollectionMethod(CollectionMethod paymentCollectionMethod) | | `Customer` | [`Customer`](../../doc/models/customer.md) | Optional | - | Customer getCustomer() | setCustomer(Customer customer) | | `Product` | [`Product`](../../doc/models/product.md) | Optional | - | Product getProduct() | setProduct(Product product) | @@ -46,7 +46,7 @@ | `NextProductHandle` | `String` | Optional | If a delayed product change is scheduled, the handle of the product that the subscription will be changed to at the next renewal. | String getNextProductHandle() | setNextProductHandle(String nextProductHandle) | | `CouponUseCount` | `Integer` | Optional | (deprecated) How many times the subscription's single coupon has been used. This field has no replacement for multiple coupons. | Integer getCouponUseCount() | setCouponUseCount(Integer couponUseCount) | | `CouponUsesAllowed` | `Integer` | Optional | (deprecated) How many times the subscription's single coupon may be used. This field has no replacement for multiple coupons. | Integer getCouponUsesAllowed() | setCouponUsesAllowed(Integer couponUsesAllowed) | -| `ReasonCode` | `String` | Optional | If the subscription is canceled, this is their churn code. | String getReasonCode() | setReasonCode(String reasonCode) | +| `ReasonCode` | `String` | Optional | The churn reason code associated to a cancelled subscription. | String getReasonCode() | setReasonCode(String reasonCode) | | `AutomaticallyResumeAt` | `ZonedDateTime` | Optional | The date the subscription is scheduled to automatically resume from the on_hold state. | ZonedDateTime getAutomaticallyResumeAt() | setAutomaticallyResumeAt(ZonedDateTime automaticallyResumeAt) | | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | List getCouponCodes() | setCouponCodes(List couponCodes) | | `OfferId` | `Integer` | Optional | The ID of the offer associated with the subscription. | Integer getOfferId() | setOfferId(Integer offerId) | @@ -57,7 +57,7 @@ | `NextProductPricePointId` | `Integer` | Optional | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | Integer getNextProductPricePointId() | setNextProductPricePointId(Integer nextProductPricePointId) | | `NetTerms` | `Integer` | Optional | On Relationship Invoicing, the number of days before a renewal invoice is due. | Integer getNetTerms() | setNetTerms(Integer netTerms) | | `StoredCredentialTransactionId` | `Integer` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | Integer getStoredCredentialTransactionId() | setStoredCredentialTransactionId(Integer storedCredentialTransactionId) | -| `Reference` | `String` | Optional | The reference value (provided by your app) for the subscription itelf. | String getReference() | setReference(String reference) | +| `Reference` | `String` | Optional | The reference value (provided by your app) for the subscription istelf. | String getReference() | setReference(String reference) | | `OnHoldAt` | `ZonedDateTime` | Optional | The timestamp of the most recent on hold action. | ZonedDateTime getOnHoldAt() | setOnHoldAt(ZonedDateTime onHoldAt) | | `PrepaidDunning` | `Boolean` | Optional | Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled | Boolean getPrepaidDunning() | setPrepaidDunning(Boolean prepaidDunning) | | `Coupons` | [`List`](../../doc/models/subscription-included-coupon.md) | Optional | Additional coupon data. To use this data you also have to include the following param in the request`include[]=coupons`.
Only in Read Subscription Endpoint. | List getCoupons() | setCoupons(List coupons) | diff --git a/doc/models/tax-configuration-kind.md b/doc/models/tax-configuration-kind.md index 291cea72..ef95cf08 100644 --- a/doc/models/tax-configuration-kind.md +++ b/doc/models/tax-configuration-kind.md @@ -9,8 +9,8 @@ | Name | | --- | -| `Custom` | -| `EnumManagedAvalara` | -| `EnumLinkedAvalara` | -| `EnumDigitalRiver` | +| `CUSTOM` | +| `ENUM_MANAGED_AVALARA` | +| `ENUM_LINKED_AVALARA` | +| `ENUM_DIGITAL_RIVER` | diff --git a/doc/models/tax-destination-address.md b/doc/models/tax-destination-address.md index 891b350f..f2a5b2ac 100644 --- a/doc/models/tax-destination-address.md +++ b/doc/models/tax-destination-address.md @@ -9,8 +9,8 @@ | Name | | --- | -| `ShippingThenBilling` | -| `BillingThenShipping` | -| `ShippingOnly` | -| `BillingOnly` | +| `SHIPPING_THEN_BILLING` | +| `BILLING_THEN_SHIPPING` | +| `SHIPPING_ONLY` | +| `BILLING_ONLY` | diff --git a/doc/models/trial-type.md b/doc/models/trial-type.md index 4807ad00..1298d99b 100644 --- a/doc/models/trial-type.md +++ b/doc/models/trial-type.md @@ -11,6 +11,6 @@ Indicates how a trial is handled when the trail period ends and there is no cred | Name | | --- | -| `NoObligation` | -| `PaymentExpected` | +| `NO_OBLIGATION` | +| `PAYMENT_EXPECTED` | diff --git a/doc/models/update-component.md b/doc/models/update-component.md index e4bfcc63..a3db17aa 100644 --- a/doc/models/update-component.md +++ b/doc/models/update-component.md @@ -17,7 +17,7 @@ | `TaxCode` | `String` | Optional | A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | String getTaxCode() | setTaxCode(String taxCode) | | `ItemCategory` | [`ItemCategory`](../../doc/models/item-category.md) | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | ItemCategory getItemCategory() | setItemCategory(ItemCategory itemCategory) | | `DisplayOnHostedPage` | `Boolean` | Optional | - | Boolean getDisplayOnHostedPage() | setDisplayOnHostedPage(Boolean displayOnHostedPage) | -| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided.
Available values: `full`, `prorated`, `none`. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | +| `UpgradeCharge` | [`CreditType`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | CreditType getUpgradeCharge() | setUpgradeCharge(CreditType upgradeCharge) | ## Example (as JSON) diff --git a/doc/models/update-subscription-component.md b/doc/models/update-subscription-component.md index 176f8fb6..529ed0e1 100644 --- a/doc/models/update-subscription-component.md +++ b/doc/models/update-subscription-component.md @@ -22,6 +22,7 @@ "pricing_scheme": "stairstep", "interval": 66, "interval_unit": "day", + "list_price_point_id": 174, "prices": [ { "starting_quantity": 242, @@ -33,8 +34,7 @@ "ending_quantity": 40, "unit_price": 23.26 } - ], - "renew_prepaid_allocation": false + ] } } ``` diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index 0c8a0655..3fb4d61a 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -25,7 +25,7 @@ | `NetTerms` | [`UpdateSubscriptionNetTerms`](../../doc/models/containers/update-subscription-net-terms.md) | Optional | This is a container for one-of cases. | UpdateSubscriptionNetTerms getNetTerms() | setNetTerms(UpdateSubscriptionNetTerms netTerms) | | `StoredCredentialTransactionId` | `Integer` | Optional | - | Integer getStoredCredentialTransactionId() | setStoredCredentialTransactionId(Integer storedCredentialTransactionId) | | `Reference` | `String` | Optional | - | String getReference() | setReference(String reference) | -| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | +| `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | SubscriptionCustomPrice getCustomPrice() | setCustomPrice(SubscriptionCustomPrice customPrice) | | `Components` | [`List`](../../doc/models/update-subscription-component.md) | Optional | (Optional) An array of component ids and custom prices to be added to the subscription. | List getComponents() | setComponents(List components) | | `DunningCommunicationDelayEnabled` | `Boolean` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute. | Boolean getDunningCommunicationDelayEnabled() | setDunningCommunicationDelayEnabled(Boolean dunningCommunicationDelayEnabled) | | `DunningCommunicationDelayTimeZone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | String getDunningCommunicationDelayTimeZone() | setDunningCommunicationDelayTimeZone(String dunningCommunicationDelayTimeZone) | diff --git a/doc/models/upgrade-charge-credit-type.md b/doc/models/upgrade-charge-credit-type.md new file mode 100644 index 00000000..3bc95abc --- /dev/null +++ b/doc/models/upgrade-charge-credit-type.md @@ -0,0 +1,23 @@ + +# Upgrade Charge Credit Type + +The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. Values are: + +`full` - A charge is added for the full price of the component. + +`prorated` - A charge is added for the prorated price of the component change. + +`none` - No charge is added. + +## Enumeration + +`UpgradeChargeCreditType` + +## Fields + +| Name | +| --- | +| `FULL` | +| `PRORATED` | +| `NONE` | + diff --git a/doc/models/webhook-order.md b/doc/models/webhook-order.md index 18ecc708..528b979f 100644 --- a/doc/models/webhook-order.md +++ b/doc/models/webhook-order.md @@ -9,6 +9,6 @@ | Name | | --- | -| `NewestFirst` | -| `OldestFirst` | +| `NEWEST_FIRST` | +| `OLDEST_FIRST` | diff --git a/doc/models/webhook-status.md b/doc/models/webhook-status.md index 70a637ba..9202a9bf 100644 --- a/doc/models/webhook-status.md +++ b/doc/models/webhook-status.md @@ -9,8 +9,8 @@ | Name | | --- | -| `Successful` | -| `Failed` | -| `Pending` | -| `Paused` | +| `SUCCESSFUL` | +| `FAILED` | +| `PENDING` | +| `PAUSED` | diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index 3847d799..ced689e1 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -9,39 +9,39 @@ | Name | | --- | -| `BillingDateChange` | -| `ComponentAllocationChange` | -| `CustomerCreate` | -| `CustomerUpdate` | -| `DunningStepReached` | -| `ExpiringCard` | -| `ExpirationDateChange` | -| `InvoiceIssued` | -| `MeteredUsage` | -| `PaymentFailure` | -| `PaymentSuccess` | -| `DirectDebitPaymentPending` | -| `DirectDebitPaymentPaidOut` | -| `DirectDebitPaymentRejected` | -| `PrepaidSubscriptionBalanceChanged` | -| `PrepaidUsage` | -| `RefundFailure` | -| `RefundSuccess` | -| `RenewalFailure` | -| `RenewalSuccess` | -| `SignupFailure` | -| `SignupSuccess` | -| `StatementClosed` | -| `StatementSettled` | -| `SubscriptionCardUpdate` | -| `SubscriptionGroupCardUpdate` | -| `SubscriptionProductChange` | -| `SubscriptionStateChange` | -| `TrialEndNotice` | -| `UpcomingRenewalNotice` | -| `UpgradeDowngradeFailure` | -| `UpgradeDowngradeSuccess` | -| `PendingCancellationChange` | -| `SubscriptionPrepaymentAccountBalanceChanged` | -| `SubscriptionServiceCreditAccountBalanceChanged` | +| `BILLING_DATE_CHANGE` | +| `COMPONENT_ALLOCATION_CHANGE` | +| `CUSTOMER_CREATE` | +| `CUSTOMER_UPDATE` | +| `DUNNING_STEP_REACHED` | +| `EXPIRING_CARD` | +| `EXPIRATION_DATE_CHANGE` | +| `INVOICE_ISSUED` | +| `METERED_USAGE` | +| `PAYMENT_FAILURE` | +| `PAYMENT_SUCCESS` | +| `DIRECT_DEBIT_PAYMENT_PENDING` | +| `DIRECT_DEBIT_PAYMENT_PAID_OUT` | +| `DIRECT_DEBIT_PAYMENT_REJECTED` | +| `PREPAID_SUBSCRIPTION_BALANCE_CHANGED` | +| `PREPAID_USAGE` | +| `REFUND_FAILURE` | +| `REFUND_SUCCESS` | +| `RENEWAL_FAILURE` | +| `RENEWAL_SUCCESS` | +| `SIGNUP_FAILURE` | +| `SIGNUP_SUCCESS` | +| `STATEMENT_CLOSED` | +| `STATEMENT_SETTLED` | +| `SUBSCRIPTION_CARD_UPDATE` | +| `SUBSCRIPTION_GROUP_CARD_UPDATE` | +| `SUBSCRIPTION_PRODUCT_CHANGE` | +| `SUBSCRIPTION_STATE_CHANGE` | +| `TRIAL_END_NOTICE` | +| `UPCOMING_RENEWAL_NOTICE` | +| `UPGRADE_DOWNGRADE_FAILURE` | +| `UPGRADE_DOWNGRADE_SUCCESS` | +| `PENDING_CANCELLATION_CHANGE` | +| `SUBSCRIPTION_PREPAYMENT_ACCOUNT_BALANCE_CHANGED` | +| `SUBSCRIPTION_SERVICE_CREDIT_ACCOUNT_BALANCE_CHANGED` | diff --git a/pom.xml b/pom.xml index 5c50d2c9..6559ebf5 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 com.maxio advanced-billing-sdk - 8.0.0 + 9.0.0 jar Advanced Billing SDK Ultimate billing and pricing flexibility for B2B SaaS. @@ -91,7 +91,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.codehaus.mojo versions-maven-plugin - 2.5 + 2.20.1 file://${project.basedir}/version-rules.xml @@ -99,7 +99,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M2 + 3.6.1 enforce-versions @@ -129,7 +129,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.apache.maven.plugins maven-javadoc-plugin - 2.10.4 + 3.12.0 attach-javadocs @@ -178,7 +178,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.4.0 attach-sources @@ -191,7 +191,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.apache.maven.plugins maven-javadoc-plugin - 2.10.4 + 3.12.0 attach-javadocs @@ -205,7 +205,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.8 sign-artifacts diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java index 08233534..7629d125 100644 --- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java +++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java @@ -37,6 +37,7 @@ import com.maxio.advancedbilling.controllers.SubscriptionInvoiceAccountController; import com.maxio.advancedbilling.controllers.SubscriptionNotesController; import com.maxio.advancedbilling.controllers.SubscriptionProductsController; +import com.maxio.advancedbilling.controllers.SubscriptionRenewalsController; import com.maxio.advancedbilling.controllers.SubscriptionStatusController; import com.maxio.advancedbilling.controllers.SubscriptionsController; import com.maxio.advancedbilling.controllers.WebhooksController; @@ -94,12 +95,13 @@ public final class AdvancedBillingClient implements Configuration { private SubscriptionInvoiceAccountController subscriptionInvoiceAccount; private SubscriptionNotesController subscriptionNotes; private SubscriptionProductsController subscriptionProducts; + private SubscriptionRenewalsController subscriptionRenewals; private SubscriptionStatusController subscriptionStatus; private WebhooksController webhooks; private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - private static String userAgent = "AB SDK Java:8.0.0 on OS {os-info}"; + private static String userAgent = "AB SDK Java:9.0.0 on OS {os-info}"; /** * Current API environment. @@ -193,6 +195,7 @@ private AdvancedBillingClient(Environment environment, String site, HttpClient h subscriptionInvoiceAccount = new SubscriptionInvoiceAccountController(globalConfig); subscriptionNotes = new SubscriptionNotesController(globalConfig); subscriptionProducts = new SubscriptionProductsController(globalConfig); + subscriptionRenewals = new SubscriptionRenewalsController(globalConfig); subscriptionStatus = new SubscriptionStatusController(globalConfig); webhooks = new WebhooksController(globalConfig); } @@ -444,6 +447,14 @@ public SubscriptionProductsController getSubscriptionProductsController() { return subscriptionProducts; } + /** + * Get the instance of SubscriptionRenewalsController. + * @return subscriptionRenewals + */ + public SubscriptionRenewalsController getSubscriptionRenewalsController() { + return subscriptionRenewals; + } + /** * Get the instance of SubscriptionStatusController. * @return subscriptionStatus diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java index 03ec10ac..36f9fb91 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java @@ -45,7 +45,7 @@ public AdvanceInvoiceController(GlobalConfiguration globalConfig) { * invoice exists, a new one will be generated. We recommend using either the create or preview * endpoints for proforma invoices to preview this advance invoice before using this endpoint to * generate it. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the Invoice response from the API call * @throws ApiException Represents error response from the server. @@ -97,7 +97,7 @@ private ApiCall prepareIssueAdvanceInvoiceRequest( * Once an advance invoice has been generated for a subscription's upcoming renewal, it can be * viewed through this endpoint. There can only be one advance invoice per subscription per * billing cycle. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the 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. @@ -141,7 +141,7 @@ private ApiCall prepareReadAdvanceInvoiceRequest( * Voiding will cause any prepayments and credits that were applied to the invoice to be * returned to the subscription. For a full overview of the impact of voiding, [see our help * docs]($m/Invoice). - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the Invoice response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java index 0d6bee2e..bd58ed3b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java @@ -12,7 +12,9 @@ import com.maxio.advancedbilling.exceptions.ErrorArrayMapResponseException; import com.maxio.advancedbilling.exceptions.ErrorListResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; +import com.maxio.advancedbilling.models.CloneComponentPricePointRequest; import com.maxio.advancedbilling.models.ComponentCurrencyPricesResponse; +import com.maxio.advancedbilling.models.ComponentPricePointCurrencyOverageResponse; import com.maxio.advancedbilling.models.ComponentPricePointResponse; import com.maxio.advancedbilling.models.ComponentPricePointsResponse; import com.maxio.advancedbilling.models.ComponentResponse; @@ -27,6 +29,8 @@ import com.maxio.advancedbilling.models.UpdateCurrencyPricesRequest; import com.maxio.advancedbilling.models.containers.ArchiveComponentPricePointComponentId; import com.maxio.advancedbilling.models.containers.ArchiveComponentPricePointPricePointId; +import com.maxio.advancedbilling.models.containers.CloneComponentPricePointComponentId; +import com.maxio.advancedbilling.models.containers.CloneComponentPricePointPricePointId; import com.maxio.advancedbilling.models.containers.ReadComponentPricePointComponentId; import com.maxio.advancedbilling.models.containers.ReadComponentPricePointPricePointId; import com.maxio.advancedbilling.models.containers.UpdateComponentPricePointComponentId; @@ -245,6 +249,70 @@ private ApiCall prepareBulkCreateCom .build(); } + /** + * Clones a component price point. Custom price points (tied to a specific subscription) cannot + * be cloned. The following attributes are copied from the source price point: - Pricing scheme + * - All price tiers (with starting/ending quantities and unit prices) - Tax included setting - + * Currency prices (if definitive pricing is set) - Overage pricing (for prepaid usage + * components) - Interval settings (if multi-frequency is enabled) - Event-based billing + * segments (if applicable). + * @param componentId Required parameter: The id or handle of the component. When using the + * handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or + * `handle:example-product-handle` for a string handle. + * @param pricePointId Required parameter: The id or handle of the price point. When using the + * handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or + * `handle:example-price_point-handle` for a string handle. + * @param body Optional parameter: + * @return Returns the ComponentPricePointCurrencyOverageResponse 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 ComponentPricePointCurrencyOverageResponse cloneComponentPricePoint( + final CloneComponentPricePointComponentId componentId, + final CloneComponentPricePointPricePointId pricePointId, + final CloneComponentPricePointRequest body) throws ApiException, IOException { + return prepareCloneComponentPricePointRequest(componentId, pricePointId, body).execute(); + } + + /** + * Builds the ApiCall object for cloneComponentPricePoint. + */ + private ApiCall prepareCloneComponentPricePointRequest( + final CloneComponentPricePointComponentId componentId, + final CloneComponentPricePointPricePointId pricePointId, + final CloneComponentPricePointRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/components/{component_id}/price_points/{price_point_id}/clone.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("component_id").value(componentId) + .shouldEncode(true)) + .templateParam(param -> param.key("price_point_id").value(pricePointId) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.POST)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ComponentPricePointCurrencyOverageResponse.class)) + .nullify404(false) + .localErrorCase("404", + ErrorCase.setTemplate("Not Found:'{$response.body}'", + (reason, context) -> new ApiException(reason, context))) + .localErrorCase("422", + ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + /** * When updating a price point, prices can be updated as well by creating new prices or editing * / removing existing ones. Passing in a price bracket without an `id` will attempt to create a @@ -315,11 +383,11 @@ private ApiCall prepareUpdateComponen * handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or * `handle:example-price_point-handle` for a string handle. * @param currencyPrices Optional parameter: Include an array of currency price data - * @return Returns the ComponentPricePointResponse response from the API call + * @return Returns the ComponentPricePointCurrencyOverageResponse 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 ComponentPricePointResponse readComponentPricePoint( + public ComponentPricePointCurrencyOverageResponse readComponentPricePoint( final ReadComponentPricePointComponentId componentId, final ReadComponentPricePointPricePointId pricePointId, final Boolean currencyPrices) throws ApiException, IOException { @@ -330,11 +398,11 @@ public ComponentPricePointResponse readComponentPricePoint( /** * Builds the ApiCall object for readComponentPricePoint. */ - private ApiCall prepareReadComponentPricePointRequest( + private ApiCall prepareReadComponentPricePointRequest( final ReadComponentPricePointComponentId componentId, final ReadComponentPricePointPricePointId pricePointId, final Boolean currencyPrices) { - return new ApiCall.Builder() + return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder .server(Server.PRODUCTION.value()) @@ -352,7 +420,7 @@ private ApiCall prepareReadComponentP .httpMethod(HttpMethod.GET)) .responseHandler(responseHandler -> responseHandler .deserializer( - response -> ApiHelper.deserialize(response, ComponentPricePointResponse.class)) + response -> ApiHelper.deserialize(response, ComponentPricePointCurrencyOverageResponse.class)) .nullify404(false) .globalErrorCase(GLOBAL_ERROR_CASES)) .build(); diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java index a20bfb1e..3738cb74 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java @@ -484,7 +484,7 @@ private ApiCall prepareReadCreditNoteRequest( * oldest, and so on until the amount of the payment is fully consumed. Excess payment will * result in the creation of a prepayment on the Invoice Account. Only ungrouped or primary * subscriptions may be paid using the "bulk" payment request. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the RecordPaymentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -759,7 +759,7 @@ private ApiCall prepareListConsolidatedInvoic * custom memo can be sent with the `memo` parameter to override the site's default. Likewise, * custom payment instructions can be sent with the `payment_instrucions` parameter. #### Status * By default, invoices will be created with open status. Possible alternative is `draft`. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the InvoiceResponse response from the API call * @throws ApiException Represents error response from the server. @@ -808,13 +808,16 @@ private ApiCall prepareCreateInvoiceRequest( * This endpoint allows for invoices to be programmatically delivered via email. This endpoint * supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this * endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind - * carbon-copy (bcc) recipients. If no recipient email addresses are specified in the request, - * then the subscription's default email configuration will be used. For example, if - * `recipient_emails` is left blank, then the invoice will be delivered to the subscription's - * customer email address. On success, a 204 no-content response will be returned. The response - * does not indicate that email(s) have been delivered, but instead indicates that emails have - * been successfully queued for delivery. If _any_ invalid or malformed email address is found - * in the request body, the entire request will be rejected and a 422 response will be returned. + * carbon-copy (bcc) recipients. **File Attachments**: You can attach files to invoice emails + * using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When + * using attachments, the request must use `multipart/form-data` content type. Max 10 files, + * 10MB per file. If no recipient email addresses are specified in the request, then the + * subscription's default email configuration will be used. For example, if `recipient_emails` + * is left blank, then the invoice will be delivered to the subscription's customer email + * address. On success, a 204 no-content response will be returned. The response does not + * indicate that email(s) have been delivered, but instead indicates that emails have been + * successfully queued for delivery. If _any_ invalid or malformed email address is found in the + * request body, the entire request will be rejected and a 422 response will be returned. * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. * @param body Optional parameter: @@ -954,25 +957,26 @@ private ApiCall prepareUpdateCustomerInformationRequest( } /** - * This endpoint allows you to issue an invoice that is in "pending" status. For example, you - * can issue an invoice that was created when allocating new quantity on a component and using - * "accrue charges" option. You cannot issue a pending child invoice that was created for a - * member subscription in a group. For Remittance subscriptions, the invoice will go into "open" - * status and payment won't be attempted. The value for `on_failed_payment` would be rejected if - * sent. Any prepayments or service credits that exist on subscription will be automatically - * applied. Additionally, if setting is on, an email will be sent for issued invoice. For - * Automatic subscriptions, prepayments and service credits will apply to the invoice and before - * payment is attempted. On successful payment, the invoice will go into "paid" status and email - * will be sent to the customer (if setting applies). When payment fails, the next event depends - * on the `on_failed_payment` value: - `leave_open_invoice` - prepayments and credits applied to - * invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if - * setting applies); payment failure recorded in the invoice history. This is the default - * option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in - * "pending" status; no email sent to the customer; payment failure recorded in the invoice - * history. - `initiate_dunning` - prepayments and credits applied to the invoice; invoice - * status set to "open"; email sent to the customer for the issued invoice (if setting applies); - * payment failure recorded in the invoice history; subscription will most likely go into - * "past_due" or "canceled" state (depending upon net terms and dunning settings). + * This endpoint allows you to issue an invoice that is in "pending" or "draft" status. For + * example, you can issue an invoice that was created when allocating new quantity on a + * component and using "accrue charges" option. You cannot issue a pending child invoice that + * was created for a member subscription in a group. For Remittance subscriptions, the invoice + * will go into "open" status and payment won't be attempted. The value for `on_failed_payment` + * would be rejected if sent. Any prepayments or service credits that exist on subscription will + * be automatically applied. Additionally, if setting is on, an email will be sent for issued + * invoice. For Automatic subscriptions, prepayments and service credits will apply to the + * invoice and before payment is attempted. On successful payment, the invoice will go into + * "paid" status and email will be sent to the customer (if setting applies). When payment + * fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - + * prepayments and credits applied to invoice; invoice status set to "open"; email sent to the + * customer for the issued invoice (if setting applies); payment failure recorded in the invoice + * history. This is the default option. - `rollback_to_pending` - prepayments and credits not + * applied; invoice remains in "pending" status; no email sent to the customer; payment failure + * recorded in the invoice history. - `initiate_dunning` - prepayments and credits applied to + * the invoice; invoice status set to "open"; email sent to the customer for the issued invoice + * (if setting applies); payment failure recorded in the invoice history; subscription will most + * likely go into "past_due" or "canceled" state (depending upon net terms and dunning + * settings). * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java index f92437d2..201973fb 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java @@ -374,14 +374,14 @@ private ApiCall prepareDeleteUnusedPaymentProfileRequest( } /** - * This will delete a payment profile belonging to the customer on the subscription. + If the - * customer has multiple subscriptions, the payment profile will be removed from all of them. + - * If you delete the default payment profile for a subscription, you will need to specify - * another payment profile to be the default through the api, or either prompt the user to enter - * a card in the billing portal or on the self-service page, or visit the Payment Details tab on - * the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment + * Deletes a payment profile belonging to the customer on the subscription. + If the customer + * has multiple subscriptions, the payment profile will be removed from all of them. + If you + * delete the default payment profile for a subscription, you will need to specify another + * payment profile to be the default through the api, or either prompt the user to enter a card + * in the billing portal or on the self-service page, or visit the Payment Details tab on the + * subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment * Method” link, (depending on whether there are other cards present). - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param paymentProfileId Required parameter: The Chargify id of the payment profile * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -469,9 +469,9 @@ private ApiCall prepareVerifyBankAccountReque } /** - * This will delete a Payment Profile belonging to a Subscription Group. **Note**: If the - * Payment Profile belongs to multiple Subscription Groups and/or Subscriptions, it will be - * removed from all of them. + * Deletes a Payment Profile belonging to a Subscription Group. **Note**: If the Payment Profile + * belongs to multiple Subscription Groups and/or Subscriptions, it will be removed from all of + * them. * @param uid Required parameter: The uid of the subscription group * @param paymentProfileId Required parameter: The Chargify id of the payment profile * @throws ApiException Represents error response from the server. @@ -512,7 +512,7 @@ private ApiCall prepareDeleteSubscriptionGroupPaymentProfile * This will change the default payment profile on the subscription to the existing payment * profile with the id specified. You must elect to change the existing payment profile to a new * payment profile ID in order to receive a satisfactory response from this endpoint. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param paymentProfileId Required parameter: The Chargify id of the payment profile * @return Returns the PaymentProfileResponse response from the API call * @throws ApiException Represents error response from the server. @@ -665,7 +665,7 @@ private ApiCall prepareReadOneTimeTokenReq * the request. These error responses are designed to prevent excessive or invalid requests, and * to provide clear and helpful information to users who encounter errors during the request * process. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @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/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java index 0af70e4e..dcbeeb5d 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java @@ -15,6 +15,7 @@ import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.CreateSignupProformaPreviewInclude; import com.maxio.advancedbilling.models.CreateSubscriptionRequest; +import com.maxio.advancedbilling.models.DeliverProformaInvoiceRequest; import com.maxio.advancedbilling.models.ListProformaInvoicesInput; import com.maxio.advancedbilling.models.ListProformaInvoicesResponse; import com.maxio.advancedbilling.models.ListSubscriptionGroupProformaInvoicesInput; @@ -186,7 +187,7 @@ private ApiCall prepareReadProformaInvoiceRequest * renewal preview endpoint. ## Restrictions Proforma invoices are only available on * Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a * group, must not be prepaid, and must be in a live state. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the 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. @@ -288,6 +289,61 @@ private ApiCall prepareListProformaI .build(); } + /** + * Allows for proforma invoices to be programmatically delivered via email. Supports email + * delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) + * recipients. If `recipient_emails` is omitted, the system will fall back to the primary + * recipient derived from the invoice or subscription. At least one recipient must be present, + * either via the request body or via this default behavior, so an empty body may still succeed + * when defaults are available. + * @param proformaInvoiceUid Required parameter: The uid of the proforma invoice + * @param body Optional parameter: + * @return Returns the 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 ProformaInvoice deliverProformaInvoice( + final String proformaInvoiceUid, + final DeliverProformaInvoiceRequest body) throws ApiException, IOException { + return prepareDeliverProformaInvoiceRequest(proformaInvoiceUid, body).execute(); + } + + /** + * Builds the ApiCall object for deliverProformaInvoice. + */ + private ApiCall prepareDeliverProformaInvoiceRequest( + final String proformaInvoiceUid, + final DeliverProformaInvoiceRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/proforma_invoices/{proforma_invoice_uid}/deliveries.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("proforma_invoice_uid").value(proformaInvoiceUid) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.POST)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ProformaInvoice.class)) + .nullify404(false) + .localErrorCase("404", + ErrorCase.setTemplate("Not Found:'{$response.body}'", + (reason, context) -> new ApiException(reason, context))) + .localErrorCase("422", + ErrorCase.setTemplate("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + /** * This endpoint will void a proforma invoice that has the status "draft". ## Restrictions * Proforma invoices are only available on Relationship Invoicing sites. Only proforma invoices @@ -356,7 +412,7 @@ private ApiCall prepareVoidProformaInvoiceRequest * accessible after the call is made. Alternatively, if you have some proforma invoices already, * you may make a preview call to determine whether any billing information for the * subscription's upcoming renewal has changed. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the 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. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 843ceef3..5c24c3b3 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -58,7 +58,7 @@ public SubscriptionComponentsController(GlobalConfiguration globalConfig) { /** * This request will list information regarding a specific component owned by a subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component. * Alternatively, the component's handle prefixed by `handle:` * @return Returns the SubscriptionComponentResponse response from the API call @@ -170,7 +170,7 @@ private ApiCall, ApiException> prepareListSu * Updates the price points on one or more of a subscription's components. The `price_point` key * can take either a: 1. Price point id (integer) 2. Price point handle (string) 3. `"_default"` * string, which will reset the price point to the component's current default price point. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the BulkComponentsPricePointAssignment response from the API call * @throws ApiException Represents error response from the server. @@ -220,7 +220,7 @@ private ApiCall prepareBulkUpd * Resets all of a subscription's components to use the current default. **Note**: this will * update the price point for all of the subscription's components, even ones that have not been * allocated yet. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @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. @@ -256,49 +256,28 @@ private ApiCall prepareBulkResetSubscription } /** - * This endpoint creates a new allocation, setting the current allocated quantity for the - * Component and recording a memo. **Notice**: Allocations can only be updated for Quantity, - * On/Off, and Prepaid Components. ## Allocations Documentation Full documentation on how to - * record Allocations in the Advanced Billing UI can be located - * [here](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview). - * It is focused on how allocations operate within the Advanced Billing UI.It goes into greater - * detail on how the user interface will react when recording allocations. This documentation - * also goes into greater detail on how proration is taken into consideration when applying - * component allocations. ## Proration Schemes Changing the allocated quantity of a component - * mid-period can result in either a Charge or Credit being applied to the subscription. When + * Creates an allocation, sets the current allocated quantity for the component, and records a + * memo. Allocations can only be updated for Quantity, On/Off, and Prepaid Components. When * creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, - * and `accrue_charge` to be applied. **Notice:** These proration and accural fields will be - * ignored for Prepaid Components since this component type always generate charges immediately - * without proration. For background information on prorated components and upgrade/downgrade - * schemes, see [Setting Component - * Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration). - * See the tables below for valid values. | upgrade_charge | Definition - *                                | - * |----------------|-------------------------------------------------------------------| | - * `full`         | A charge is added for the full price of the component.            | | - * `prorated`     | A charge is added for the prorated price of the component change. | | `none` - *         | No charge is added.                                               | | - * downgrade_credit | Definition                                        | - * |------------------|---------------------------------------------------| | `full` - * | A full price credit is added for the amount owed. | | `prorated`       | A prorated credit - * is added for the amount owed.   | | `none`           | No charge is added. - *             | | accrue_charge | Definition - *                                             | - * |---------------|------------------------------------------------------------------------------------------------------------| - * | `true`        | Attempt to charge the customer at next renewal. | | `false`       | Attempt - * to charge the customer right away. If it fails, the charge will be accrued until the next - * renewal. | ### Order of Resolution for upgrade_charge and downgrade_credit 1. Per allocation - * in API call (within a single allocation of the `allocations` array) 2. [Component-level - * default + * and `accrue_charge` to be applied. > **Note:** These proration and accural fields are ignored + * for Prepaid Components since this component type always generate charges immediately without + * proration. For information on prorated components and upgrade/downgrade schemes, see [Setting + * Component + * Allocations.](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration) + * ### Order of Resolution for upgrade_charge and downgrade_credit 1. Per allocation in API call + * (within a single allocation of the `allocations` array) 2. [Component-level default * value](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) * 3. Allocation API call top level (outside of the `allocations` array) 4. [Site-level default * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) * ### Order of Resolution for accrue charge 1. Allocation API call top level (outside of the * `allocations` array) 2. [Site-level default * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) - * **NOTE: Proration uses the current price of the component as well as the current tax rates. - * Changes to either may cause the prorated charge/credit to be wrong.**. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * > **Note:** Proration uses the current price of the component as well as the current tax + * rates. Changes to either may cause the prorated charge/credit to be wrong. For more + * informaiton see the [Component + * Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) + * product Documentation. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component * @param body Optional parameter: * @return Returns the AllocationResponse response from the API call @@ -351,13 +330,8 @@ private ApiCall prepareAllocateComponentReques /** * This endpoint returns the 50 most recent Allocations, ordered by most recent first. ## On/Off * Components When a subscription's on/off component has been toggled to on (`1`) or off (`0`), - * usage will be logged in this response. ## Querying data via Advanced Billing gem You can also - * query the current quantity via the [official Advanced Billing - * Gem.](http://github.com/chargify/chargify_api_ares) ```# First way component = - * Chargify::Subscription::Component.find(1, :params => {:subscription_id => 7}) puts - * component.allocated_quantity # => 23 # Second way component = - * Chargify::Subscription.find(7).component(1) puts component.allocated_quantity # => 23 ```. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * usage will be logged in this response. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of 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 @@ -415,13 +389,24 @@ private ApiCall, ApiException> prepareListAllocationsRe } /** - * Creates multiple allocations, setting the current allocated quantity for each of the - * components and recording a memo. The charges and/or credits that are created will be rolled - * up into a single total which is used to determine whether this is an upgrade or a downgrade. - * Be aware of the Order of Resolutions explained below in determining the proration scheme. A - * `component_id` is required for each allocation. This endpoint only responds to JSON. It is - * not available for XML. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * Creates multiple allocations, sets the current allocated quantity for each of the components, + * and recording a memo. A `component_id` is required for each allocation. The charges and/or + * credits that are created will be rolled up into a single total which is used to determine + * whether this is an upgrade or a downgrade. ### Order of Resolution for upgrade_charge and + * downgrade_credit 1. Per allocation in API call (within a single allocation of the + * `allocations` array) 2. [Component-level default + * value](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) + * 3. Allocation API call top level (outside of the `allocations` array) 4. [Site-level default + * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) + * ### Order of Resolution for accrue charge 1. Allocation API call top level (outside of the + * `allocations` array) 2. [Site-level default + * value](https://maxio.zendesk.com/hc/en-us/articles/24251906165133-Component-Allocations-Proration#proration-schemes) + * > **Note:** Proration uses the current price of the component as well as the current tax + * rates. Changes to either may cause the prorated charge/credit to be wrong. For more + * informaiton see the [Component + * Allocations](https://maxio.zendesk.com/hc/en-us/articles/24251883961485-Component-Allocations-Overview) + * product Documentation. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the List of AllocationResponse response from the API call * @throws ApiException Represents error response from the server. @@ -480,7 +465,7 @@ private ApiCall, ApiException> prepareAllocateComponent * Component Control". As a result, the response will not include `direction` and `proration` * within the `allocation_preview`, but at the `line_items` and `allocations` level * respectfully. See example below for Fine-Grained Component Control response. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the AllocationPreviewResponse response from the API call * @throws ApiException Represents error response from the server. @@ -536,7 +521,7 @@ private ApiCall preparePreviewAllocatio * An expiration date can be changed towards the future with no limitations. - An expiration * date can be changed towards the past (essentially expiring it) up to the subscription's * current period beginning date. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component * @param allocationId Required parameter: The Advanced Billing id of the allocation * @param body Optional parameter: @@ -603,7 +588,7 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio * behavior if the `credit_scheme` param is not passed. 3. `refund`: The allocation will be * destroyed and the balances will be updated and a refund will be issued along with a Credit * Note. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param componentId Required parameter: The Advanced Billing id of the component * @param allocationId Required parameter: The Advanced Billing id of the allocation * @param body Optional parameter: diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index 6607e3b5..030140ae 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -283,7 +283,7 @@ private ApiCall prepareUpdateSubscripti } /** - * Use this endpoint to delete subscription group. Only groups without members can be deleted. + * Deletes a subscription group. Only groups without members can be deleted. * @param uid Required parameter: The uid of the subscription group * @return Returns the DeleteSubscriptionGroupResponse response from the API call * @throws ApiException Represents error response from the server. @@ -386,7 +386,7 @@ private ApiCall prepareFindSubscrip * customer's hierarchy. To create a new subscription into a subscription group, reference the * following: [Create Subscription in a Subscription * Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group). - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionGroupResponse response from the API call * @throws ApiException Represents error response from the server. @@ -434,7 +434,7 @@ private ApiCall prepareAddSubscriptionT * and [Customer * Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) * features, it is possible to remove existing subscription from subscription group. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @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/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index 3d04011b..a3564fa1 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -46,7 +46,7 @@ public SubscriptionInvoiceAccountController(GlobalConfiguration globalConfig) { /** * Returns the `balance_in_cents` of the Subscription's Pending Discount, Service Credit, and * Prepayment accounts, as well as the sum of the Subscription's open, payable invoices. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the AccountBalances 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. @@ -87,7 +87,7 @@ private ApiCall prepareReadAccountBalancesRequest * the prepayment amount will be collected using the default credit card payment profile and * applied to the prepayment account balance. This is especially useful for manual replenishment * of prepaid subscriptions. Note that passing `amount_in_cents` is now allowed. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the CreatePrepaymentResponse response from the API call * @throws ApiException Represents error response from the server. @@ -181,7 +181,7 @@ private ApiCall prepareListPrepaymentsRequest /** * Credit will be added to the subscription in the amount specified in the request body. The * credit is subsequently applied to the next generated invoice. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the ServiceCredit response from the API call * @throws ApiException Represents error response from the server. @@ -229,7 +229,7 @@ private ApiCall prepareIssueServiceCreditRequest( /** * Credit will be removed from the subscription in the amount specified in the request body. The * credit amount being deducted must be equal to or less than the current credit balance. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -272,7 +272,7 @@ private ApiCall prepareDeductServiceCreditRequest( /** * This request will list a subscription's service credits. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @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. @@ -341,7 +341,7 @@ private ApiCall prepareListServiceCred * subscription. The `prepayment_id` will be the account transaction ID of the original payment. * The prepayment must have some amount remaining in order to be refunded. The amount may be * passed either as a decimal, with `amount`, or an integer in cents, with `amount_in_cents`. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param prepaymentId Required parameter: id of prepayment * @param body Optional parameter: * @return Returns the PrepaymentResponse response from the API call diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java index 9d555a0e..03243e65 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java @@ -40,7 +40,7 @@ public SubscriptionNotesController(GlobalConfiguration globalConfig) { * format. If you have structured data such as birth date, color, etc., consider using Metadata * instead. Full documentation on how to use Notes in the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24251712214413-Subscription-Summary-Overview). - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. @@ -134,7 +134,7 @@ private ApiCall, ApiException> prepareListSubscri /** * Once you have obtained the ID of the note you wish to read, use this method to show a * particular note attached to a subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param noteId Required parameter: The Advanced Billing id of the note * @return Returns the SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. @@ -176,7 +176,7 @@ private ApiCall prepareReadSubscriptionN /** * Use the following method to update a note for a Subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param noteId Required parameter: The Advanced Billing id of the note * @param body Optional parameter: * @return Returns the SubscriptionNoteResponse response from the API call @@ -227,8 +227,8 @@ private ApiCall prepareUpdateSubscriptio } /** - * Use the following method to delete a note for a Subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * Deletes a note for a Subscription. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param noteId Required parameter: The Advanced Billing id of the note * @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/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java index 4d7c1c2c..cb25ad39 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java @@ -89,7 +89,7 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) { * to the `redirect_url`; at this point the result of authentication is known 8. Optionally, you * can use the applied "msg" param in the `redirect_url` to determine whether it was successful * or not. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -140,7 +140,7 @@ private ApiCall prepareMigrateSubscriptionPr * `proration_date` along with the request (eg: `"proration_date": "2020-12-18T18:25:43.511Z"`). * This will calculate the prorated adjustment, charge, payment and credit applied values * assuming the migration is done at that date in the future as opposed to right now. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionMigrationPreviewResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionRenewalsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionRenewalsController.java new file mode 100644 index 00000000..7874e169 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionRenewalsController.java @@ -0,0 +1,575 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.controllers; + +import com.maxio.advancedbilling.ApiHelper; +import com.maxio.advancedbilling.Server; +import com.maxio.advancedbilling.exceptions.ApiException; +import com.maxio.advancedbilling.exceptions.ErrorListResponseException; +import com.maxio.advancedbilling.http.request.HttpMethod; +import com.maxio.advancedbilling.models.ScheduledRenewalConfigurationItemRequest; +import com.maxio.advancedbilling.models.ScheduledRenewalConfigurationItemResponse; +import com.maxio.advancedbilling.models.ScheduledRenewalConfigurationRequest; +import com.maxio.advancedbilling.models.ScheduledRenewalConfigurationResponse; +import com.maxio.advancedbilling.models.ScheduledRenewalConfigurationsResponse; +import com.maxio.advancedbilling.models.ScheduledRenewalLockInRequest; +import com.maxio.advancedbilling.models.ScheduledRenewalUpdateRequest; +import com.maxio.advancedbilling.models.Status; +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; + +/** + * This class lists all the endpoints of the groups. + */ +public final class SubscriptionRenewalsController extends BaseController { + + /** + * Initializes the controller. + * @param globalConfig Configurations added in client. + */ + public SubscriptionRenewalsController(GlobalConfiguration globalConfig) { + super(globalConfig); + } + + /** + * Creates a scheduled renewal configuration for a subscription. The scheduled renewal is based + * on the subscription’s current product and component setup. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param body Optional parameter: + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse createScheduledRenewalConfiguration( + final int subscriptionId, + final ScheduledRenewalConfigurationRequest body) throws ApiException, IOException { + return prepareCreateScheduledRenewalConfigurationRequest(subscriptionId, body).execute(); + } + + /** + * Builds the ApiCall object for createScheduledRenewalConfiguration. + */ + private ApiCall prepareCreateScheduledRenewalConfigurationRequest( + final int subscriptionId, + final ScheduledRenewalConfigurationRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.POST)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Lists scheduled renewal configurations for the subscription and permits an optional status + * query filter. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param status Optional parameter: (Optional) Status filter for scheduled renewal + * configurations. + * @return Returns the ScheduledRenewalConfigurationsResponse 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 ScheduledRenewalConfigurationsResponse listScheduledRenewalConfigurations( + final int subscriptionId, + final Status status) throws ApiException, IOException { + return prepareListScheduledRenewalConfigurationsRequest(subscriptionId, status).execute(); + } + + /** + * Builds the ApiCall object for listScheduledRenewalConfigurations. + */ + private ApiCall prepareListScheduledRenewalConfigurationsRequest( + final int subscriptionId, + final Status status) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals.json") + .queryParam(param -> param.key("status") + .value((status != null) ? status.value() : null).isRequired(false)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.GET)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationsResponse.class)) + .nullify404(false) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Retrieves the configuration settings for the scheduled renewal. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse readScheduledRenewalConfiguration( + final int subscriptionId, + final int id) throws ApiException, IOException { + return prepareReadScheduledRenewalConfigurationRequest(subscriptionId, id).execute(); + } + + /** + * Builds the ApiCall object for readScheduledRenewalConfiguration. + */ + private ApiCall prepareReadScheduledRenewalConfigurationRequest( + final int subscriptionId, + final int id) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}.json") + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.GET)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Updates an existing configuration. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @param body Optional parameter: + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse updateScheduledRenewalConfiguration( + final int subscriptionId, + final int id, + final ScheduledRenewalConfigurationRequest body) throws ApiException, IOException { + return prepareUpdateScheduledRenewalConfigurationRequest(subscriptionId, id, + body).execute(); + } + + /** + * Builds the ApiCall object for updateScheduledRenewalConfiguration. + */ + private ApiCall prepareUpdateScheduledRenewalConfigurationRequest( + final int subscriptionId, + final int id, + final ScheduledRenewalConfigurationRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Schedules a future lock-in date for the renewal. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @param body Optional parameter: + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse scheduleScheduledRenewalLockIn( + final int subscriptionId, + final int id, + final ScheduledRenewalLockInRequest body) throws ApiException, IOException { + return prepareScheduleScheduledRenewalLockInRequest(subscriptionId, id, body).execute(); + } + + /** + * Builds the ApiCall object for scheduleScheduledRenewalLockIn. + */ + private ApiCall prepareScheduleScheduledRenewalLockInRequest( + final int subscriptionId, + final int id, + final ScheduledRenewalLockInRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}/schedule_lock_in.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Locks in the renewal immediately. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse lockInScheduledRenewalImmediately( + final int subscriptionId, + final int id) throws ApiException, IOException { + return prepareLockInScheduledRenewalImmediatelyRequest(subscriptionId, id).execute(); + } + + /** + * Builds the ApiCall object for lockInScheduledRenewalImmediately. + */ + private ApiCall prepareLockInScheduledRenewalImmediatelyRequest( + final int subscriptionId, + final int id) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}/immediate_lock_in.json") + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Returns a scheduled renewal configuration to an editable state. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse unpublishScheduledRenewalConfiguration( + final int subscriptionId, + final int id) throws ApiException, IOException { + return prepareUnpublishScheduledRenewalConfigurationRequest(subscriptionId, id).execute(); + } + + /** + * Builds the ApiCall object for unpublishScheduledRenewalConfiguration. + */ + private ApiCall prepareUnpublishScheduledRenewalConfigurationRequest( + final int subscriptionId, + final int id) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}/unpublish.json") + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Cancels a scheduled renewal configuration. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param id Required parameter: The renewal id. + * @return Returns the ScheduledRenewalConfigurationResponse 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 ScheduledRenewalConfigurationResponse cancelScheduledRenewalConfiguration( + final int subscriptionId, + final int id) throws ApiException, IOException { + return prepareCancelScheduledRenewalConfigurationRequest(subscriptionId, id).execute(); + } + + /** + * Builds the ApiCall object for cancelScheduledRenewalConfiguration. + */ + private ApiCall prepareCancelScheduledRenewalConfigurationRequest( + final int subscriptionId, + final int id) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{id}/cancel.json") + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Adds product and component line items to the scheduled renewal. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param scheduledRenewalsConfigurationId Required parameter: The scheduled renewal + * configuration id. + * @param body Optional parameter: + * @return Returns the ScheduledRenewalConfigurationItemResponse 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 ScheduledRenewalConfigurationItemResponse createScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final ScheduledRenewalConfigurationItemRequest body) throws ApiException, IOException { + return prepareCreateScheduledRenewalConfigurationItemRequest(subscriptionId, + scheduledRenewalsConfigurationId, body).execute(); + } + + /** + * Builds the ApiCall object for createScheduledRenewalConfigurationItem. + */ + private ApiCall prepareCreateScheduledRenewalConfigurationItemRequest( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final ScheduledRenewalConfigurationItemRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("scheduled_renewals_configuration_id").value(scheduledRenewalsConfigurationId).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.POST)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationItemResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Updates an existing configuration item’s pricing and quantity. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param scheduledRenewalsConfigurationId Required parameter: The scheduled renewal + * configuration id. + * @param id Required parameter: The scheduled renewal configuration item id. + * @param body Optional parameter: + * @return Returns the ScheduledRenewalConfigurationItemResponse 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 ScheduledRenewalConfigurationItemResponse updateScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id, + final ScheduledRenewalUpdateRequest body) throws ApiException, IOException { + return prepareUpdateScheduledRenewalConfigurationItemRequest(subscriptionId, + scheduledRenewalsConfigurationId, id, body).execute(); + } + + /** + * Builds the ApiCall object for updateScheduledRenewalConfigurationItem. + */ + private ApiCall prepareUpdateScheduledRenewalConfigurationItemRequest( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id, + final ScheduledRenewalUpdateRequest body) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items/{id}.json") + .bodyParam(param -> param.value(body).isRequired(false)) + .bodySerializer(() -> ApiHelper.serialize(body)) + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("scheduled_renewals_configuration_id").value(scheduledRenewalsConfigurationId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .headerParam(param -> param.key("Content-Type") + .value("application/json").isRequired(false)) + .headerParam(param -> param.key("accept").value("application/json")) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.PUT)) + .responseHandler(responseHandler -> responseHandler + .deserializer( + response -> ApiHelper.deserialize(response, ScheduledRenewalConfigurationItemResponse.class)) + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } + + /** + * Removes an item from the pending renewal configuration. + * @param subscriptionId Required parameter: The Chargify id of the subscription. + * @param scheduledRenewalsConfigurationId Required parameter: The scheduled renewal + * configuration id. + * @param id Required parameter: The scheduled renewal configuration item id. + * @throws ApiException Represents error response from the server. + * @throws IOException Signals that an I/O exception of some sort has occurred. + */ + public void deleteScheduledRenewalConfigurationItem( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id) throws ApiException, IOException { + prepareDeleteScheduledRenewalConfigurationItemRequest(subscriptionId, + scheduledRenewalsConfigurationId, id).execute(); + } + + /** + * Builds the ApiCall object for deleteScheduledRenewalConfigurationItem. + */ + private ApiCall prepareDeleteScheduledRenewalConfigurationItemRequest( + final int subscriptionId, + final int scheduledRenewalsConfigurationId, + final int id) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/scheduled_renewals/{scheduled_renewals_configuration_id}/configuration_items/{id}.json") + .templateParam(param -> param.key("subscription_id").value(subscriptionId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("scheduled_renewals_configuration_id").value(scheduledRenewalsConfigurationId).isRequired(false) + .shouldEncode(true)) + .templateParam(param -> param.key("id").value(id).isRequired(false) + .shouldEncode(true)) + .withAuth(auth -> auth + .add("BasicAuth")) + .arraySerializationFormat(ArraySerializationFormat.CSV) + .httpMethod(HttpMethod.DELETE)) + .responseHandler(responseHandler -> responseHandler + .nullify404(false) + .localErrorCase("422", + ErrorCase.setReason("Unprocessable Entity (WebDAV)", + (reason, context) -> new ErrorListResponseException(reason, context))) + .globalErrorCase(GLOBAL_ERROR_CASES)) + .build(); + } +} \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java index b3bf360e..79f86268 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java @@ -43,7 +43,7 @@ public SubscriptionStatusController(GlobalConfiguration globalConfig) { * Subscription without waiting for the next scheduled attempt. ## Successful Reactivation The * response will be `200 OK` with the updated Subscription. ## Failed Reactivation The response * will be `422 "Unprocessable Entity`. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @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. @@ -82,9 +82,11 @@ private ApiCall prepareRetrySubscriptionRequ } /** - * The DELETE action causes the cancellation of the Subscription. This means, the method sets - * the Subscription state to "canceled". - * @param subscriptionId Required parameter: The Chargify id of the subscription + * Cancels the Subscription. The Delete method sets the Subscription state to `canceled`. To + * cancel the subscription immediately, omit any schedule parameters from the request. To use + * the schedule options, the Schedule Subscription Cancellation feature must be enabled on your + * site. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -136,9 +138,9 @@ private ApiCall prepareCancelSubscriptionReq * Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the * subscription will return to active and will renew on that date. Otherwise, it will behave * like a reactivation, setting the billing date to 'now' and charging the subscriber. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param calendarBillingResumptionCharge Optional parameter: (For calendar billing - * subscriptions only) The way that the resumed subscription's charge should be handled + * subscriptions only) The way that the resumed subscription's charge should be handled. * @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. @@ -184,7 +186,7 @@ private ApiCall prepareResumeSubscriptionReq /** * This will place the subscription in the on_hold state and it will not renew. ## Limitations * You may not place a subscription on hold if the `next_billing_at` date is within 24 hours. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -235,7 +237,7 @@ private ApiCall preparePauseSubscriptionRequ * use this method to change or update the `automatically_resume_at` date. ### Remove the resume * date Alternately, you can change the `automatically_resume_at` to `null` if you would like * the subscription to not have a resume date. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -281,9 +283,8 @@ private ApiCall prepareUpdateAutomaticSubscr } /** - * Advanced Billing offers the ability to reactivate a previously canceled subscription. For - * details on how the reactivation works, and how to reactivate subscriptions through the - * application, see + * Reactivate a previously canceled subscription. For details on how the reactivation works, and + * how to reactivate subscriptions through the application, see * [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming). * **Note: The term "resume" is used also during another process in Advanced Billing. This * occurs when an on-hold subscription is "resumed". This returns the subscription to an active @@ -302,17 +303,20 @@ private ApiCall prepareUpdateAutomaticSubscr * 1st, then Advanced Billing would resume the subscription. If a reactivation with `resume: * true` were attempted _after_ what would have been the next billing date of July 1st, then * Advanced Billing would not resume the subscription, and instead it would be reactivated with - * a new billing period. | Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June - * 28 | Yes | | Jun 15 | July 2 | No | ## Reactivation Scenarios ### Reactivating Canceled - * Subscription While Preserving Balance + Given you have a product that costs $20 + Given you - * have a canceled subscription to the $20 product + 1 charge should exist for $20 + 1 payment - * should exist for $20 + When the subscription has canceled due to dunning, it retained a - * negative balance of $20 #### Results The resulting charges upon reactivation will be: + 1 - * charge for $20 for the new product + 1 charge for $20 for the balance due + Total charges = - * $40 + The subscription will transition to active + The subscription balance will be zero ### - * Reactivating a Canceled Subscription With Coupon + Given you have a canceled subscription + - * It has no current period defined + You have a coupon code "EARLYBIRD" + The coupon is set to - * recur for 6 periods PUT request sent to: + * a new billing period. If a reactivation with `resume: false`, or where 'resume" is omited + * were attempted, then Advanced Billing would reactivate the subscription with a new billing + * period regardless of whether or not resuming the previous billing period were possible. | + * Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June 28 | Yes | | Jun 15 | + * July 2 | No | ## Reactivation Scenarios ### Reactivating Canceled Subscription While + * Preserving Balance + Given you have a product that costs $20 + Given you have a canceled + * subscription to the $20 product + 1 charge should exist for $20 + 1 payment should exist for + * $20 + When the subscription has canceled due to dunning, it retained a negative balance of + * $20 #### Results The resulting charges upon reactivation will be: + 1 charge for $20 for the + * new product + 1 charge for $20 for the balance due + Total charges = $40 + The subscription + * will transition to active + The subscription balance will be zero ### Reactivating a Canceled + * Subscription With Coupon + Given you have a canceled subscription + It has no current period + * defined + You have a coupon code "EARLYBIRD" + The coupon is set to recur for 6 periods PUT + * request sent to: * `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?coupon_code=EARLYBIRD` * #### Results + The subscription will transition to active + The subscription should have * applied a coupon with code "EARLYBIRD" ### Reactivating Canceled Subscription With a Trial, @@ -351,7 +355,7 @@ private ApiCall prepareUpdateAutomaticSubscr * `https://acme.chargify.com/subscriptions/{subscription_id}/reactivate.json?resume=true` #### * Results + The subscription will transition to active + The next billing date should not have * changed + Any product-related charges should have been collected. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -397,12 +401,10 @@ private ApiCall prepareReactivateSubscriptio } /** - * Advanced Billing offers the ability to cancel a subscription at the end of the current - * billing period. This period is set by its current product. Requesting to cancel the - * subscription at the end of the period sets the `cancel_at_end_of_period` flag to true. Note - * that you cannot set `cancel_at_end_of_period` at subscription creation, or if the + * Cancels a subscription at the end of the current billing period based on the subscription's + * current product. You cannot set `cancel_at_end_of_period` at subscription creation, or if the * subscription is past due. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the DelayedCancellationResponse response from the API call * @throws ApiException Represents error response from the server. @@ -455,7 +457,7 @@ private ApiCall prepareInitiateDelaye * at the end of the period that it is in. The request will reset the `cancel_at_end_of_period` * flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in * the future, removing the delayed cancellation has no effect and the call will be successful. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @return Returns the DelayedCancellationResponse 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. @@ -496,7 +498,7 @@ private ApiCall prepareCancelDelayedC /** * If a subscription is currently in dunning, the subscription will be set to active and the * active Dunner will be resolved. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @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. @@ -554,9 +556,9 @@ private ApiCall prepareCancelDunningRequest( * quantities** for any component to see a billing preview for non-current quantities. This is * accomplished by sending a request body with data under the `components` key. See the request * body documentation below. ## Subscription Side Effects You can request a `POST` to obtain - * this data from the endpoint without any side effects. Plain and simple, this will preview - * data, not log any changes against a subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * this data from the endpoint without any side effects. This method allows you to preview data, + * but does not log any changes against a subscription. + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the RenewalPreviewResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java index edfb57d8..36fbbfd4 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -113,11 +113,11 @@ private ApiCall prepareCreateSubscriptionReq } /** - * This method will return an array of subscriptions from a Site. Pay close attention to query - * string filters and pagination in order to control responses from the server. ## Search for a - * subscription Use the query strings below to search for a subscription using the criteria - * available. The return value will be an array. ## Self-Service Page token Self-Service Page - * token for the subscriptions is not returned by default. If this information is desired, the + * returns an array of subscriptions from a Site. Pay close attention to query string filters + * and pagination in order to control responses from the server. ## Search for a subscription + * Use the query strings below to search for a subscription using the criteria available. The + * return value will be an array. ## Self-Service Page token Self-Service Page token for the + * subscriptions is not returned by default. If this information is desired, the * include[]=self_service_page_token parameter must be provided with the request. * @param input ListSubscriptionsInput object containing request parameters * @return Returns the List of SubscriptionResponse response from the API call @@ -233,7 +233,7 @@ private ApiCall, ApiException> prepareListSubscriptio * the subscription data, it will still contain original `snap_day`. The `snap_day`will will * reset to 'null on the next billing cycle. This is because a product change is instantanous * and only affects the product associated with a subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. @@ -279,10 +279,10 @@ private ApiCall prepareUpdateSubscriptionReq } /** - * Use this endpoint to find subscription details. ## Self-Service Page token Self-Service Page - * token for the subscription is not returned by default. If this information is desired, the + * Retrieves subscription details. ## Self-Service Page token Self-Service Page token for the + * subscription is not returned by default. If this information is desired, the * include[]=self_service_page_token parameter must be provided with the request. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @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`. * @return Returns the SubscriptionResponse response from the API call @@ -346,7 +346,7 @@ private ApiCall prepareReadSubscriptionReque * passed must be a valid date/time. We recommend using the iso 8601 format. 3. The value passed * must be before the current date/time. If unpermitted parameters are sent, a 400 HTTP response * is sent along with a string giving the reason for the problem. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: Only these fields are available to be set. * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -435,7 +435,7 @@ private ApiCall prepareFindSubscriptionReque * `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, * 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`. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @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`. @@ -486,7 +486,7 @@ private ApiCall preparePurgeSubscriptionRequ /** * Use this endpoint to update a subscription's prepaid configuration. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the PrepaidConfigurationResponse response from the API call * @throws ApiException Represents error response from the server. @@ -601,7 +601,7 @@ private ApiCall preparePreviewSubscri * deprecated in favor of using the request body parameters as described below. When passing in * request body parameters, the list of coupon codes will simply be added to any existing list * of codes on the subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param code Optional parameter: A code for the coupon that would be applied to a * subscription * @param body Optional parameter: @@ -656,7 +656,7 @@ private ApiCall prepareApplyCouponsToSubscri * Use this endpoint to remove a coupon from an existing subscription. For more information on * the expected behaviour of removing a coupon from a subscription, See our documentation * [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon). - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param couponCode Optional parameter: The coupon code * @return Returns the String response from the API call * @throws ApiException Represents error response from the server. @@ -725,7 +725,7 @@ private ApiCall prepareRemoveCouponFromSubscriptionRequest * When the `revert_on_failure` parameter is set to `true`, the subscription's state will remain * as Trialing, we will void the invoice from activation and return any prepayments and credits * applied to the invoice back to the subscription. - * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param subscriptionId Required parameter: The Chargify id of the subscription. * @param body Optional parameter: * @return Returns the SubscriptionResponse response from the API call * @throws ApiException Represents error response from the server. diff --git a/src/main/java/com/maxio/advancedbilling/exceptions/ApiException.java b/src/main/java/com/maxio/advancedbilling/exceptions/ApiException.java index e21eaeb7..5ff6022c 100644 --- a/src/main/java/com/maxio/advancedbilling/exceptions/ApiException.java +++ b/src/main/java/com/maxio/advancedbilling/exceptions/ApiException.java @@ -6,6 +6,7 @@ package com.maxio.advancedbilling.exceptions; +import com.maxio.advancedbilling.http.client.HttpContext; import io.apimatic.core.types.CoreApiException; import io.apimatic.coreinterfaces.http.Context; @@ -22,7 +23,7 @@ public class ApiException extends CoreApiException { */ public ApiException(String reason) { super(reason); - // TODO Auto-generated constructor stub + // Auto-generated constructor stub } /** @@ -42,4 +43,13 @@ public ApiException(String reason, Context context) { public String toString() { return "ApiException [" + "statusCode=" + getResponseCode() + ", message=" + getMessage() + "]"; } + + /** + * The HTTP Context from the API request. + * @return Returns the object of HttpContext for ApiException. + */ + @Override + public HttpContext getHttpContext() { + return (HttpContext)super.getHttpContext(); + } } \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocateComponents.java b/src/main/java/com/maxio/advancedbilling/models/AllocateComponents.java index d4c31e67..9b7f2658 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocateComponents.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocateComponents.java @@ -170,7 +170,7 @@ public void setAccrueCharge(Boolean accrueCharge) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -183,7 +183,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -193,7 +193,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -204,7 +204,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -213,7 +213,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -226,7 +226,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -236,7 +236,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -247,7 +247,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/Allocation.java b/src/main/java/com/maxio/advancedbilling/models/Allocation.java index 2c5f5ab1..0faa1239 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Allocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/Allocation.java @@ -686,7 +686,7 @@ public void setInitiateDunning(Boolean initiateDunning) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -699,7 +699,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -709,7 +709,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -720,7 +720,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -729,7 +729,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -742,7 +742,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -752,7 +752,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -763,7 +763,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java index a081e6df..77852ec7 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationPreviewItem.java @@ -363,7 +363,7 @@ public void setAccrueCharge(Boolean accrueCharge) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -376,7 +376,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -386,7 +386,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -397,7 +397,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -406,7 +406,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -419,7 +419,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -429,7 +429,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -440,7 +440,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java b/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java index d832883c..ce851ce8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java +++ b/src/main/java/com/maxio/advancedbilling/models/AllocationSettings.java @@ -60,7 +60,7 @@ protected AllocationSettings(OptionalNullable upgradeCharge, /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -73,7 +73,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -83,7 +83,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -94,7 +94,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -103,7 +103,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -116,7 +116,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -126,7 +126,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -137,7 +137,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/AvailableActions.java b/src/main/java/com/maxio/advancedbilling/models/AvailableActions.java new file mode 100644 index 00000000..d3832618 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/AvailableActions.java @@ -0,0 +1,102 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for AvailableActions type. + */ +public class AvailableActions + extends BaseModel { + private SendEmail sendEmail; + + /** + * Default constructor. + */ + public AvailableActions() { + } + + /** + * Initialization constructor. + * @param sendEmail SendEmail value for sendEmail. + */ + public AvailableActions( + SendEmail sendEmail) { + this.sendEmail = sendEmail; + } + + /** + * Getter for SendEmail. + * @return Returns the SendEmail + */ + @JsonGetter("send_email") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SendEmail getSendEmail() { + return sendEmail; + } + + /** + * Setter for SendEmail. + * @param sendEmail Value for SendEmail + */ + @JsonSetter("send_email") + public void setSendEmail(SendEmail sendEmail) { + this.sendEmail = sendEmail; + } + + /** + * Converts this AvailableActions into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "AvailableActions [" + "sendEmail=" + sendEmail + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link AvailableActions.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link AvailableActions.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .sendEmail(getSendEmail()); + return builder; + } + + /** + * Class to build instances of {@link AvailableActions}. + */ + public static class Builder { + private SendEmail sendEmail; + + + + /** + * Setter for sendEmail. + * @param sendEmail SendEmail value for sendEmail. + * @return Builder + */ + public Builder sendEmail(SendEmail sendEmail) { + this.sendEmail = sendEmail; + return this; + } + + /** + * Builds a new {@link AvailableActions} object using the set fields. + * @return {@link AvailableActions} + */ + public AvailableActions build() { + return new AvailableActions(sendEmail); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java b/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java index 6cfdaee7..bd6790ef 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java +++ b/src/main/java/com/maxio/advancedbilling/models/CalendarBilling.java @@ -9,17 +9,15 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.models.containers.CalendarBillingSnapDay; import io.apimatic.core.types.BaseModel; -import io.apimatic.core.types.OptionalNullable; /** * This is a model class for CalendarBilling type. */ public class CalendarBilling extends BaseModel { - private OptionalNullable snapDay; + private CalendarBillingSnapDay snapDay; private FirstChargeType calendarBillingFirstCharge; /** @@ -36,41 +34,19 @@ public CalendarBilling() { public CalendarBilling( CalendarBillingSnapDay snapDay, FirstChargeType calendarBillingFirstCharge) { - this.snapDay = OptionalNullable.of(snapDay); - this.calendarBillingFirstCharge = calendarBillingFirstCharge; - } - - /** - * Initialization constructor. - * @param snapDay CalendarBillingSnapDay value for snapDay. - * @param calendarBillingFirstCharge FirstChargeType value for calendarBillingFirstCharge. - */ - - protected CalendarBilling(OptionalNullable snapDay, - FirstChargeType calendarBillingFirstCharge) { this.snapDay = snapDay; this.calendarBillingFirstCharge = calendarBillingFirstCharge; } - /** - * Internal Getter for SnapDay. - * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. - * @return Returns the Internal CalendarBillingSnapDay - */ - @JsonGetter("snap_day") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetSnapDay() { - return this.snapDay; - } - /** * Getter for SnapDay. * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. * @return Returns the CalendarBillingSnapDay */ + @JsonGetter("snap_day") + @JsonInclude(JsonInclude.Include.NON_NULL) public CalendarBillingSnapDay getSnapDay() { - return OptionalNullable.getFrom(snapDay); + return snapDay; } /** @@ -80,15 +56,7 @@ public CalendarBillingSnapDay getSnapDay() { */ @JsonSetter("snap_day") public void setSnapDay(CalendarBillingSnapDay snapDay) { - this.snapDay = OptionalNullable.of(snapDay); - } - - /** - * UnSetter for SnapDay. - * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. - */ - public void unsetSnapDay() { - snapDay = null; + this.snapDay = snapDay; } /** @@ -128,8 +96,8 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder() + .snapDay(getSnapDay()) .calendarBillingFirstCharge(getCalendarBillingFirstCharge()); - builder.snapDay = internalGetSnapDay(); return builder; } @@ -137,7 +105,7 @@ public Builder toBuilder() { * Class to build instances of {@link CalendarBilling}. */ public static class Builder { - private OptionalNullable snapDay; + private CalendarBillingSnapDay snapDay; private FirstChargeType calendarBillingFirstCharge; @@ -148,16 +116,7 @@ public static class Builder { * @return Builder */ public Builder snapDay(CalendarBillingSnapDay snapDay) { - this.snapDay = OptionalNullable.of(snapDay); - return this; - } - - /** - * UnSetter for snapDay. - * @return Builder - */ - public Builder unsetSnapDay() { - snapDay = null; + this.snapDay = snapDay; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/CancellationOptions.java b/src/main/java/com/maxio/advancedbilling/models/CancellationOptions.java index 8ee0d214..1c729bbb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CancellationOptions.java +++ b/src/main/java/com/maxio/advancedbilling/models/CancellationOptions.java @@ -9,7 +9,12 @@ import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; +import java.time.ZonedDateTime; /** * This is a model class for CancellationOptions type. @@ -18,6 +23,9 @@ public class CancellationOptions extends BaseModel { private String cancellationMessage; private String reasonCode; + private Boolean cancelAtEndOfPeriod; + private OptionalNullable scheduledCancellationAt; + private Boolean refundPrepaymentAccountBalance; /** * Default constructor. @@ -29,17 +37,45 @@ public CancellationOptions() { * Initialization constructor. * @param cancellationMessage String value for cancellationMessage. * @param reasonCode String value for reasonCode. + * @param cancelAtEndOfPeriod Boolean value for cancelAtEndOfPeriod. + * @param scheduledCancellationAt ZonedDateTime value for scheduledCancellationAt. + * @param refundPrepaymentAccountBalance Boolean value for refundPrepaymentAccountBalance. */ public CancellationOptions( String cancellationMessage, - String reasonCode) { + String reasonCode, + Boolean cancelAtEndOfPeriod, + ZonedDateTime scheduledCancellationAt, + Boolean refundPrepaymentAccountBalance) { this.cancellationMessage = cancellationMessage; this.reasonCode = reasonCode; + this.cancelAtEndOfPeriod = cancelAtEndOfPeriod; + this.scheduledCancellationAt = OptionalNullable.of(scheduledCancellationAt); + this.refundPrepaymentAccountBalance = refundPrepaymentAccountBalance; + } + + /** + * Initialization constructor. + * @param cancellationMessage String value for cancellationMessage. + * @param reasonCode String value for reasonCode. + * @param cancelAtEndOfPeriod Boolean value for cancelAtEndOfPeriod. + * @param scheduledCancellationAt ZonedDateTime value for scheduledCancellationAt. + * @param refundPrepaymentAccountBalance Boolean value for refundPrepaymentAccountBalance. + */ + + protected CancellationOptions(String cancellationMessage, String reasonCode, + Boolean cancelAtEndOfPeriod, OptionalNullable scheduledCancellationAt, + Boolean refundPrepaymentAccountBalance) { + this.cancellationMessage = cancellationMessage; + this.reasonCode = reasonCode; + this.cancelAtEndOfPeriod = cancelAtEndOfPeriod; + this.scheduledCancellationAt = scheduledCancellationAt; + this.refundPrepaymentAccountBalance = refundPrepaymentAccountBalance; } /** * Getter for CancellationMessage. - * For your internal use. An indication as to why the subscription is being canceled. + * An indication as to why the subscription is being canceled. For your internal use. * @return Returns the String */ @JsonGetter("cancellation_message") @@ -50,7 +86,7 @@ public String getCancellationMessage() { /** * Setter for CancellationMessage. - * For your internal use. An indication as to why the subscription is being canceled. + * An indication as to why the subscription is being canceled. For your internal use. * @param cancellationMessage Value for String */ @JsonSetter("cancellation_message") @@ -60,7 +96,8 @@ public void setCancellationMessage(String cancellationMessage) { /** * Getter for ReasonCode. - * The reason code associated with the cancellation. See the list of reason codes associated + * The reason code associated with the cancellation. Use the [List Reason + * Codes]($e/Reason%20Codes/listReasonCodes) endpoint to retrieve the reason codes associated * with your site. * @return Returns the String */ @@ -72,7 +109,8 @@ public String getReasonCode() { /** * Setter for ReasonCode. - * The reason code associated with the cancellation. See the list of reason codes associated + * The reason code associated with the cancellation. Use the [List Reason + * Codes]($e/Reason%20Codes/listReasonCodes) endpoint to retrieve the reason codes associated * with your site. * @param reasonCode Value for String */ @@ -81,6 +119,104 @@ public void setReasonCode(String reasonCode) { this.reasonCode = reasonCode; } + /** + * Getter for CancelAtEndOfPeriod. + * When true, the subscription is cancelled at the current period end instead of immediately. To + * use this option, the Schedule Subscription Cancellation feature must be enabled on your site. + * @return Returns the Boolean + */ + @JsonGetter("cancel_at_end_of_period") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCancelAtEndOfPeriod() { + return cancelAtEndOfPeriod; + } + + /** + * Setter for CancelAtEndOfPeriod. + * When true, the subscription is cancelled at the current period end instead of immediately. To + * use this option, the Schedule Subscription Cancellation feature must be enabled on your site. + * @param cancelAtEndOfPeriod Value for Boolean + */ + @JsonSetter("cancel_at_end_of_period") + public void setCancelAtEndOfPeriod(Boolean cancelAtEndOfPeriod) { + this.cancelAtEndOfPeriod = cancelAtEndOfPeriod; + } + + /** + * Internal Getter for ScheduledCancellationAt. + * Schedules the cancellation on the provided date. This is option is not applicable for prepaid + * subscriptions. To use this option, the Schedule Subscription Cancellation feature must be + * enabled on your site. + * @return Returns the Internal ZonedDateTime + */ + @JsonGetter("scheduled_cancellation_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetScheduledCancellationAt() { + return this.scheduledCancellationAt; + } + + /** + * Getter for ScheduledCancellationAt. + * Schedules the cancellation on the provided date. This is option is not applicable for prepaid + * subscriptions. To use this option, the Schedule Subscription Cancellation feature must be + * enabled on your site. + * @return Returns the ZonedDateTime + */ + public ZonedDateTime getScheduledCancellationAt() { + return OptionalNullable.getFrom(scheduledCancellationAt); + } + + /** + * Setter for ScheduledCancellationAt. + * Schedules the cancellation on the provided date. This is option is not applicable for prepaid + * subscriptions. To use this option, the Schedule Subscription Cancellation feature must be + * enabled on your site. + * @param scheduledCancellationAt Value for ZonedDateTime + */ + @JsonSetter("scheduled_cancellation_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setScheduledCancellationAt(ZonedDateTime scheduledCancellationAt) { + this.scheduledCancellationAt = OptionalNullable.of(scheduledCancellationAt); + } + + /** + * UnSetter for ScheduledCancellationAt. + * Schedules the cancellation on the provided date. This is option is not applicable for prepaid + * subscriptions. To use this option, the Schedule Subscription Cancellation feature must be + * enabled on your site. + */ + public void unsetScheduledCancellationAt() { + scheduledCancellationAt = null; + } + + /** + * Getter for RefundPrepaymentAccountBalance. + * Applies to prepaid subscriptions. When true, which is the default, the remaining prepaid + * balance is refunded as part of cancellation processing. When false, prepaid balance is not + * refunded as part of cancellation processing. To use this option, the Schedule Subscription + * Cancellation feature must be enabled on your site. + * @return Returns the Boolean + */ + @JsonGetter("refund_prepayment_account_balance") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getRefundPrepaymentAccountBalance() { + return refundPrepaymentAccountBalance; + } + + /** + * Setter for RefundPrepaymentAccountBalance. + * Applies to prepaid subscriptions. When true, which is the default, the remaining prepaid + * balance is refunded as part of cancellation processing. When false, prepaid balance is not + * refunded as part of cancellation processing. To use this option, the Schedule Subscription + * Cancellation feature must be enabled on your site. + * @param refundPrepaymentAccountBalance Value for Boolean + */ + @JsonSetter("refund_prepayment_account_balance") + public void setRefundPrepaymentAccountBalance(Boolean refundPrepaymentAccountBalance) { + this.refundPrepaymentAccountBalance = refundPrepaymentAccountBalance; + } + /** * Converts this CancellationOptions into string format. * @return String representation of this class @@ -88,8 +224,10 @@ public void setReasonCode(String reasonCode) { @Override public String toString() { return "CancellationOptions [" + "cancellationMessage=" + cancellationMessage - + ", reasonCode=" + reasonCode + ", additionalProperties=" - + getAdditionalProperties() + "]"; + + ", reasonCode=" + reasonCode + ", cancelAtEndOfPeriod=" + cancelAtEndOfPeriod + + ", scheduledCancellationAt=" + scheduledCancellationAt + + ", refundPrepaymentAccountBalance=" + refundPrepaymentAccountBalance + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -100,7 +238,10 @@ public String toString() { public Builder toBuilder() { Builder builder = new Builder() .cancellationMessage(getCancellationMessage()) - .reasonCode(getReasonCode()); + .reasonCode(getReasonCode()) + .cancelAtEndOfPeriod(getCancelAtEndOfPeriod()) + .refundPrepaymentAccountBalance(getRefundPrepaymentAccountBalance()); + builder.scheduledCancellationAt = internalGetScheduledCancellationAt(); return builder; } @@ -110,6 +251,9 @@ public Builder toBuilder() { public static class Builder { private String cancellationMessage; private String reasonCode; + private Boolean cancelAtEndOfPeriod; + private OptionalNullable scheduledCancellationAt; + private Boolean refundPrepaymentAccountBalance; @@ -133,12 +277,52 @@ public Builder reasonCode(String reasonCode) { return this; } + /** + * Setter for cancelAtEndOfPeriod. + * @param cancelAtEndOfPeriod Boolean value for cancelAtEndOfPeriod. + * @return Builder + */ + public Builder cancelAtEndOfPeriod(Boolean cancelAtEndOfPeriod) { + this.cancelAtEndOfPeriod = cancelAtEndOfPeriod; + return this; + } + + /** + * Setter for scheduledCancellationAt. + * @param scheduledCancellationAt ZonedDateTime value for scheduledCancellationAt. + * @return Builder + */ + public Builder scheduledCancellationAt(ZonedDateTime scheduledCancellationAt) { + this.scheduledCancellationAt = OptionalNullable.of(scheduledCancellationAt); + return this; + } + + /** + * UnSetter for scheduledCancellationAt. + * @return Builder + */ + public Builder unsetScheduledCancellationAt() { + scheduledCancellationAt = null; + return this; + } + + /** + * Setter for refundPrepaymentAccountBalance. + * @param refundPrepaymentAccountBalance Boolean value for refundPrepaymentAccountBalance. + * @return Builder + */ + public Builder refundPrepaymentAccountBalance(Boolean refundPrepaymentAccountBalance) { + this.refundPrepaymentAccountBalance = refundPrepaymentAccountBalance; + return this; + } + /** * Builds a new {@link CancellationOptions} object using the set fields. * @return {@link CancellationOptions} */ public CancellationOptions build() { - return new CancellationOptions(cancellationMessage, reasonCode); + return new CancellationOptions(cancellationMessage, reasonCode, cancelAtEndOfPeriod, + scheduledCancellationAt, refundPrepaymentAccountBalance); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePoint.java new file mode 100644 index 00000000..a4e78035 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePoint.java @@ -0,0 +1,147 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for CloneComponentPricePoint type. + */ +public class CloneComponentPricePoint + extends BaseModel { + private String name; + private String handle; + + /** + * Default constructor. + */ + public CloneComponentPricePoint() { + } + + /** + * Initialization constructor. + * @param name String value for name. + * @param handle String value for handle. + */ + public CloneComponentPricePoint( + String name, + String handle) { + this.name = name; + this.handle = handle; + } + + /** + * Getter for Name. + * @return Returns the String + */ + @JsonGetter("name") + public String getName() { + return name; + } + + /** + * Setter for Name. + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for Handle. + * @return Returns the String + */ + @JsonGetter("handle") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getHandle() { + return handle; + } + + /** + * Setter for Handle. + * @param handle Value for String + */ + @JsonSetter("handle") + public void setHandle(String handle) { + this.handle = handle; + } + + /** + * Converts this CloneComponentPricePoint into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "CloneComponentPricePoint [" + "name=" + name + ", handle=" + handle + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link CloneComponentPricePoint.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link CloneComponentPricePoint.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(name) + .handle(getHandle()); + return builder; + } + + /** + * Class to build instances of {@link CloneComponentPricePoint}. + */ + public static class Builder { + private String name; + private String handle; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param name String value for name. + */ + public Builder(String name) { + this.name = name; + } + + /** + * Setter for name. + * @param name String value for name. + * @return Builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Setter for handle. + * @param handle String value for handle. + * @return Builder + */ + public Builder handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Builds a new {@link CloneComponentPricePoint} object using the set fields. + * @return {@link CloneComponentPricePoint} + */ + public CloneComponentPricePoint build() { + return new CloneComponentPricePoint(name, handle); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePointRequest.java b/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePointRequest.java new file mode 100644 index 00000000..6e5c7d2a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/CloneComponentPricePointRequest.java @@ -0,0 +1,111 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for CloneComponentPricePointRequest type. + */ +public class CloneComponentPricePointRequest + extends BaseModel { + private CloneComponentPricePoint pricePoint; + + /** + * Default constructor. + */ + public CloneComponentPricePointRequest() { + } + + /** + * Initialization constructor. + * @param pricePoint CloneComponentPricePoint value for pricePoint. + */ + public CloneComponentPricePointRequest( + CloneComponentPricePoint pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Getter for PricePoint. + * @return Returns the CloneComponentPricePoint + */ + @JsonGetter("price_point") + public CloneComponentPricePoint getPricePoint() { + return pricePoint; + } + + /** + * Setter for PricePoint. + * @param pricePoint Value for CloneComponentPricePoint + */ + @JsonSetter("price_point") + public void setPricePoint(CloneComponentPricePoint pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Converts this CloneComponentPricePointRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "CloneComponentPricePointRequest [" + "pricePoint=" + pricePoint + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link CloneComponentPricePointRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link CloneComponentPricePointRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(pricePoint); + return builder; + } + + /** + * Class to build instances of {@link CloneComponentPricePointRequest}. + */ + public static class Builder { + private CloneComponentPricePoint pricePoint; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param pricePoint CloneComponentPricePoint value for pricePoint. + */ + public Builder(CloneComponentPricePoint pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Setter for pricePoint. + * @param pricePoint CloneComponentPricePoint value for pricePoint. + * @return Builder + */ + public Builder pricePoint(CloneComponentPricePoint pricePoint) { + this.pricePoint = pricePoint; + return this; + } + + /** + * Builds a new {@link CloneComponentPricePointRequest} object using the set fields. + * @return {@link CloneComponentPricePointRequest} + */ + public CloneComponentPricePointRequest build() { + return new CloneComponentPricePointRequest(pricePoint); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java index 69e1e047..0ad385d8 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Component.java +++ b/src/main/java/com/maxio/advancedbilling/models/Component.java @@ -920,7 +920,7 @@ public void setRecurring(Boolean recurring) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -933,7 +933,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -943,7 +943,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -954,7 +954,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -963,7 +963,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -976,7 +976,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -986,7 +986,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -997,7 +997,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java b/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java index be653453..07f21a38 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentCustomPrice.java @@ -23,6 +23,8 @@ public class ComponentCustomPrice private PricingScheme pricingScheme; private Integer interval; private OptionalNullable intervalUnit; + private OptionalNullable listPricePointId; + private Boolean useDefaultListPrice; private List prices; private Boolean renewPrepaidAllocation; private Boolean rolloverPrepaidRemainder; @@ -42,6 +44,8 @@ public ComponentCustomPrice() { * @param pricingScheme PricingScheme value for pricingScheme. * @param interval Integer value for interval. * @param intervalUnit IntervalUnit value for intervalUnit. + * @param listPricePointId Integer value for listPricePointId. + * @param useDefaultListPrice Boolean value for useDefaultListPrice. * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder. * @param expirationInterval Integer value for expirationInterval. @@ -53,6 +57,8 @@ public ComponentCustomPrice( PricingScheme pricingScheme, Integer interval, IntervalUnit intervalUnit, + Integer listPricePointId, + Boolean useDefaultListPrice, Boolean renewPrepaidAllocation, Boolean rolloverPrepaidRemainder, Integer expirationInterval, @@ -61,6 +67,8 @@ public ComponentCustomPrice( this.pricingScheme = pricingScheme; this.interval = interval; this.intervalUnit = OptionalNullable.of(intervalUnit); + this.listPricePointId = OptionalNullable.of(listPricePointId); + this.useDefaultListPrice = useDefaultListPrice; this.prices = prices; this.renewPrepaidAllocation = renewPrepaidAllocation; this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; @@ -75,6 +83,8 @@ public ComponentCustomPrice( * @param pricingScheme PricingScheme value for pricingScheme. * @param interval Integer value for interval. * @param intervalUnit IntervalUnit value for intervalUnit. + * @param listPricePointId Integer value for listPricePointId. + * @param useDefaultListPrice Boolean value for useDefaultListPrice. * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder. * @param expirationInterval Integer value for expirationInterval. @@ -83,13 +93,16 @@ public ComponentCustomPrice( protected ComponentCustomPrice(List prices, Boolean taxIncluded, PricingScheme pricingScheme, Integer interval, - OptionalNullable intervalUnit, Boolean renewPrepaidAllocation, + OptionalNullable intervalUnit, OptionalNullable listPricePointId, + Boolean useDefaultListPrice, Boolean renewPrepaidAllocation, Boolean rolloverPrepaidRemainder, OptionalNullable expirationInterval, OptionalNullable expirationIntervalUnit) { this.taxIncluded = taxIncluded; this.pricingScheme = pricingScheme; this.interval = interval; this.intervalUnit = intervalUnit; + this.listPricePointId = listPricePointId; + this.useDefaultListPrice = useDefaultListPrice; this.prices = prices; this.renewPrepaidAllocation = renewPrepaidAllocation; this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; @@ -207,9 +220,75 @@ public void unsetIntervalUnit() { intervalUnit = null; } + /** + * Internal Getter for ListPricePointId. + * Optional id of the price point to use for list price calculations when overriding the + * customer price. + * @return Returns the Internal Integer + */ + @JsonGetter("list_price_point_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetListPricePointId() { + return this.listPricePointId; + } + + /** + * Getter for ListPricePointId. + * Optional id of the price point to use for list price calculations when overriding the + * customer price. + * @return Returns the Integer + */ + public Integer getListPricePointId() { + return OptionalNullable.getFrom(listPricePointId); + } + + /** + * Setter for ListPricePointId. + * Optional id of the price point to use for list price calculations when overriding the + * customer price. + * @param listPricePointId Value for Integer + */ + @JsonSetter("list_price_point_id") + public void setListPricePointId(Integer listPricePointId) { + this.listPricePointId = OptionalNullable.of(listPricePointId); + } + + /** + * UnSetter for ListPricePointId. + * Optional id of the price point to use for list price calculations when overriding the + * customer price. + */ + public void unsetListPricePointId() { + listPricePointId = null; + } + + /** + * Getter for UseDefaultListPrice. + * When true, list price calculations will continue to use the default price point even when a + * `custom_price` is supplied. + * @return Returns the Boolean + */ + @JsonGetter("use_default_list_price") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseDefaultListPrice() { + return useDefaultListPrice; + } + + /** + * Setter for UseDefaultListPrice. + * When true, list price calculations will continue to use the default price point even when a + * `custom_price` is supplied. + * @param useDefaultListPrice Value for Boolean + */ + @JsonSetter("use_default_list_price") + public void setUseDefaultListPrice(Boolean useDefaultListPrice) { + this.useDefaultListPrice = useDefaultListPrice; + } + /** * Getter for Prices. - * On/off components only need one price bracket starting at 1 + * On/off components only need one price bracket starting at 1. * @return Returns the List of Price */ @JsonGetter("prices") @@ -219,7 +298,7 @@ public List getPrices() { /** * Setter for Prices. - * On/off components only need one price bracket starting at 1 + * On/off components only need one price bracket starting at 1. * @param prices Value for List of Price */ @JsonSetter("prices") @@ -367,7 +446,8 @@ public void unsetExpirationIntervalUnit() { public String toString() { return "ComponentCustomPrice [" + "prices=" + prices + ", taxIncluded=" + taxIncluded + ", pricingScheme=" + pricingScheme + ", interval=" + interval + ", intervalUnit=" - + intervalUnit + ", renewPrepaidAllocation=" + renewPrepaidAllocation + + intervalUnit + ", listPricePointId=" + listPricePointId + ", useDefaultListPrice=" + + useDefaultListPrice + ", renewPrepaidAllocation=" + renewPrepaidAllocation + ", rolloverPrepaidRemainder=" + rolloverPrepaidRemainder + ", expirationInterval=" + expirationInterval + ", expirationIntervalUnit=" + expirationIntervalUnit + ", additionalProperties=" + getAdditionalProperties() + "]"; @@ -383,9 +463,11 @@ public Builder toBuilder() { .taxIncluded(getTaxIncluded()) .pricingScheme(getPricingScheme()) .interval(getInterval()) + .useDefaultListPrice(getUseDefaultListPrice()) .renewPrepaidAllocation(getRenewPrepaidAllocation()) .rolloverPrepaidRemainder(getRolloverPrepaidRemainder()); builder.intervalUnit = internalGetIntervalUnit(); + builder.listPricePointId = internalGetListPricePointId(); builder.expirationInterval = internalGetExpirationInterval(); builder.expirationIntervalUnit = internalGetExpirationIntervalUnit(); return builder; @@ -400,6 +482,8 @@ public static class Builder { private PricingScheme pricingScheme; private Integer interval; private OptionalNullable intervalUnit; + private OptionalNullable listPricePointId; + private Boolean useDefaultListPrice; private Boolean renewPrepaidAllocation; private Boolean rolloverPrepaidRemainder; private OptionalNullable expirationInterval; @@ -478,6 +562,35 @@ public Builder unsetIntervalUnit() { return this; } + /** + * Setter for listPricePointId. + * @param listPricePointId Integer value for listPricePointId. + * @return Builder + */ + public Builder listPricePointId(Integer listPricePointId) { + this.listPricePointId = OptionalNullable.of(listPricePointId); + return this; + } + + /** + * UnSetter for listPricePointId. + * @return Builder + */ + public Builder unsetListPricePointId() { + listPricePointId = null; + return this; + } + + /** + * Setter for useDefaultListPrice. + * @param useDefaultListPrice Boolean value for useDefaultListPrice. + * @return Builder + */ + public Builder useDefaultListPrice(Boolean useDefaultListPrice) { + this.useDefaultListPrice = useDefaultListPrice; + return this; + } + /** * Setter for renewPrepaidAllocation. * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. @@ -542,8 +655,8 @@ public Builder unsetExpirationIntervalUnit() { */ public ComponentCustomPrice build() { return new ComponentCustomPrice(prices, taxIncluded, pricingScheme, interval, - intervalUnit, renewPrepaidAllocation, rolloverPrepaidRemainder, - expirationInterval, expirationIntervalUnit); + intervalUnit, listPricePointId, useDefaultListPrice, renewPrepaidAllocation, + rolloverPrepaidRemainder, expirationInterval, expirationIntervalUnit); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java index 2f2374b4..bc2da494 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePoint.java @@ -611,7 +611,7 @@ public void unsetIntervalUnit() { * An array of currency pricing data is available when multiple currencies are defined for the * site. It varies based on the use_site_exchange_rate setting for the price point. This * parameter is present only in the response of read endpoints, after including the appropriate - * query parameter. + * query parameter. The clone endpoint always returns currency prices if they are present. * @return Returns the List of ComponentCurrencyPrice */ @JsonGetter("currency_prices") @@ -625,7 +625,7 @@ public List getCurrencyPrices() { * An array of currency pricing data is available when multiple currencies are defined for the * site. It varies based on the use_site_exchange_rate setting for the price point. This * parameter is present only in the response of read endpoints, after including the appropriate - * query parameter. + * query parameter. The clone endpoint always returns currency prices if they are present. * @param currencyPrices Value for List of ComponentCurrencyPrice */ @JsonSetter("currency_prices") diff --git a/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointCurrencyOverageResponse.java b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointCurrencyOverageResponse.java new file mode 100644 index 00000000..3dcd8ce8 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ComponentPricePointCurrencyOverageResponse.java @@ -0,0 +1,114 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ComponentPricePointCurrencyOverageResponse type. + */ +public class ComponentPricePointCurrencyOverageResponse + extends BaseModel { + private CurrencyOveragePrices pricePoint; + + /** + * Default constructor. + */ + public ComponentPricePointCurrencyOverageResponse() { + } + + /** + * Initialization constructor. + * @param pricePoint CurrencyOveragePrices value for pricePoint. + */ + public ComponentPricePointCurrencyOverageResponse( + CurrencyOveragePrices pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Getter for PricePoint. + * Extends a component price point with currency overage prices. + * @return Returns the CurrencyOveragePrices + */ + @JsonGetter("price_point") + public CurrencyOveragePrices getPricePoint() { + return pricePoint; + } + + /** + * Setter for PricePoint. + * Extends a component price point with currency overage prices. + * @param pricePoint Value for CurrencyOveragePrices + */ + @JsonSetter("price_point") + public void setPricePoint(CurrencyOveragePrices pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Converts this ComponentPricePointCurrencyOverageResponse into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ComponentPricePointCurrencyOverageResponse [" + "pricePoint=" + pricePoint + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ComponentPricePointCurrencyOverageResponse.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ComponentPricePointCurrencyOverageResponse.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(pricePoint); + return builder; + } + + /** + * Class to build instances of {@link ComponentPricePointCurrencyOverageResponse}. + */ + public static class Builder { + private CurrencyOveragePrices pricePoint; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param pricePoint CurrencyOveragePrices value for pricePoint. + */ + public Builder(CurrencyOveragePrices pricePoint) { + this.pricePoint = pricePoint; + } + + /** + * Setter for pricePoint. + * @param pricePoint CurrencyOveragePrices value for pricePoint. + * @return Builder + */ + public Builder pricePoint(CurrencyOveragePrices pricePoint) { + this.pricePoint = pricePoint; + return this; + } + + /** + * Builds a new {@link ComponentPricePointCurrencyOverageResponse} object using the set + * fields. + * @return {@link ComponentPricePointCurrencyOverageResponse} + */ + public ComponentPricePointCurrencyOverageResponse build() { + return new ComponentPricePointCurrencyOverageResponse(pricePoint); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/Contract.java b/src/main/java/com/maxio/advancedbilling/models/Contract.java new file mode 100644 index 00000000..5b11f796 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/Contract.java @@ -0,0 +1,251 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; + +/** + * This is a model class for Contract type. + */ +public class Contract + extends BaseModel { + private Integer id; + private String maxioId; + private OptionalNullable number; + private Register register; + + /** + * Default constructor. + */ + public Contract() { + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param maxioId String value for maxioId. + * @param number String value for number. + * @param register Register value for register. + */ + public Contract( + Integer id, + String maxioId, + String number, + Register register) { + this.id = id; + this.maxioId = maxioId; + this.number = OptionalNullable.of(number); + this.register = register; + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param maxioId String value for maxioId. + * @param number String value for number. + * @param register Register value for register. + */ + + protected Contract(Integer id, String maxioId, OptionalNullable number, + Register register) { + this.id = id; + this.maxioId = maxioId; + this.number = number; + this.register = register; + } + + /** + * Getter for Id. + * @return Returns the Integer + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for Integer + */ + @JsonSetter("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for MaxioId. + * @return Returns the String + */ + @JsonGetter("maxio_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getMaxioId() { + return maxioId; + } + + /** + * Setter for MaxioId. + * @param maxioId Value for String + */ + @JsonSetter("maxio_id") + public void setMaxioId(String maxioId) { + this.maxioId = maxioId; + } + + /** + * Internal Getter for Number. + * @return Returns the Internal String + */ + @JsonGetter("number") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetNumber() { + return this.number; + } + + /** + * Getter for Number. + * @return Returns the String + */ + public String getNumber() { + return OptionalNullable.getFrom(number); + } + + /** + * Setter for Number. + * @param number Value for String + */ + @JsonSetter("number") + public void setNumber(String number) { + this.number = OptionalNullable.of(number); + } + + /** + * UnSetter for Number. + */ + public void unsetNumber() { + number = null; + } + + /** + * Getter for Register. + * @return Returns the Register + */ + @JsonGetter("register") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Register getRegister() { + return register; + } + + /** + * Setter for Register. + * @param register Value for Register + */ + @JsonSetter("register") + public void setRegister(Register register) { + this.register = register; + } + + /** + * Converts this Contract into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "Contract [" + "id=" + id + ", maxioId=" + maxioId + ", number=" + number + + ", register=" + register + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link Contract.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link Contract.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .maxioId(getMaxioId()) + .register(getRegister()); + builder.number = internalGetNumber(); + return builder; + } + + /** + * Class to build instances of {@link Contract}. + */ + public static class Builder { + private Integer id; + private String maxioId; + private OptionalNullable number; + private Register register; + + + + /** + * Setter for id. + * @param id Integer value for id. + * @return Builder + */ + public Builder id(Integer id) { + this.id = id; + return this; + } + + /** + * Setter for maxioId. + * @param maxioId String value for maxioId. + * @return Builder + */ + public Builder maxioId(String maxioId) { + this.maxioId = maxioId; + return this; + } + + /** + * Setter for number. + * @param number String value for number. + * @return Builder + */ + public Builder number(String number) { + this.number = OptionalNullable.of(number); + return this; + } + + /** + * UnSetter for number. + * @return Builder + */ + public Builder unsetNumber() { + number = null; + return this; + } + + /** + * Setter for register. + * @param register Register value for register. + * @return Builder + */ + public Builder register(Register register) { + this.register = register; + return this; + } + + /** + * Builds a new {@link Contract} object using the set fields. + * @return {@link Contract} + */ + public Contract build() { + return new Contract(id, maxioId, number, register); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java index 62fa1d6b..dfeebe36 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateAllocation.java @@ -20,16 +20,20 @@ public class CreateAllocation extends BaseModel { private double quantity; + private String decimalQuantity; + private Double previousQuantity; + private String decimalPreviousQuantity; private Integer componentId; private String memo; private String prorationDowngradeScheme; private String prorationUpgradeScheme; + private OptionalNullable downgradeCredit; + private OptionalNullable upgradeCharge; private Boolean accrueCharge; - private OptionalNullable downgradeCredit; - private OptionalNullable upgradeCharge; private Boolean initiateDunning; private OptionalNullable pricePointId; private BillingSchedule billingSchedule; + private ComponentCustomPrice customPrice; /** * Default constructor. @@ -40,74 +44,95 @@ public CreateAllocation() { /** * Initialization constructor. * @param quantity double value for quantity. + * @param decimalQuantity String value for decimalQuantity. + * @param previousQuantity Double value for previousQuantity. + * @param decimalPreviousQuantity String value for decimalPreviousQuantity. * @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 downgradeCredit DowngradeCreditCreditType value for downgradeCredit. + * @param upgradeCharge UpgradeChargeCreditType value for upgradeCharge. * @param accrueCharge Boolean value for accrueCharge. - * @param downgradeCredit CreditType value for downgradeCredit. - * @param upgradeCharge CreditType value for upgradeCharge. * @param initiateDunning Boolean value for initiateDunning. * @param pricePointId CreateAllocationPricePointId value for pricePointId. * @param billingSchedule BillingSchedule value for billingSchedule. + * @param customPrice ComponentCustomPrice value for customPrice. */ public CreateAllocation( double quantity, + String decimalQuantity, + Double previousQuantity, + String decimalPreviousQuantity, Integer componentId, String memo, String prorationDowngradeScheme, String prorationUpgradeScheme, + DowngradeCreditCreditType downgradeCredit, + UpgradeChargeCreditType upgradeCharge, Boolean accrueCharge, - CreditType downgradeCredit, - CreditType upgradeCharge, Boolean initiateDunning, CreateAllocationPricePointId pricePointId, - BillingSchedule billingSchedule) { + BillingSchedule billingSchedule, + ComponentCustomPrice customPrice) { this.quantity = quantity; + this.decimalQuantity = decimalQuantity; + this.previousQuantity = previousQuantity; + this.decimalPreviousQuantity = decimalPreviousQuantity; this.componentId = componentId; this.memo = memo; this.prorationDowngradeScheme = prorationDowngradeScheme; this.prorationUpgradeScheme = prorationUpgradeScheme; - this.accrueCharge = accrueCharge; this.downgradeCredit = OptionalNullable.of(downgradeCredit); this.upgradeCharge = OptionalNullable.of(upgradeCharge); + this.accrueCharge = accrueCharge; this.initiateDunning = initiateDunning; this.pricePointId = OptionalNullable.of(pricePointId); this.billingSchedule = billingSchedule; + this.customPrice = customPrice; } /** * Initialization constructor. * @param quantity double value for quantity. + * @param decimalQuantity String value for decimalQuantity. + * @param previousQuantity Double value for previousQuantity. + * @param decimalPreviousQuantity String value for decimalPreviousQuantity. * @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 downgradeCredit DowngradeCreditCreditType value for downgradeCredit. + * @param upgradeCharge UpgradeChargeCreditType value for upgradeCharge. * @param accrueCharge Boolean value for accrueCharge. - * @param downgradeCredit CreditType value for downgradeCredit. - * @param upgradeCharge CreditType value for upgradeCharge. * @param initiateDunning Boolean value for initiateDunning. * @param pricePointId CreateAllocationPricePointId value for pricePointId. * @param billingSchedule BillingSchedule value for billingSchedule. + * @param customPrice ComponentCustomPrice value for customPrice. */ - protected CreateAllocation(double quantity, Integer componentId, String memo, - String prorationDowngradeScheme, String prorationUpgradeScheme, Boolean accrueCharge, - OptionalNullable downgradeCredit, - OptionalNullable upgradeCharge, Boolean initiateDunning, - OptionalNullable pricePointId, - BillingSchedule billingSchedule) { + protected CreateAllocation(double quantity, String decimalQuantity, Double previousQuantity, + String decimalPreviousQuantity, Integer componentId, String memo, + String prorationDowngradeScheme, String prorationUpgradeScheme, + OptionalNullable downgradeCredit, + OptionalNullable upgradeCharge, Boolean accrueCharge, + Boolean initiateDunning, OptionalNullable pricePointId, + BillingSchedule billingSchedule, ComponentCustomPrice customPrice) { this.quantity = quantity; + this.decimalQuantity = decimalQuantity; + this.previousQuantity = previousQuantity; + this.decimalPreviousQuantity = decimalPreviousQuantity; this.componentId = componentId; this.memo = memo; this.prorationDowngradeScheme = prorationDowngradeScheme; this.prorationUpgradeScheme = prorationUpgradeScheme; - this.accrueCharge = accrueCharge; this.downgradeCredit = downgradeCredit; this.upgradeCharge = upgradeCharge; + this.accrueCharge = accrueCharge; this.initiateDunning = initiateDunning; this.pricePointId = pricePointId; this.billingSchedule = billingSchedule; + this.customPrice = customPrice; } /** @@ -134,10 +159,79 @@ public void setQuantity(double quantity) { this.quantity = quantity; } + /** + * Getter for DecimalQuantity. + * Decimal representation of the allocated quantity. Only valid when decimal allocations are + * enabled for the component. + * @return Returns the String + */ + @JsonGetter("decimal_quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getDecimalQuantity() { + return decimalQuantity; + } + + /** + * Setter for DecimalQuantity. + * Decimal representation of the allocated quantity. Only valid when decimal allocations are + * enabled for the component. + * @param decimalQuantity Value for String + */ + @JsonSetter("decimal_quantity") + public void setDecimalQuantity(String decimalQuantity) { + this.decimalQuantity = decimalQuantity; + } + + /** + * Getter for PreviousQuantity. + * The quantity that was in effect before this allocation. Responses always include this value; + * it may be supplied on preview requests to ensure the expected change is evaluated. + * @return Returns the Double + */ + @JsonGetter("previous_quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Double getPreviousQuantity() { + return previousQuantity; + } + + /** + * Setter for PreviousQuantity. + * The quantity that was in effect before this allocation. Responses always include this value; + * it may be supplied on preview requests to ensure the expected change is evaluated. + * @param previousQuantity Value for Double + */ + @JsonSetter("previous_quantity") + public void setPreviousQuantity(Double previousQuantity) { + this.previousQuantity = previousQuantity; + } + + /** + * Getter for DecimalPreviousQuantity. + * Decimal representation of `previous_quantity`. Only valid when decimal allocations are + * enabled for the component. + * @return Returns the String + */ + @JsonGetter("decimal_previous_quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getDecimalPreviousQuantity() { + return decimalPreviousQuantity; + } + + /** + * Setter for DecimalPreviousQuantity. + * Decimal representation of `previous_quantity`. Only valid when decimal allocations are + * enabled for the component. + * @param decimalPreviousQuantity Value for String + */ + @JsonSetter("decimal_previous_quantity") + public void setDecimalPreviousQuantity(String decimalPreviousQuantity) { + this.decimalPreviousQuantity = decimalPreviousQuantity; + } + /** * Getter for ComponentId. * (required for the multiple allocations endpoint) The id associated with the component for - * which the allocation is being made + * which the allocation is being made. * @return Returns the Integer */ @JsonGetter("component_id") @@ -149,7 +243,7 @@ public Integer getComponentId() { /** * Setter for ComponentId. * (required for the multiple allocations endpoint) The id associated with the component for - * which the allocation is being made + * which the allocation is being made. * @param componentId Value for Integer */ @JsonSetter("component_id") @@ -159,7 +253,7 @@ public void setComponentId(Integer componentId) { /** * Getter for Memo. - * A memo to record along with the allocation + * A memo to record along with the allocation. * @return Returns the String */ @JsonGetter("memo") @@ -170,7 +264,7 @@ public String getMemo() { /** * Setter for Memo. - * A memo to record along with the allocation + * A memo to record along with the allocation. * @param memo Value for String */ @JsonSetter("memo") @@ -224,69 +318,52 @@ public void setProrationUpgradeScheme(String prorationUpgradeScheme) { this.prorationUpgradeScheme = prorationUpgradeScheme; } - /** - * Getter for AccrueCharge. - * If the change in cost is an upgrade, this determines if the charge should accrue to the next - * renewal or if capture should be attempted immediately. Defaults to the site setting if one is - * not provided. - * @return Returns the Boolean - */ - @JsonGetter("accrue_charge") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Boolean getAccrueCharge() { - return accrueCharge; - } - - /** - * Setter for AccrueCharge. - * If the change in cost is an upgrade, this determines if the charge should accrue to the next - * renewal or if capture should be attempted immediately. Defaults to the site setting if one is - * not provided. - * @param accrueCharge Value for Boolean - */ - @JsonSetter("accrue_charge") - public void setAccrueCharge(Boolean accrueCharge) { - this.accrueCharge = accrueCharge; - } - /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @return Returns the Internal CreditType + * then site setting if one is not provided. Values are: `full` - A full price credit is added + * for the amount owed. `prorated` - A prorated credit is added for the amount owed. `none` - No + * charge is added. + * @return Returns the Internal DowngradeCreditCreditType */ @JsonGetter("downgrade_credit") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetDowngradeCredit() { + protected OptionalNullable internalGetDowngradeCredit() { return this.downgradeCredit; } /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @return Returns the CreditType + * then site setting if one is not provided. Values are: `full` - A full price credit is added + * for the amount owed. `prorated` - A prorated credit is added for the amount owed. `none` - No + * charge is added. + * @return Returns the DowngradeCreditCreditType */ - public CreditType getDowngradeCredit() { + public DowngradeCreditCreditType getDowngradeCredit() { return OptionalNullable.getFrom(downgradeCredit); } /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @param downgradeCredit Value for CreditType + * then site setting if one is not provided. Values are: `full` - A full price credit is added + * for the amount owed. `prorated` - A prorated credit is added for the amount owed. `none` - No + * charge is added. + * @param downgradeCredit Value for DowngradeCreditCreditType */ @JsonSetter("downgrade_credit") - public void setDowngradeCredit(CreditType downgradeCredit) { + public void setDowngradeCredit(DowngradeCreditCreditType downgradeCredit) { this.downgradeCredit = OptionalNullable.of(downgradeCredit); } /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. Values are: `full` - A full price credit is added + * for the amount owed. `prorated` - A prorated credit is added for the amount owed. `none` - No + * charge is added. */ public void unsetDowngradeCredit() { downgradeCredit = null; @@ -295,46 +372,83 @@ public void unsetDowngradeCredit() { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @return Returns the Internal CreditType + * then site setting if one is not provided. Values are: `full` - A charge is added for the full + * price of the component. `prorated` - A charge is added for the prorated price of the + * component change. `none` - No charge is added. + * @return Returns the Internal UpgradeChargeCreditType */ @JsonGetter("upgrade_charge") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetUpgradeCharge() { + protected OptionalNullable internalGetUpgradeCharge() { return this.upgradeCharge; } /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @return Returns the CreditType + * then site setting if one is not provided. Values are: `full` - A charge is added for the full + * price of the component. `prorated` - A charge is added for the prorated price of the + * component change. `none` - No charge is added. + * @return Returns the UpgradeChargeCreditType */ - public CreditType getUpgradeCharge() { + public UpgradeChargeCreditType getUpgradeCharge() { return OptionalNullable.getFrom(upgradeCharge); } /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. - * @param upgradeCharge Value for CreditType + * then site setting if one is not provided. Values are: `full` - A charge is added for the full + * price of the component. `prorated` - A charge is added for the prorated price of the + * component change. `none` - No charge is added. + * @param upgradeCharge Value for UpgradeChargeCreditType */ @JsonSetter("upgrade_charge") - public void setUpgradeCharge(CreditType upgradeCharge) { + public void setUpgradeCharge(UpgradeChargeCreditType upgradeCharge) { this.upgradeCharge = OptionalNullable.of(upgradeCharge); } /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. Values are: `full` - A charge is added for the full + * price of the component. `prorated` - A charge is added for the prorated price of the + * component change. `none` - No charge is added. */ public void unsetUpgradeCharge() { upgradeCharge = null; } + /** + * Getter for AccrueCharge. + * "If the change in cost is an upgrade, this determines if the charge should accrue to the next + * renewal or if capture should be attempted immediately. `true` - Attempt to charge the + * customer at the next renewal. `false` - Attempt to charge the customer right away. If it + * fails, the charge will be accrued until the next renewal. Defaults to the site setting if + * unspecified in the request. + * @return Returns the Boolean + */ + @JsonGetter("accrue_charge") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getAccrueCharge() { + return accrueCharge; + } + + /** + * Setter for AccrueCharge. + * "If the change in cost is an upgrade, this determines if the charge should accrue to the next + * renewal or if capture should be attempted immediately. `true` - Attempt to charge the + * customer at the next renewal. `false` - Attempt to charge the customer right away. If it + * fails, the charge will be accrued until the next renewal. Defaults to the site setting if + * unspecified in the request. + * @param accrueCharge Value for Boolean + */ + @JsonSetter("accrue_charge") + public void setAccrueCharge(Boolean accrueCharge) { + this.accrueCharge = accrueCharge; + } + /** * Getter for InitiateDunning. * If set to true, if the immediate component payment fails, initiate dunning for the @@ -428,18 +542,44 @@ public void setBillingSchedule(BillingSchedule billingSchedule) { this.billingSchedule = billingSchedule; } + /** + * Getter for CustomPrice. + * Create or update custom pricing unique to the subscription. Used in place of + * `price_point_id`. + * @return Returns the ComponentCustomPrice + */ + @JsonGetter("custom_price") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ComponentCustomPrice getCustomPrice() { + return customPrice; + } + + /** + * Setter for CustomPrice. + * Create or update custom pricing unique to the subscription. Used in place of + * `price_point_id`. + * @param customPrice Value for ComponentCustomPrice + */ + @JsonSetter("custom_price") + public void setCustomPrice(ComponentCustomPrice customPrice) { + this.customPrice = customPrice; + } + /** * Converts this CreateAllocation into string format. * @return String representation of this class */ @Override public String toString() { - return "CreateAllocation [" + "quantity=" + quantity + ", componentId=" + componentId - + ", memo=" + memo + ", prorationDowngradeScheme=" + prorationDowngradeScheme - + ", prorationUpgradeScheme=" + prorationUpgradeScheme + ", accrueCharge=" - + accrueCharge + ", downgradeCredit=" + downgradeCredit + ", upgradeCharge=" - + upgradeCharge + ", initiateDunning=" + initiateDunning + ", pricePointId=" - + pricePointId + ", billingSchedule=" + billingSchedule + ", additionalProperties=" + return "CreateAllocation [" + "quantity=" + quantity + ", decimalQuantity=" + + decimalQuantity + ", previousQuantity=" + previousQuantity + + ", decimalPreviousQuantity=" + decimalPreviousQuantity + ", componentId=" + + componentId + ", memo=" + memo + ", prorationDowngradeScheme=" + + prorationDowngradeScheme + ", prorationUpgradeScheme=" + prorationUpgradeScheme + + ", downgradeCredit=" + downgradeCredit + ", upgradeCharge=" + upgradeCharge + + ", accrueCharge=" + accrueCharge + ", initiateDunning=" + initiateDunning + + ", pricePointId=" + pricePointId + ", billingSchedule=" + billingSchedule + + ", customPrice=" + customPrice + ", additionalProperties=" + getAdditionalProperties() + "]"; } @@ -450,13 +590,17 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder(quantity) + .decimalQuantity(getDecimalQuantity()) + .previousQuantity(getPreviousQuantity()) + .decimalPreviousQuantity(getDecimalPreviousQuantity()) .componentId(getComponentId()) .memo(getMemo()) .prorationDowngradeScheme(getProrationDowngradeScheme()) .prorationUpgradeScheme(getProrationUpgradeScheme()) .accrueCharge(getAccrueCharge()) .initiateDunning(getInitiateDunning()) - .billingSchedule(getBillingSchedule()); + .billingSchedule(getBillingSchedule()) + .customPrice(getCustomPrice()); builder.downgradeCredit = internalGetDowngradeCredit(); builder.upgradeCharge = internalGetUpgradeCharge(); builder.pricePointId = internalGetPricePointId(); @@ -468,16 +612,20 @@ public Builder toBuilder() { */ public static class Builder { private double quantity; + private String decimalQuantity; + private Double previousQuantity; + private String decimalPreviousQuantity; private Integer componentId; private String memo; private String prorationDowngradeScheme; private String prorationUpgradeScheme; + private OptionalNullable downgradeCredit; + private OptionalNullable upgradeCharge; private Boolean accrueCharge; - private OptionalNullable downgradeCredit; - private OptionalNullable upgradeCharge; private Boolean initiateDunning; private OptionalNullable pricePointId; private BillingSchedule billingSchedule; + private ComponentCustomPrice customPrice; /** * Initialization constructor. @@ -503,6 +651,36 @@ public Builder quantity(double quantity) { return this; } + /** + * Setter for decimalQuantity. + * @param decimalQuantity String value for decimalQuantity. + * @return Builder + */ + public Builder decimalQuantity(String decimalQuantity) { + this.decimalQuantity = decimalQuantity; + return this; + } + + /** + * Setter for previousQuantity. + * @param previousQuantity Double value for previousQuantity. + * @return Builder + */ + public Builder previousQuantity(Double previousQuantity) { + this.previousQuantity = previousQuantity; + return this; + } + + /** + * Setter for decimalPreviousQuantity. + * @param decimalPreviousQuantity String value for decimalPreviousQuantity. + * @return Builder + */ + public Builder decimalPreviousQuantity(String decimalPreviousQuantity) { + this.decimalPreviousQuantity = decimalPreviousQuantity; + return this; + } + /** * Setter for componentId. * @param componentId Integer value for componentId. @@ -543,22 +721,12 @@ public Builder prorationUpgradeScheme(String prorationUpgradeScheme) { return this; } - /** - * Setter for accrueCharge. - * @param accrueCharge Boolean value for accrueCharge. - * @return Builder - */ - public Builder accrueCharge(Boolean accrueCharge) { - this.accrueCharge = accrueCharge; - return this; - } - /** * Setter for downgradeCredit. - * @param downgradeCredit CreditType value for downgradeCredit. + * @param downgradeCredit DowngradeCreditCreditType value for downgradeCredit. * @return Builder */ - public Builder downgradeCredit(CreditType downgradeCredit) { + public Builder downgradeCredit(DowngradeCreditCreditType downgradeCredit) { this.downgradeCredit = OptionalNullable.of(downgradeCredit); return this; } @@ -574,10 +742,10 @@ public Builder unsetDowngradeCredit() { /** * Setter for upgradeCharge. - * @param upgradeCharge CreditType value for upgradeCharge. + * @param upgradeCharge UpgradeChargeCreditType value for upgradeCharge. * @return Builder */ - public Builder upgradeCharge(CreditType upgradeCharge) { + public Builder upgradeCharge(UpgradeChargeCreditType upgradeCharge) { this.upgradeCharge = OptionalNullable.of(upgradeCharge); return this; } @@ -591,6 +759,16 @@ public Builder unsetUpgradeCharge() { return this; } + /** + * Setter for accrueCharge. + * @param accrueCharge Boolean value for accrueCharge. + * @return Builder + */ + public Builder accrueCharge(Boolean accrueCharge) { + this.accrueCharge = accrueCharge; + return this; + } + /** * Setter for initiateDunning. * @param initiateDunning Boolean value for initiateDunning. @@ -630,14 +808,25 @@ public Builder billingSchedule(BillingSchedule billingSchedule) { return this; } + /** + * Setter for customPrice. + * @param customPrice ComponentCustomPrice value for customPrice. + * @return Builder + */ + public Builder customPrice(ComponentCustomPrice customPrice) { + this.customPrice = customPrice; + return this; + } + /** * Builds a new {@link CreateAllocation} object using the set fields. * @return {@link CreateAllocation} */ public CreateAllocation build() { - return new CreateAllocation(quantity, componentId, memo, prorationDowngradeScheme, - prorationUpgradeScheme, accrueCharge, downgradeCredit, upgradeCharge, - initiateDunning, pricePointId, billingSchedule); + return new CreateAllocation(quantity, decimalQuantity, previousQuantity, + decimalPreviousQuantity, componentId, memo, prorationDowngradeScheme, + prorationUpgradeScheme, downgradeCredit, upgradeCharge, accrueCharge, + initiateDunning, pricePointId, billingSchedule, customPrice); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java index b0c86d22..6f0ce2d0 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java @@ -466,7 +466,8 @@ public void setProductPricePointId(Integer productPricePointId) { /** * Getter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @return Returns the SubscriptionCustomPrice */ @JsonGetter("custom_price") @@ -478,7 +479,8 @@ public SubscriptionCustomPrice getCustomPrice() { /** * Setter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @param customPrice Value for SubscriptionCustomPrice */ @JsonSetter("custom_price") diff --git a/src/main/java/com/maxio/advancedbilling/models/CurrencyOveragePrices.java b/src/main/java/com/maxio/advancedbilling/models/CurrencyOveragePrices.java new file mode 100644 index 00000000..09a2261b --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/CurrencyOveragePrices.java @@ -0,0 +1,1236 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; +import java.time.ZonedDateTime; +import java.util.List; + +/** + * This is a model class for CurrencyOveragePrices type. + */ +public class CurrencyOveragePrices + extends BaseModel { + private Integer id; + private PricePointType type; + private Boolean mDefault; + private String name; + private PricingScheme pricingScheme; + private Integer componentId; + private OptionalNullable handle; + private OptionalNullable archivedAt; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; + private List prices; + private Boolean useSiteExchangeRate; + private Integer subscriptionId; + private Boolean taxIncluded; + private OptionalNullable interval; + private OptionalNullable intervalUnit; + private List currencyPrices; + private List overagePrices; + private PricingScheme overagePricingScheme; + private Boolean renewPrepaidAllocation; + private Boolean rolloverPrepaidRemainder; + private OptionalNullable expirationInterval; + private OptionalNullable expirationIntervalUnit; + private List currencyOveragePrices; + + /** + * Default constructor. + */ + public CurrencyOveragePrices() { + } + + /** + * 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 PricingScheme value for pricingScheme. + * @param componentId Integer value for componentId. + * @param handle String value for handle. + * @param archivedAt ZonedDateTime value for archivedAt. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. + * @param prices List of ComponentPrice value for prices. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param subscriptionId Integer value for subscriptionId. + * @param taxIncluded Boolean value for taxIncluded. + * @param interval Integer value for interval. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @param currencyPrices List of ComponentCurrencyPrice value for currencyPrices. + * @param overagePrices List of ComponentPrice value for overagePrices. + * @param overagePricingScheme PricingScheme value for overagePricingScheme. + * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. + * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder. + * @param expirationInterval Integer value for expirationInterval. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + * @param currencyOveragePrices List of ComponentCurrencyPrice value for + * currencyOveragePrices. + */ + public CurrencyOveragePrices( + Integer id, + PricePointType type, + Boolean mDefault, + String name, + PricingScheme pricingScheme, + Integer componentId, + String handle, + ZonedDateTime archivedAt, + ZonedDateTime createdAt, + ZonedDateTime updatedAt, + List prices, + Boolean useSiteExchangeRate, + Integer subscriptionId, + Boolean taxIncluded, + Integer interval, + IntervalUnit intervalUnit, + List currencyPrices, + List overagePrices, + PricingScheme overagePricingScheme, + Boolean renewPrepaidAllocation, + Boolean rolloverPrepaidRemainder, + Integer expirationInterval, + ExpirationIntervalUnit expirationIntervalUnit, + List currencyOveragePrices) { + this.id = id; + this.type = type; + this.mDefault = mDefault; + this.name = name; + this.pricingScheme = pricingScheme; + this.componentId = componentId; + this.handle = OptionalNullable.of(handle); + this.archivedAt = OptionalNullable.of(archivedAt); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.prices = prices; + this.useSiteExchangeRate = useSiteExchangeRate; + this.subscriptionId = subscriptionId; + this.taxIncluded = taxIncluded; + this.interval = OptionalNullable.of(interval); + this.intervalUnit = OptionalNullable.of(intervalUnit); + this.currencyPrices = currencyPrices; + this.overagePrices = overagePrices; + this.overagePricingScheme = overagePricingScheme; + this.renewPrepaidAllocation = renewPrepaidAllocation; + this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; + this.expirationInterval = OptionalNullable.of(expirationInterval); + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + this.currencyOveragePrices = currencyOveragePrices; + } + + /** + * 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 PricingScheme value for pricingScheme. + * @param componentId Integer value for componentId. + * @param handle String value for handle. + * @param archivedAt ZonedDateTime value for archivedAt. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. + * @param prices List of ComponentPrice value for prices. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @param subscriptionId Integer value for subscriptionId. + * @param taxIncluded Boolean value for taxIncluded. + * @param interval Integer value for interval. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @param currencyPrices List of ComponentCurrencyPrice value for currencyPrices. + * @param overagePrices List of ComponentPrice value for overagePrices. + * @param overagePricingScheme PricingScheme value for overagePricingScheme. + * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. + * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder. + * @param expirationInterval Integer value for expirationInterval. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + * @param currencyOveragePrices List of ComponentCurrencyPrice value for + * currencyOveragePrices. + */ + + protected CurrencyOveragePrices(Integer id, PricePointType type, Boolean mDefault, String name, + PricingScheme pricingScheme, Integer componentId, OptionalNullable handle, + OptionalNullable archivedAt, ZonedDateTime createdAt, + ZonedDateTime updatedAt, List prices, Boolean useSiteExchangeRate, + Integer subscriptionId, Boolean taxIncluded, OptionalNullable interval, + OptionalNullable intervalUnit, + List currencyPrices, List overagePrices, + PricingScheme overagePricingScheme, Boolean renewPrepaidAllocation, + Boolean rolloverPrepaidRemainder, OptionalNullable expirationInterval, + OptionalNullable expirationIntervalUnit, + List currencyOveragePrices) { + this.id = id; + this.type = type; + this.mDefault = mDefault; + this.name = name; + this.pricingScheme = pricingScheme; + this.componentId = componentId; + this.handle = handle; + this.archivedAt = archivedAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.prices = prices; + this.useSiteExchangeRate = useSiteExchangeRate; + this.subscriptionId = subscriptionId; + this.taxIncluded = taxIncluded; + this.interval = interval; + this.intervalUnit = intervalUnit; + this.currencyPrices = currencyPrices; + this.overagePrices = overagePrices; + this.overagePricingScheme = overagePricingScheme; + this.renewPrepaidAllocation = renewPrepaidAllocation; + this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; + this.expirationInterval = expirationInterval; + this.expirationIntervalUnit = expirationIntervalUnit; + this.currencyOveragePrices = currencyOveragePrices; + } + + /** + * Getter for Id. + * @return Returns the Integer + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for Integer + */ + @JsonSetter("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for Type. + * Price point type. We expose the following types: 1. **default**: a price point that is marked + * as a default price for a certain product. 2. **custom**: a custom price point. 3. + * **catalog**: a price point that is **not** marked as a default price for a certain product + * and is **not** a custom one. + * @return Returns the PricePointType + */ + @JsonGetter("type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PricePointType getType() { + return type; + } + + /** + * Setter for Type. + * Price point type. We expose the following types: 1. **default**: a price point that is marked + * as a default price for a certain product. 2. **custom**: a custom price point. 3. + * **catalog**: a price point that is **not** marked as a default price for a certain product + * and is **not** a custom one. + * @param type Value for PricePointType + */ + @JsonSetter("type") + public void setType(PricePointType type) { + this.type = type; + } + + /** + * Getter for Default. + * Note: Refer to type attribute instead + * @return Returns the Boolean + */ + @JsonGetter("default") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDefault() { + return mDefault; + } + + /** + * Setter for Default. + * Note: Refer to type attribute instead + * @param mDefault Value for Boolean + */ + @JsonSetter("default") + public void setDefault(Boolean mDefault) { + this.mDefault = mDefault; + } + + /** + * Getter for Name. + * @return Returns the String + */ + @JsonGetter("name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getName() { + return name; + } + + /** + * Setter for Name. + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for PricingScheme. + * The identifier for the pricing scheme. See [Product + * Components](https://help.chargify.com/products/product-components.html) for an overview of + * pricing schemes. + * @return Returns the PricingScheme + */ + @JsonGetter("pricing_scheme") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PricingScheme getPricingScheme() { + return pricingScheme; + } + + /** + * Setter for PricingScheme. + * The identifier for the pricing scheme. See [Product + * Components](https://help.chargify.com/products/product-components.html) for an overview of + * pricing schemes. + * @param pricingScheme Value for PricingScheme + */ + @JsonSetter("pricing_scheme") + public void setPricingScheme(PricingScheme pricingScheme) { + this.pricingScheme = pricingScheme; + } + + /** + * Getter for ComponentId. + * @return Returns the Integer + */ + @JsonGetter("component_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getComponentId() { + return componentId; + } + + /** + * Setter for ComponentId. + * @param componentId Value for Integer + */ + @JsonSetter("component_id") + public void setComponentId(Integer componentId) { + this.componentId = componentId; + } + + /** + * Internal Getter for Handle. + * @return Returns the Internal String + */ + @JsonGetter("handle") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetHandle() { + return this.handle; + } + + /** + * Getter for Handle. + * @return Returns the String + */ + public String getHandle() { + return OptionalNullable.getFrom(handle); + } + + /** + * Setter for Handle. + * @param handle Value for String + */ + @JsonSetter("handle") + public void setHandle(String handle) { + this.handle = OptionalNullable.of(handle); + } + + /** + * UnSetter for Handle. + */ + public void unsetHandle() { + handle = null; + } + + /** + * Internal Getter for ArchivedAt. + * @return Returns the Internal ZonedDateTime + */ + @JsonGetter("archived_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetArchivedAt() { + return this.archivedAt; + } + + /** + * Getter for ArchivedAt. + * @return Returns the ZonedDateTime + */ + public ZonedDateTime getArchivedAt() { + return OptionalNullable.getFrom(archivedAt); + } + + /** + * Setter for ArchivedAt. + * @param archivedAt Value for ZonedDateTime + */ + @JsonSetter("archived_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setArchivedAt(ZonedDateTime archivedAt) { + this.archivedAt = OptionalNullable.of(archivedAt); + } + + /** + * UnSetter for ArchivedAt. + */ + public void unsetArchivedAt() { + archivedAt = null; + } + + /** + * Getter for CreatedAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("created_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getCreatedAt() { + return createdAt; + } + + /** + * Setter for CreatedAt. + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for UpdatedAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("updated_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * Setter for UpdatedAt. + * @param updatedAt Value for ZonedDateTime + */ + @JsonSetter("updated_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setUpdatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * Getter for Prices. + * @return Returns the List of ComponentPrice + */ + @JsonGetter("prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getPrices() { + return prices; + } + + /** + * Setter for Prices. + * @param prices Value for List of ComponentPrice + */ + @JsonSetter("prices") + public void setPrices(List prices) { + this.prices = prices; + } + + /** + * Getter for UseSiteExchangeRate. + * Whether to use the site level exchange rate or define your own prices for each currency if + * you have multiple currencies defined on the site. Defaults to true during creation. + * @return Returns the Boolean + */ + @JsonGetter("use_site_exchange_rate") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getUseSiteExchangeRate() { + return useSiteExchangeRate; + } + + /** + * Setter for UseSiteExchangeRate. + * Whether to use the site level exchange rate or define your own prices for each currency if + * you have multiple currencies defined on the site. Defaults to true during creation. + * @param useSiteExchangeRate Value for Boolean + */ + @JsonSetter("use_site_exchange_rate") + public void setUseSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + } + + /** + * Getter for SubscriptionId. + * (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the + * subscription that the custom price point is for. + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the + * subscription that the custom price point is for. + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for TaxIncluded. + * @return Returns the Boolean + */ + @JsonGetter("tax_included") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxIncluded() { + return taxIncluded; + } + + /** + * Setter for TaxIncluded. + * @param taxIncluded Value for Boolean + */ + @JsonSetter("tax_included") + public void setTaxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + } + + /** + * Internal Getter for Interval. + * The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would + * mean this component price point would renew every 30 days. This property is only available + * for sites with Multifrequency enabled. + * @return Returns the Internal Integer + */ + @JsonGetter("interval") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetInterval() { + return this.interval; + } + + /** + * Getter for Interval. + * The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would + * mean this component price point would renew every 30 days. This property is only available + * for sites with Multifrequency enabled. + * @return Returns the Integer + */ + public Integer getInterval() { + return OptionalNullable.getFrom(interval); + } + + /** + * Setter for Interval. + * The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would + * mean this component price point would renew every 30 days. This property is only available + * for sites with Multifrequency enabled. + * @param interval Value for Integer + */ + @JsonSetter("interval") + public void setInterval(Integer interval) { + this.interval = OptionalNullable.of(interval); + } + + /** + * UnSetter for Interval. + * The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would + * mean this component price point would renew every 30 days. This property is only available + * for sites with Multifrequency enabled. + */ + public void unsetInterval() { + interval = null; + } + + /** + * Internal Getter for IntervalUnit. + * A string representing the interval unit for this component price point, either month or day. + * This property is only available for sites with Multifrequency enabled. + * @return Returns the Internal IntervalUnit + */ + @JsonGetter("interval_unit") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetIntervalUnit() { + return this.intervalUnit; + } + + /** + * Getter for IntervalUnit. + * A string representing the interval unit for this component price point, either month or day. + * This property is only available for sites with Multifrequency enabled. + * @return Returns the IntervalUnit + */ + public IntervalUnit getIntervalUnit() { + return OptionalNullable.getFrom(intervalUnit); + } + + /** + * Setter for IntervalUnit. + * A string representing the interval unit for this component price point, either month or day. + * This property is only available for sites with Multifrequency enabled. + * @param intervalUnit Value for IntervalUnit + */ + @JsonSetter("interval_unit") + public void setIntervalUnit(IntervalUnit intervalUnit) { + this.intervalUnit = OptionalNullable.of(intervalUnit); + } + + /** + * UnSetter for IntervalUnit. + * A string representing the interval unit for this component price point, either month or day. + * This property is only available for sites with Multifrequency enabled. + */ + public void unsetIntervalUnit() { + intervalUnit = null; + } + + /** + * Getter for CurrencyPrices. + * An array of currency pricing data is available when multiple currencies are defined for the + * site. It varies based on the use_site_exchange_rate setting for the price point. This + * parameter is present only in the response of read endpoints, after including the appropriate + * query parameter. The clone endpoint always returns currency prices if they are present. + * @return Returns the List of ComponentCurrencyPrice + */ + @JsonGetter("currency_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCurrencyPrices() { + return currencyPrices; + } + + /** + * Setter for CurrencyPrices. + * An array of currency pricing data is available when multiple currencies are defined for the + * site. It varies based on the use_site_exchange_rate setting for the price point. This + * parameter is present only in the response of read endpoints, after including the appropriate + * query parameter. The clone endpoint always returns currency prices if they are present. + * @param currencyPrices Value for List of ComponentCurrencyPrice + */ + @JsonSetter("currency_prices") + public void setCurrencyPrices(List currencyPrices) { + this.currencyPrices = currencyPrices; + } + + /** + * Getter for OveragePrices. + * Applicable only to prepaid usage components. An array of overage price brackets. + * @return Returns the List of ComponentPrice + */ + @JsonGetter("overage_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getOveragePrices() { + return overagePrices; + } + + /** + * Setter for OveragePrices. + * Applicable only to prepaid usage components. An array of overage price brackets. + * @param overagePrices Value for List of ComponentPrice + */ + @JsonSetter("overage_prices") + public void setOveragePrices(List overagePrices) { + this.overagePrices = overagePrices; + } + + /** + * Getter for OveragePricingScheme. + * Applicable only to prepaid usage components. Pricing scheme for overage pricing. + * @return Returns the PricingScheme + */ + @JsonGetter("overage_pricing_scheme") + @JsonInclude(JsonInclude.Include.NON_NULL) + public PricingScheme getOveragePricingScheme() { + return overagePricingScheme; + } + + /** + * Setter for OveragePricingScheme. + * Applicable only to prepaid usage components. Pricing scheme for overage pricing. + * @param overagePricingScheme Value for PricingScheme + */ + @JsonSetter("overage_pricing_scheme") + public void setOveragePricingScheme(PricingScheme overagePricingScheme) { + this.overagePricingScheme = overagePricingScheme; + } + + /** + * Getter for RenewPrepaidAllocation. + * Applicable only to prepaid usage components. Boolean which controls whether or not the + * allocated quantity should be renewed at the beginning of each period. + * @return Returns the Boolean + */ + @JsonGetter("renew_prepaid_allocation") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getRenewPrepaidAllocation() { + return renewPrepaidAllocation; + } + + /** + * Setter for RenewPrepaidAllocation. + * Applicable only to prepaid usage components. Boolean which controls whether or not the + * allocated quantity should be renewed at the beginning of each period. + * @param renewPrepaidAllocation Value for Boolean + */ + @JsonSetter("renew_prepaid_allocation") + public void setRenewPrepaidAllocation(Boolean renewPrepaidAllocation) { + this.renewPrepaidAllocation = renewPrepaidAllocation; + } + + /** + * Getter for RolloverPrepaidRemainder. + * Applicable only to prepaid usage components. Boolean which controls whether or not remaining + * units should be rolled over to the next period. + * @return Returns the Boolean + */ + @JsonGetter("rollover_prepaid_remainder") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getRolloverPrepaidRemainder() { + return rolloverPrepaidRemainder; + } + + /** + * Setter for RolloverPrepaidRemainder. + * Applicable only to prepaid usage components. Boolean which controls whether or not remaining + * units should be rolled over to the next period. + * @param rolloverPrepaidRemainder Value for Boolean + */ + @JsonSetter("rollover_prepaid_remainder") + public void setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) { + this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; + } + + /** + * Internal Getter for ExpirationInterval. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The + * number of `expiration_interval_unit`s after which rollover amounts should expire. + * @return Returns the Internal Integer + */ + @JsonGetter("expiration_interval") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetExpirationInterval() { + return this.expirationInterval; + } + + /** + * Getter for ExpirationInterval. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The + * number of `expiration_interval_unit`s after which rollover amounts should expire. + * @return Returns the Integer + */ + public Integer getExpirationInterval() { + return OptionalNullable.getFrom(expirationInterval); + } + + /** + * Setter for ExpirationInterval. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The + * number of `expiration_interval_unit`s after which rollover amounts should expire. + * @param expirationInterval Value for Integer + */ + @JsonSetter("expiration_interval") + public void setExpirationInterval(Integer expirationInterval) { + this.expirationInterval = OptionalNullable.of(expirationInterval); + } + + /** + * UnSetter for ExpirationInterval. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The + * number of `expiration_interval_unit`s after which rollover amounts should expire. + */ + public void unsetExpirationInterval() { + expirationInterval = null; + } + + /** + * Internal Getter for ExpirationIntervalUnit. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A + * string representing the expiration interval unit for this component, either month or day. + * @return Returns the Internal ExpirationIntervalUnit + */ + @JsonGetter("expiration_interval_unit") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetExpirationIntervalUnit() { + return this.expirationIntervalUnit; + } + + /** + * Getter for ExpirationIntervalUnit. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A + * string representing the expiration interval unit for this component, either month or day. + * @return Returns the ExpirationIntervalUnit + */ + public ExpirationIntervalUnit getExpirationIntervalUnit() { + return OptionalNullable.getFrom(expirationIntervalUnit); + } + + /** + * Setter for ExpirationIntervalUnit. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A + * string representing the expiration interval unit for this component, either month or day. + * @param expirationIntervalUnit Value for ExpirationIntervalUnit + */ + @JsonSetter("expiration_interval_unit") + public void setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) { + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + } + + /** + * UnSetter for ExpirationIntervalUnit. + * Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A + * string representing the expiration interval unit for this component, either month or day. + */ + public void unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; + } + + /** + * Getter for CurrencyOveragePrices. + * Applicable only to prepaid usage components. An array of currency pricing data for overage + * prices. + * @return Returns the List of ComponentCurrencyPrice + */ + @JsonGetter("currency_overage_prices") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCurrencyOveragePrices() { + return currencyOveragePrices; + } + + /** + * Setter for CurrencyOveragePrices. + * Applicable only to prepaid usage components. An array of currency pricing data for overage + * prices. + * @param currencyOveragePrices Value for List of ComponentCurrencyPrice + */ + @JsonSetter("currency_overage_prices") + public void setCurrencyOveragePrices(List currencyOveragePrices) { + this.currencyOveragePrices = currencyOveragePrices; + } + + /** + * Converts this CurrencyOveragePrices into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "CurrencyOveragePrices [" + "id=" + id + ", type=" + type + ", mDefault=" + mDefault + + ", name=" + name + ", pricingScheme=" + pricingScheme + ", componentId=" + + componentId + ", handle=" + handle + ", archivedAt=" + archivedAt + ", createdAt=" + + createdAt + ", updatedAt=" + updatedAt + ", prices=" + prices + + ", useSiteExchangeRate=" + useSiteExchangeRate + ", subscriptionId=" + + subscriptionId + ", taxIncluded=" + taxIncluded + ", interval=" + interval + + ", intervalUnit=" + intervalUnit + ", currencyPrices=" + currencyPrices + + ", overagePrices=" + overagePrices + ", overagePricingScheme=" + + overagePricingScheme + ", renewPrepaidAllocation=" + renewPrepaidAllocation + + ", rolloverPrepaidRemainder=" + rolloverPrepaidRemainder + ", expirationInterval=" + + expirationInterval + ", expirationIntervalUnit=" + expirationIntervalUnit + + ", currencyOveragePrices=" + currencyOveragePrices + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link CurrencyOveragePrices.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link CurrencyOveragePrices.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .type(getType()) + .mDefault(getDefault()) + .name(getName()) + .pricingScheme(getPricingScheme()) + .componentId(getComponentId()) + .createdAt(getCreatedAt()) + .updatedAt(getUpdatedAt()) + .prices(getPrices()) + .useSiteExchangeRate(getUseSiteExchangeRate()) + .subscriptionId(getSubscriptionId()) + .taxIncluded(getTaxIncluded()) + .currencyPrices(getCurrencyPrices()) + .overagePrices(getOveragePrices()) + .overagePricingScheme(getOveragePricingScheme()) + .renewPrepaidAllocation(getRenewPrepaidAllocation()) + .rolloverPrepaidRemainder(getRolloverPrepaidRemainder()) + .currencyOveragePrices(getCurrencyOveragePrices()); + builder.handle = internalGetHandle(); + builder.archivedAt = internalGetArchivedAt(); + builder.interval = internalGetInterval(); + builder.intervalUnit = internalGetIntervalUnit(); + builder.expirationInterval = internalGetExpirationInterval(); + builder.expirationIntervalUnit = internalGetExpirationIntervalUnit(); + return builder; + } + + /** + * Class to build instances of {@link CurrencyOveragePrices}. + */ + public static class Builder { + private Integer id; + private PricePointType type; + private Boolean mDefault; + private String name; + private PricingScheme pricingScheme; + private Integer componentId; + private OptionalNullable handle; + private OptionalNullable archivedAt; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; + private List prices; + private Boolean useSiteExchangeRate; + private Integer subscriptionId; + private Boolean taxIncluded; + private OptionalNullable interval; + private OptionalNullable intervalUnit; + private List currencyPrices; + private List overagePrices; + private PricingScheme overagePricingScheme; + private Boolean renewPrepaidAllocation; + private Boolean rolloverPrepaidRemainder; + private OptionalNullable expirationInterval; + private OptionalNullable expirationIntervalUnit; + private List currencyOveragePrices; + + + + /** + * Setter for id. + * @param id Integer value for id. + * @return Builder + */ + public Builder id(Integer id) { + this.id = id; + return this; + } + + /** + * Setter for type. + * @param type PricePointType value for type. + * @return Builder + */ + public Builder type(PricePointType type) { + this.type = type; + return this; + } + + /** + * Setter for mDefault. + * @param mDefault Boolean value for mDefault. + * @return Builder + */ + public Builder mDefault(Boolean mDefault) { + this.mDefault = mDefault; + 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 pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. + * @return Builder + */ + public Builder pricingScheme(PricingScheme pricingScheme) { + this.pricingScheme = pricingScheme; + return this; + } + + /** + * Setter for componentId. + * @param componentId Integer value for componentId. + * @return Builder + */ + public Builder componentId(Integer componentId) { + this.componentId = componentId; + return this; + } + + /** + * Setter for handle. + * @param handle String value for handle. + * @return Builder + */ + public Builder handle(String handle) { + this.handle = OptionalNullable.of(handle); + return this; + } + + /** + * UnSetter for handle. + * @return Builder + */ + public Builder unsetHandle() { + handle = null; + return this; + } + + /** + * Setter for archivedAt. + * @param archivedAt ZonedDateTime value for archivedAt. + * @return Builder + */ + public Builder archivedAt(ZonedDateTime archivedAt) { + this.archivedAt = OptionalNullable.of(archivedAt); + return this; + } + + /** + * UnSetter for archivedAt. + * @return Builder + */ + public Builder unsetArchivedAt() { + archivedAt = null; + return this; + } + + /** + * Setter for createdAt. + * @param createdAt ZonedDateTime value for createdAt. + * @return Builder + */ + public Builder createdAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Setter for updatedAt. + * @param updatedAt ZonedDateTime value for updatedAt. + * @return Builder + */ + public Builder updatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Setter for prices. + * @param prices List of ComponentPrice value for prices. + * @return Builder + */ + public Builder prices(List prices) { + this.prices = prices; + return this; + } + + /** + * Setter for useSiteExchangeRate. + * @param useSiteExchangeRate Boolean value for useSiteExchangeRate. + * @return Builder + */ + public Builder useSiteExchangeRate(Boolean useSiteExchangeRate) { + this.useSiteExchangeRate = useSiteExchangeRate; + return this; + } + + /** + * Setter for subscriptionId. + * @param subscriptionId Integer value for subscriptionId. + * @return Builder + */ + public Builder subscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Setter for taxIncluded. + * @param taxIncluded Boolean value for taxIncluded. + * @return Builder + */ + public Builder taxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + return this; + } + + /** + * Setter for interval. + * @param interval Integer value for interval. + * @return Builder + */ + public Builder interval(Integer interval) { + this.interval = OptionalNullable.of(interval); + return this; + } + + /** + * UnSetter for interval. + * @return Builder + */ + public Builder unsetInterval() { + interval = null; + return this; + } + + /** + * Setter for intervalUnit. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @return Builder + */ + public Builder intervalUnit(IntervalUnit intervalUnit) { + this.intervalUnit = OptionalNullable.of(intervalUnit); + return this; + } + + /** + * UnSetter for intervalUnit. + * @return Builder + */ + public Builder unsetIntervalUnit() { + intervalUnit = null; + return this; + } + + /** + * Setter for currencyPrices. + * @param currencyPrices List of ComponentCurrencyPrice value for currencyPrices. + * @return Builder + */ + public Builder currencyPrices(List currencyPrices) { + this.currencyPrices = currencyPrices; + return this; + } + + /** + * Setter for overagePrices. + * @param overagePrices List of ComponentPrice value for overagePrices. + * @return Builder + */ + public Builder overagePrices(List overagePrices) { + this.overagePrices = overagePrices; + return this; + } + + /** + * Setter for overagePricingScheme. + * @param overagePricingScheme PricingScheme value for overagePricingScheme. + * @return Builder + */ + public Builder overagePricingScheme(PricingScheme overagePricingScheme) { + this.overagePricingScheme = overagePricingScheme; + return this; + } + + /** + * Setter for renewPrepaidAllocation. + * @param renewPrepaidAllocation Boolean value for renewPrepaidAllocation. + * @return Builder + */ + public Builder renewPrepaidAllocation(Boolean renewPrepaidAllocation) { + this.renewPrepaidAllocation = renewPrepaidAllocation; + return this; + } + + /** + * Setter for rolloverPrepaidRemainder. + * @param rolloverPrepaidRemainder Boolean value for rolloverPrepaidRemainder. + * @return Builder + */ + public Builder rolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) { + this.rolloverPrepaidRemainder = rolloverPrepaidRemainder; + return this; + } + + /** + * Setter for expirationInterval. + * @param expirationInterval Integer value for expirationInterval. + * @return Builder + */ + public Builder expirationInterval(Integer expirationInterval) { + this.expirationInterval = OptionalNullable.of(expirationInterval); + return this; + } + + /** + * UnSetter for expirationInterval. + * @return Builder + */ + public Builder unsetExpirationInterval() { + expirationInterval = null; + return this; + } + + /** + * Setter for expirationIntervalUnit. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + * @return Builder + */ + public Builder expirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) { + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + return this; + } + + /** + * UnSetter for expirationIntervalUnit. + * @return Builder + */ + public Builder unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; + return this; + } + + /** + * Setter for currencyOveragePrices. + * @param currencyOveragePrices List of ComponentCurrencyPrice value for + * currencyOveragePrices. + * @return Builder + */ + public Builder currencyOveragePrices(List currencyOveragePrices) { + this.currencyOveragePrices = currencyOveragePrices; + return this; + } + + /** + * Builds a new {@link CurrencyOveragePrices} object using the set fields. + * @return {@link CurrencyOveragePrices} + */ + public CurrencyOveragePrices build() { + return new CurrencyOveragePrices(id, type, mDefault, name, pricingScheme, componentId, + handle, archivedAt, createdAt, updatedAt, prices, useSiteExchangeRate, + subscriptionId, taxIncluded, interval, intervalUnit, currencyPrices, + overagePrices, overagePricingScheme, renewPrepaidAllocation, + rolloverPrepaidRemainder, expirationInterval, expirationIntervalUnit, + currencyOveragePrices); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/DeliverProformaInvoiceRequest.java b/src/main/java/com/maxio/advancedbilling/models/DeliverProformaInvoiceRequest.java new file mode 100644 index 00000000..b3fec573 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/DeliverProformaInvoiceRequest.java @@ -0,0 +1,175 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for DeliverProformaInvoiceRequest type. + */ +public class DeliverProformaInvoiceRequest + extends BaseModel { + private List recipientEmails; + private List ccRecipientEmails; + private List bccRecipientEmails; + + /** + * Default constructor. + */ + public DeliverProformaInvoiceRequest() { + } + + /** + * Initialization constructor. + * @param recipientEmails List of String value for recipientEmails. + * @param ccRecipientEmails List of String value for ccRecipientEmails. + * @param bccRecipientEmails List of String value for bccRecipientEmails. + */ + public DeliverProformaInvoiceRequest( + List recipientEmails, + List ccRecipientEmails, + List bccRecipientEmails) { + this.recipientEmails = recipientEmails; + this.ccRecipientEmails = ccRecipientEmails; + this.bccRecipientEmails = bccRecipientEmails; + } + + /** + * Getter for RecipientEmails. + * @return Returns the List of String + */ + @JsonGetter("recipient_emails") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getRecipientEmails() { + return recipientEmails; + } + + /** + * Setter for RecipientEmails. + * @param recipientEmails Value for List of String + */ + @JsonSetter("recipient_emails") + public void setRecipientEmails(List recipientEmails) { + this.recipientEmails = recipientEmails; + } + + /** + * Getter for CcRecipientEmails. + * @return Returns the List of String + */ + @JsonGetter("cc_recipient_emails") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getCcRecipientEmails() { + return ccRecipientEmails; + } + + /** + * Setter for CcRecipientEmails. + * @param ccRecipientEmails Value for List of String + */ + @JsonSetter("cc_recipient_emails") + public void setCcRecipientEmails(List ccRecipientEmails) { + this.ccRecipientEmails = ccRecipientEmails; + } + + /** + * Getter for BccRecipientEmails. + * @return Returns the List of String + */ + @JsonGetter("bcc_recipient_emails") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getBccRecipientEmails() { + return bccRecipientEmails; + } + + /** + * Setter for BccRecipientEmails. + * @param bccRecipientEmails Value for List of String + */ + @JsonSetter("bcc_recipient_emails") + public void setBccRecipientEmails(List bccRecipientEmails) { + this.bccRecipientEmails = bccRecipientEmails; + } + + /** + * Converts this DeliverProformaInvoiceRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "DeliverProformaInvoiceRequest [" + "recipientEmails=" + recipientEmails + + ", ccRecipientEmails=" + ccRecipientEmails + ", bccRecipientEmails=" + + bccRecipientEmails + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link DeliverProformaInvoiceRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link DeliverProformaInvoiceRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .recipientEmails(getRecipientEmails()) + .ccRecipientEmails(getCcRecipientEmails()) + .bccRecipientEmails(getBccRecipientEmails()); + return builder; + } + + /** + * Class to build instances of {@link DeliverProformaInvoiceRequest}. + */ + public static class Builder { + private List recipientEmails; + private List ccRecipientEmails; + private List bccRecipientEmails; + + + + /** + * Setter for recipientEmails. + * @param recipientEmails List of String value for recipientEmails. + * @return Builder + */ + public Builder recipientEmails(List recipientEmails) { + this.recipientEmails = recipientEmails; + return this; + } + + /** + * Setter for ccRecipientEmails. + * @param ccRecipientEmails List of String value for ccRecipientEmails. + * @return Builder + */ + public Builder ccRecipientEmails(List ccRecipientEmails) { + this.ccRecipientEmails = ccRecipientEmails; + return this; + } + + /** + * Setter for bccRecipientEmails. + * @param bccRecipientEmails List of String value for bccRecipientEmails. + * @return Builder + */ + public Builder bccRecipientEmails(List bccRecipientEmails) { + this.bccRecipientEmails = bccRecipientEmails; + return this; + } + + /** + * Builds a new {@link DeliverProformaInvoiceRequest} object using the set fields. + * @return {@link DeliverProformaInvoiceRequest} + */ + public DeliverProformaInvoiceRequest build() { + return new DeliverProformaInvoiceRequest(recipientEmails, ccRecipientEmails, + bccRecipientEmails); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/DowngradeCreditCreditType.java b/src/main/java/com/maxio/advancedbilling/models/DowngradeCreditCreditType.java new file mode 100644 index 00000000..93d85762 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/DowngradeCreditCreditType.java @@ -0,0 +1,96 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; + + +/** + * DowngradeCreditCreditType to be used. + */ +public enum DowngradeCreditCreditType { + FULL, + + PRORATED, + + NONE; + + + private static TreeMap valueMap = new TreeMap<>(); + private String value; + + static { + FULL.value = "full"; + PRORATED.value = "prorated"; + NONE.value = "none"; + + valueMap.put("full", FULL); + valueMap.put("prorated", PRORATED); + valueMap.put("none", NONE); + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + * @throws IOException when provided value is not mapped to any enum member. + */ + @JsonCreator + public static DowngradeCreditCreditType constructFromString(String toConvert) throws IOException { + DowngradeCreditCreditType enumValue = fromString(toConvert); + if (enumValue == null) { + throw new IOException("Unable to create enum instance with value: " + toConvert); + } + return enumValue; + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + */ + public static DowngradeCreditCreditType fromString(String toConvert) { + return valueMap.get(toConvert); + } + + /** + * Returns the string value associated with the enum member. + * @return The string value against enum member. + */ + @JsonValue + public String value() { + return value; + } + + /** + * Get string representation of this enum. + */ + @Override + public String toString() { + return value.toString(); + } + + /** + * Convert list of DowngradeCreditCreditType values to list of string values. + * @param toConvert The list of DowngradeCreditCreditType values to convert. + * @return List of representative string values. + */ + public static List toValue(List toConvert) { + if (toConvert == null) { + return null; + } + List convertedValues = new ArrayList<>(); + for (DowngradeCreditCreditType enumValue : toConvert) { + convertedValues.add(enumValue.value); + } + return convertedValues; + } +} \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java index e2eef81a..a133de4b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListPrepaymentsInput.java @@ -47,7 +47,7 @@ public ListPrepaymentsInput( /** * Getter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @return Returns the int */ @JsonGetter("subscription_id") @@ -57,7 +57,7 @@ public int getSubscriptionId() { /** * Setter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @param subscriptionId Value for int */ @JsonSetter("subscription_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java index d27bf88c..88cc7002 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListProformaInvoicesInput.java @@ -90,7 +90,7 @@ public ListProformaInvoicesInput( /** * Getter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @return Returns the int */ @JsonGetter("subscription_id") @@ -100,7 +100,7 @@ public int getSubscriptionId() { /** * Setter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @param subscriptionId Value for int */ @JsonSetter("subscription_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java index 7d166b22..2d18ca0d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionComponentsInput.java @@ -82,7 +82,7 @@ public ListSubscriptionComponentsInput( /** * Getter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @return Returns the int */ @JsonGetter("subscription_id") @@ -92,7 +92,7 @@ public int getSubscriptionId() { /** * Setter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @param subscriptionId Value for int */ @JsonSetter("subscription_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java index e1145d59..593a288b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionEventsInput.java @@ -61,7 +61,7 @@ public ListSubscriptionEventsInput( /** * Getter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @return Returns the int */ @JsonGetter("subscription_id") @@ -71,7 +71,7 @@ public int getSubscriptionId() { /** * Setter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @param subscriptionId Value for int */ @JsonSetter("subscription_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java index 61727b27..10836ebf 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionNotesInput.java @@ -43,7 +43,7 @@ public ListSubscriptionNotesInput( /** * Getter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @return Returns the int */ @JsonGetter("subscription_id") @@ -53,7 +53,7 @@ public int getSubscriptionId() { /** * Setter for SubscriptionId. - * The Chargify id of the subscription + * The Chargify id of the subscription. * @param subscriptionId Value for int */ @JsonSetter("subscription_id") diff --git a/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java b/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java index 2d8faf84..31ccb49b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/OnOffComponent.java @@ -227,7 +227,7 @@ public void setTaxable(Boolean taxable) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -240,7 +240,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -250,7 +250,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -261,7 +261,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -270,7 +270,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -283,7 +283,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -293,7 +293,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -304,7 +304,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java b/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java index eb51a572..f485a76d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/PrepaidUsageComponent.java @@ -341,7 +341,7 @@ public void setPrices(List prices) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -354,7 +354,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -364,7 +364,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -375,7 +375,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -384,7 +384,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -397,7 +397,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -407,7 +407,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -418,7 +418,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/PreviewAllocationsRequest.java b/src/main/java/com/maxio/advancedbilling/models/PreviewAllocationsRequest.java index 428bfa12..3b474d6f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PreviewAllocationsRequest.java +++ b/src/main/java/com/maxio/advancedbilling/models/PreviewAllocationsRequest.java @@ -114,7 +114,7 @@ public void setEffectiveProrationDate(LocalDate effectiveProrationDate) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -127,7 +127,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -137,7 +137,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -148,7 +148,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -157,7 +157,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -170,7 +170,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -180,7 +180,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -191,7 +191,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java b/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java index a5bf38c3..aef758f3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProductFamily.java @@ -28,6 +28,7 @@ public class ProductFamily private OptionalNullable description; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; + private OptionalNullable archivedAt; /** * Default constructor. @@ -44,6 +45,7 @@ public ProductFamily() { * @param description String value for description. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. + * @param archivedAt ZonedDateTime value for archivedAt. */ public ProductFamily( Integer id, @@ -52,7 +54,8 @@ public ProductFamily( String accountingCode, String description, ZonedDateTime createdAt, - ZonedDateTime updatedAt) { + ZonedDateTime updatedAt, + ZonedDateTime archivedAt) { this.id = id; this.name = name; this.handle = handle; @@ -60,6 +63,7 @@ public ProductFamily( this.description = OptionalNullable.of(description); this.createdAt = createdAt; this.updatedAt = updatedAt; + this.archivedAt = OptionalNullable.of(archivedAt); } /** @@ -71,11 +75,13 @@ public ProductFamily( * @param description String value for description. * @param createdAt ZonedDateTime value for createdAt. * @param updatedAt ZonedDateTime value for updatedAt. + * @param archivedAt ZonedDateTime value for archivedAt. */ protected ProductFamily(Integer id, String name, String handle, OptionalNullable accountingCode, OptionalNullable description, - ZonedDateTime createdAt, ZonedDateTime updatedAt) { + ZonedDateTime createdAt, ZonedDateTime updatedAt, + OptionalNullable archivedAt) { this.id = id; this.name = name; this.handle = handle; @@ -83,6 +89,7 @@ protected ProductFamily(Integer id, String name, String handle, this.description = description; this.createdAt = createdAt; this.updatedAt = updatedAt; + this.archivedAt = archivedAt; } /** @@ -254,6 +261,50 @@ public void setUpdatedAt(ZonedDateTime updatedAt) { this.updatedAt = updatedAt; } + /** + * Internal Getter for ArchivedAt. + * Timestamp indicating when this product family was archived. `null` if the product family is + * not archived. + * @return Returns the Internal ZonedDateTime + */ + @JsonGetter("archived_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.ZonedRfc8601DateTimeSerializer.class) + protected OptionalNullable internalGetArchivedAt() { + return this.archivedAt; + } + + /** + * Getter for ArchivedAt. + * Timestamp indicating when this product family was archived. `null` if the product family is + * not archived. + * @return Returns the ZonedDateTime + */ + public ZonedDateTime getArchivedAt() { + return OptionalNullable.getFrom(archivedAt); + } + + /** + * Setter for ArchivedAt. + * Timestamp indicating when this product family was archived. `null` if the product family is + * not archived. + * @param archivedAt Value for ZonedDateTime + */ + @JsonSetter("archived_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setArchivedAt(ZonedDateTime archivedAt) { + this.archivedAt = OptionalNullable.of(archivedAt); + } + + /** + * UnSetter for ArchivedAt. + * Timestamp indicating when this product family was archived. `null` if the product family is + * not archived. + */ + public void unsetArchivedAt() { + archivedAt = null; + } + /** * Converts this ProductFamily into string format. * @return String representation of this class @@ -262,8 +313,8 @@ public void setUpdatedAt(ZonedDateTime updatedAt) { public String toString() { return "ProductFamily [" + "id=" + id + ", name=" + name + ", handle=" + handle + ", accountingCode=" + accountingCode + ", description=" + description - + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt - + ", additionalProperties=" + getAdditionalProperties() + "]"; + + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + ", archivedAt=" + + archivedAt + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -280,6 +331,7 @@ public Builder toBuilder() { .updatedAt(getUpdatedAt()); builder.accountingCode = internalGetAccountingCode(); builder.description = internalGetDescription(); + builder.archivedAt = internalGetArchivedAt(); return builder; } @@ -294,6 +346,7 @@ public static class Builder { private OptionalNullable description; private ZonedDateTime createdAt; private ZonedDateTime updatedAt; + private OptionalNullable archivedAt; @@ -385,13 +438,32 @@ public Builder updatedAt(ZonedDateTime updatedAt) { return this; } + /** + * Setter for archivedAt. + * @param archivedAt ZonedDateTime value for archivedAt. + * @return Builder + */ + public Builder archivedAt(ZonedDateTime archivedAt) { + this.archivedAt = OptionalNullable.of(archivedAt); + return this; + } + + /** + * UnSetter for archivedAt. + * @return Builder + */ + public Builder unsetArchivedAt() { + archivedAt = null; + return this; + } + /** * Builds a new {@link ProductFamily} object using the set fields. * @return {@link ProductFamily} */ public ProductFamily build() { return new ProductFamily(id, name, handle, accountingCode, description, createdAt, - updatedAt); + updatedAt, archivedAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoice.java b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoice.java index 45b42b55..efc4f886 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ProformaInvoice.java +++ b/src/main/java/com/maxio/advancedbilling/models/ProformaInvoice.java @@ -59,6 +59,7 @@ public class ProformaInvoice private List payments; private List customFields; private OptionalNullable publicUrl; + private AvailableActions availableActions; /** * Default constructor. @@ -104,6 +105,7 @@ public ProformaInvoice() { * @param payments List of ProformaInvoicePayment value for payments. * @param customFields List of InvoiceCustomField value for customFields. * @param publicUrl String value for publicUrl. + * @param availableActions AvailableActions value for availableActions. */ public ProformaInvoice( String uid, @@ -141,7 +143,8 @@ public ProformaInvoice( List credits, List payments, List customFields, - String publicUrl) { + String publicUrl, + AvailableActions availableActions) { this.uid = uid; this.siteId = siteId; this.customerId = OptionalNullable.of(customerId); @@ -178,6 +181,7 @@ public ProformaInvoice( this.payments = payments; this.customFields = customFields; this.publicUrl = OptionalNullable.of(publicUrl); + this.availableActions = availableActions; } /** @@ -218,6 +222,7 @@ public ProformaInvoice( * @param payments List of ProformaInvoicePayment value for payments. * @param customFields List of InvoiceCustomField value for customFields. * @param publicUrl String value for publicUrl. + * @param availableActions AvailableActions value for availableActions. */ protected ProformaInvoice(String uid, Integer siteId, OptionalNullable customerId, @@ -233,7 +238,8 @@ protected ProformaInvoice(String uid, Integer siteId, OptionalNullable String refundAmount, String dueAmount, List lineItems, List discounts, List taxes, List credits, List payments, - List customFields, OptionalNullable publicUrl) { + List customFields, OptionalNullable publicUrl, + AvailableActions availableActions) { this.uid = uid; this.siteId = siteId; this.customerId = customerId; @@ -270,6 +276,7 @@ protected ProformaInvoice(String uid, Integer siteId, OptionalNullable this.payments = payments; this.customFields = customFields; this.publicUrl = publicUrl; + this.availableActions = availableActions; } /** @@ -1066,6 +1073,25 @@ public void unsetPublicUrl() { publicUrl = null; } + /** + * Getter for AvailableActions. + * @return Returns the AvailableActions + */ + @JsonGetter("available_actions") + @JsonInclude(JsonInclude.Include.NON_NULL) + public AvailableActions getAvailableActions() { + return availableActions; + } + + /** + * Setter for AvailableActions. + * @param availableActions Value for AvailableActions + */ + @JsonSetter("available_actions") + public void setAvailableActions(AvailableActions availableActions) { + this.availableActions = availableActions; + } + /** * Converts this ProformaInvoice into string format. * @return String representation of this class @@ -1087,7 +1113,8 @@ public String toString() { + ", dueAmount=" + dueAmount + ", lineItems=" + lineItems + ", discounts=" + discounts + ", taxes=" + taxes + ", credits=" + credits + ", payments=" + payments + ", customFields=" + customFields + ", publicUrl=" + publicUrl - + ", additionalProperties=" + getAdditionalProperties() + "]"; + + ", availableActions=" + availableActions + ", additionalProperties=" + + getAdditionalProperties() + "]"; } /** @@ -1127,7 +1154,8 @@ public Builder toBuilder() { .taxes(getTaxes()) .credits(getCredits()) .payments(getPayments()) - .customFields(getCustomFields()); + .customFields(getCustomFields()) + .availableActions(getAvailableActions()); builder.customerId = internalGetCustomerId(); builder.subscriptionId = internalGetSubscriptionId(); builder.number = internalGetNumber(); @@ -1176,6 +1204,7 @@ public static class Builder { private List payments; private List customFields; private OptionalNullable publicUrl; + private AvailableActions availableActions; @@ -1584,6 +1613,16 @@ public Builder unsetPublicUrl() { return this; } + /** + * Setter for availableActions. + * @param availableActions AvailableActions value for availableActions. + * @return Builder + */ + public Builder availableActions(AvailableActions availableActions) { + this.availableActions = availableActions; + return this; + } + /** * Builds a new {@link ProformaInvoice} object using the set fields. * @return {@link ProformaInvoice} @@ -1595,7 +1634,7 @@ public ProformaInvoice build() { productFamilyName, role, seller, customer, memo, billingAddress, shippingAddress, subtotalAmount, discountAmount, taxAmount, totalAmount, creditAmount, paidAmount, refundAmount, dueAmount, lineItems, discounts, taxes, - credits, payments, customFields, publicUrl); + credits, payments, customFields, publicUrl, availableActions); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java b/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java index 9f4de9fa..f3405398 100644 --- a/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/QuantityBasedComponent.java @@ -326,7 +326,7 @@ public void setPrices(List prices) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -339,7 +339,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -349,7 +349,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -360,7 +360,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -369,7 +369,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -382,7 +382,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -392,7 +392,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -403,7 +403,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/ReactivateSubscriptionRequest.java b/src/main/java/com/maxio/advancedbilling/models/ReactivateSubscriptionRequest.java index e97a0bee..679c7243 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ReactivateSubscriptionRequest.java +++ b/src/main/java/com/maxio/advancedbilling/models/ReactivateSubscriptionRequest.java @@ -144,8 +144,8 @@ public void setCouponCode(String couponCode) { /** * Getter for UseCreditsAndPrepayments. - * If true is sent, Chargify will use service credits and prepayments upon reactivation. If - * false is sent, the service credits and prepayments will be ignored. + * If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. + * If false is sent, the service credits and prepayments will be ignored. * @return Returns the Boolean */ @JsonGetter("use_credits_and_prepayments") @@ -156,8 +156,8 @@ public Boolean getUseCreditsAndPrepayments() { /** * Setter for UseCreditsAndPrepayments. - * If true is sent, Chargify will use service credits and prepayments upon reactivation. If - * false is sent, the service credits and prepayments will be ignored. + * If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. + * If false is sent, the service credits and prepayments will be ignored. * @param useCreditsAndPrepayments Value for Boolean */ @JsonSetter("use_credits_and_prepayments") @@ -167,9 +167,10 @@ public void setUseCreditsAndPrepayments(Boolean useCreditsAndPrepayments) { /** * Getter for Resume. - * If `true`, Chargify will attempt to resume the subscription's billing period. if not - * resumable, the subscription will be reactivated with a new billing period. If `false`: - * Chargify will only attempt to reactivate the subscription. + * If `true`, Advanced Billing will attempt to resume the subscription's billing period. If not + * resumable, the subscription will be reactivated with a new billing period. If `false` or + * omitted, Advanced Billing will only attempt to reactivate the subscription with a new billing + * period, regardless of whether or not the subscription is resumable. * @return Returns the ReactivateSubscriptionRequestResume */ @JsonGetter("resume") @@ -180,9 +181,10 @@ public ReactivateSubscriptionRequestResume getResume() { /** * Setter for Resume. - * If `true`, Chargify will attempt to resume the subscription's billing period. if not - * resumable, the subscription will be reactivated with a new billing period. If `false`: - * Chargify will only attempt to reactivate the subscription. + * If `true`, Advanced Billing will attempt to resume the subscription's billing period. If not + * resumable, the subscription will be reactivated with a new billing period. If `false` or + * omitted, Advanced Billing will only attempt to reactivate the subscription with a new billing + * period, regardless of whether or not the subscription is resumable. * @param resume Value for ReactivateSubscriptionRequestResume */ @JsonSetter("resume") diff --git a/src/main/java/com/maxio/advancedbilling/models/Register.java b/src/main/java/com/maxio/advancedbilling/models/Register.java new file mode 100644 index 00000000..cfd7b1c3 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/Register.java @@ -0,0 +1,212 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for Register type. + */ +public class Register + extends BaseModel { + private Integer id; + private String maxioId; + private String name; + private String currencyCode; + + /** + * Default constructor. + */ + public Register() { + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param maxioId String value for maxioId. + * @param name String value for name. + * @param currencyCode String value for currencyCode. + */ + public Register( + Integer id, + String maxioId, + String name, + String currencyCode) { + this.id = id; + this.maxioId = maxioId; + this.name = name; + this.currencyCode = currencyCode; + } + + /** + * Getter for Id. + * @return Returns the Integer + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for Integer + */ + @JsonSetter("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for MaxioId. + * @return Returns the String + */ + @JsonGetter("maxio_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getMaxioId() { + return maxioId; + } + + /** + * Setter for MaxioId. + * @param maxioId Value for String + */ + @JsonSetter("maxio_id") + public void setMaxioId(String maxioId) { + this.maxioId = maxioId; + } + + /** + * Getter for Name. + * @return Returns the String + */ + @JsonGetter("name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getName() { + return name; + } + + /** + * Setter for Name. + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for CurrencyCode. + * The ISO 4217 currency code (3 character string) representing the currency of invoice + * transaction. + * @return Returns the String + */ + @JsonGetter("currency_code") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getCurrencyCode() { + return currencyCode; + } + + /** + * Setter for CurrencyCode. + * The ISO 4217 currency code (3 character string) representing the currency of invoice + * transaction. + * @param currencyCode Value for String + */ + @JsonSetter("currency_code") + public void setCurrencyCode(String currencyCode) { + this.currencyCode = currencyCode; + } + + /** + * Converts this Register into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "Register [" + "id=" + id + ", maxioId=" + maxioId + ", name=" + name + + ", currencyCode=" + currencyCode + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link Register.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link Register.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .maxioId(getMaxioId()) + .name(getName()) + .currencyCode(getCurrencyCode()); + return builder; + } + + /** + * Class to build instances of {@link Register}. + */ + public static class Builder { + private Integer id; + private String maxioId; + private String name; + private String currencyCode; + + + + /** + * Setter for id. + * @param id Integer value for id. + * @return Builder + */ + public Builder id(Integer id) { + this.id = id; + return this; + } + + /** + * Setter for maxioId. + * @param maxioId String value for maxioId. + * @return Builder + */ + public Builder maxioId(String maxioId) { + this.maxioId = maxioId; + 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 currencyCode. + * @param currencyCode String value for currencyCode. + * @return Builder + */ + public Builder currencyCode(String currencyCode) { + this.currencyCode = currencyCode; + return this; + } + + /** + * Builds a new {@link Register} object using the set fields. + * @return {@link Register} + */ + public Register build() { + return new Register(id, maxioId, name, currencyCode); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalComponentCustomPrice.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalComponentCustomPrice.java new file mode 100644 index 00000000..df97e6d1 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalComponentCustomPrice.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; +import io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ScheduledRenewalComponentCustomPrice type. + */ +public class ScheduledRenewalComponentCustomPrice + extends BaseModel { + private Boolean taxIncluded; + private PricingScheme pricingScheme; + private List prices; + + /** + * Default constructor. + */ + public ScheduledRenewalComponentCustomPrice() { + } + + /** + * Initialization constructor. + * @param pricingScheme PricingScheme value for pricingScheme. + * @param prices List of Price value for prices. + * @param taxIncluded Boolean value for taxIncluded. + */ + public ScheduledRenewalComponentCustomPrice( + PricingScheme pricingScheme, + List prices, + Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + this.pricingScheme = pricingScheme; + this.prices = prices; + } + + /** + * Getter for TaxIncluded. + * Whether or not the price point includes tax + * @return Returns the Boolean + */ + @JsonGetter("tax_included") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxIncluded() { + return taxIncluded; + } + + /** + * Setter for TaxIncluded. + * Whether or not the price point includes tax + * @param taxIncluded Value for Boolean + */ + @JsonSetter("tax_included") + public void setTaxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + } + + /** + * Getter for PricingScheme. + * Omit for On/Off components + * @return Returns the PricingScheme + */ + @JsonGetter("pricing_scheme") + public PricingScheme getPricingScheme() { + return pricingScheme; + } + + /** + * Setter for PricingScheme. + * Omit for On/Off components + * @param pricingScheme Value for PricingScheme + */ + @JsonSetter("pricing_scheme") + public void setPricingScheme(PricingScheme pricingScheme) { + this.pricingScheme = pricingScheme; + } + + /** + * Getter for Prices. + * On/off components only need one price bracket starting at 1. + * @return Returns the List of Price + */ + @JsonGetter("prices") + public List getPrices() { + return prices; + } + + /** + * Setter for Prices. + * On/off components only need one price bracket starting at 1. + * @param prices Value for List of Price + */ + @JsonSetter("prices") + public void setPrices(List prices) { + this.prices = prices; + } + + /** + * Converts this ScheduledRenewalComponentCustomPrice into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalComponentCustomPrice [" + "pricingScheme=" + pricingScheme + + ", prices=" + prices + ", taxIncluded=" + taxIncluded + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalComponentCustomPrice.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalComponentCustomPrice.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(pricingScheme, prices) + .taxIncluded(getTaxIncluded()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalComponentCustomPrice}. + */ + public static class Builder { + private PricingScheme pricingScheme; + private List prices; + private Boolean taxIncluded; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param pricingScheme PricingScheme value for pricingScheme. + * @param prices List of Price value for prices. + */ + public Builder(PricingScheme pricingScheme, List prices) { + this.pricingScheme = pricingScheme; + this.prices = prices; + } + + /** + * Setter for pricingScheme. + * @param pricingScheme PricingScheme value for pricingScheme. + * @return Builder + */ + public Builder pricingScheme(PricingScheme pricingScheme) { + this.pricingScheme = pricingScheme; + return this; + } + + /** + * Setter for prices. + * @param prices List of Price value for prices. + * @return Builder + */ + public Builder prices(List prices) { + this.prices = prices; + return this; + } + + /** + * Setter for taxIncluded. + * @param taxIncluded Boolean value for taxIncluded. + * @return Builder + */ + public Builder taxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalComponentCustomPrice} object using the set fields. + * @return {@link ScheduledRenewalComponentCustomPrice} + */ + public ScheduledRenewalComponentCustomPrice build() { + return new ScheduledRenewalComponentCustomPrice(pricingScheme, prices, taxIncluded); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfiguration.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfiguration.java new file mode 100644 index 00000000..d7bfa380 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfiguration.java @@ -0,0 +1,446 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import java.time.ZonedDateTime; +import java.util.List; + +/** + * This is a model class for ScheduledRenewalConfiguration type. + */ +public class ScheduledRenewalConfiguration + extends BaseModel { + private Integer id; + private Integer siteId; + private Integer subscriptionId; + private ZonedDateTime startsAt; + private ZonedDateTime endsAt; + private ZonedDateTime lockInAt; + private ZonedDateTime createdAt; + private String status; + private List scheduledRenewalConfigurationItems; + private Contract contract; + + /** + * Default constructor. + */ + public ScheduledRenewalConfiguration() { + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param siteId Integer value for siteId. + * @param subscriptionId Integer value for subscriptionId. + * @param startsAt ZonedDateTime value for startsAt. + * @param endsAt ZonedDateTime value for endsAt. + * @param lockInAt ZonedDateTime value for lockInAt. + * @param createdAt ZonedDateTime value for createdAt. + * @param status String value for status. + * @param scheduledRenewalConfigurationItems List of ScheduledRenewalConfigurationItem value + * for scheduledRenewalConfigurationItems. + * @param contract Contract value for contract. + */ + public ScheduledRenewalConfiguration( + Integer id, + Integer siteId, + Integer subscriptionId, + ZonedDateTime startsAt, + ZonedDateTime endsAt, + ZonedDateTime lockInAt, + ZonedDateTime createdAt, + String status, + List scheduledRenewalConfigurationItems, + Contract contract) { + this.id = id; + this.siteId = siteId; + this.subscriptionId = subscriptionId; + this.startsAt = startsAt; + this.endsAt = endsAt; + this.lockInAt = lockInAt; + this.createdAt = createdAt; + this.status = status; + this.scheduledRenewalConfigurationItems = scheduledRenewalConfigurationItems; + this.contract = contract; + } + + /** + * Getter for Id. + * ID of the renewal. + * @return Returns the Integer + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getId() { + return id; + } + + /** + * Setter for Id. + * ID of the renewal. + * @param id Value for Integer + */ + @JsonSetter("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for SiteId. + * ID of the site to which the renewal belongs. + * @return Returns the Integer + */ + @JsonGetter("site_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSiteId() { + return siteId; + } + + /** + * Setter for SiteId. + * ID of the site to which the renewal belongs. + * @param siteId Value for Integer + */ + @JsonSetter("site_id") + public void setSiteId(Integer siteId) { + this.siteId = siteId; + } + + /** + * Getter for SubscriptionId. + * The id of the subscription. + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * The id of the subscription. + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for StartsAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("starts_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getStartsAt() { + return startsAt; + } + + /** + * Setter for StartsAt. + * @param startsAt Value for ZonedDateTime + */ + @JsonSetter("starts_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setStartsAt(ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + /** + * Getter for EndsAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("ends_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getEndsAt() { + return endsAt; + } + + /** + * Setter for EndsAt. + * @param endsAt Value for ZonedDateTime + */ + @JsonSetter("ends_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setEndsAt(ZonedDateTime endsAt) { + this.endsAt = endsAt; + } + + /** + * Getter for LockInAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("lock_in_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getLockInAt() { + return lockInAt; + } + + /** + * Setter for LockInAt. + * @param lockInAt Value for ZonedDateTime + */ + @JsonSetter("lock_in_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setLockInAt(ZonedDateTime lockInAt) { + this.lockInAt = lockInAt; + } + + /** + * Getter for CreatedAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("created_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getCreatedAt() { + return createdAt; + } + + /** + * Setter for CreatedAt. + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for Status. + * @return Returns the String + */ + @JsonGetter("status") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getStatus() { + return status; + } + + /** + * Setter for Status. + * @param status Value for String + */ + @JsonSetter("status") + public void setStatus(String status) { + this.status = status; + } + + /** + * Getter for ScheduledRenewalConfigurationItems. + * @return Returns the List of ScheduledRenewalConfigurationItem + */ + @JsonGetter("scheduled_renewal_configuration_items") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getScheduledRenewalConfigurationItems() { + return scheduledRenewalConfigurationItems; + } + + /** + * Setter for ScheduledRenewalConfigurationItems. + * @param scheduledRenewalConfigurationItems Value for List of ScheduledRenewalConfigurationItem + */ + @JsonSetter("scheduled_renewal_configuration_items") + public void setScheduledRenewalConfigurationItems(List scheduledRenewalConfigurationItems) { + this.scheduledRenewalConfigurationItems = scheduledRenewalConfigurationItems; + } + + /** + * Getter for Contract. + * Contract linked to the scheduled renewal configuration. + * @return Returns the Contract + */ + @JsonGetter("contract") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Contract getContract() { + return contract; + } + + /** + * Setter for Contract. + * Contract linked to the scheduled renewal configuration. + * @param contract Value for Contract + */ + @JsonSetter("contract") + public void setContract(Contract contract) { + this.contract = contract; + } + + /** + * Converts this ScheduledRenewalConfiguration into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfiguration [" + "id=" + id + ", siteId=" + siteId + + ", subscriptionId=" + subscriptionId + ", startsAt=" + startsAt + ", endsAt=" + + endsAt + ", lockInAt=" + lockInAt + ", createdAt=" + createdAt + ", status=" + + status + ", scheduledRenewalConfigurationItems=" + + scheduledRenewalConfigurationItems + ", contract=" + contract + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfiguration.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfiguration.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .siteId(getSiteId()) + .subscriptionId(getSubscriptionId()) + .startsAt(getStartsAt()) + .endsAt(getEndsAt()) + .lockInAt(getLockInAt()) + .createdAt(getCreatedAt()) + .status(getStatus()) + .scheduledRenewalConfigurationItems(getScheduledRenewalConfigurationItems()) + .contract(getContract()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfiguration}. + */ + public static class Builder { + private Integer id; + private Integer siteId; + private Integer subscriptionId; + private ZonedDateTime startsAt; + private ZonedDateTime endsAt; + private ZonedDateTime lockInAt; + private ZonedDateTime createdAt; + private String status; + private List scheduledRenewalConfigurationItems; + private Contract contract; + + + + /** + * Setter for id. + * @param id Integer value for id. + * @return Builder + */ + public Builder id(Integer id) { + this.id = id; + return this; + } + + /** + * Setter for siteId. + * @param siteId Integer value for siteId. + * @return Builder + */ + public Builder siteId(Integer siteId) { + this.siteId = siteId; + 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 startsAt. + * @param startsAt ZonedDateTime value for startsAt. + * @return Builder + */ + public Builder startsAt(ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + * Setter for endsAt. + * @param endsAt ZonedDateTime value for endsAt. + * @return Builder + */ + public Builder endsAt(ZonedDateTime endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Setter for lockInAt. + * @param lockInAt ZonedDateTime value for lockInAt. + * @return Builder + */ + public Builder lockInAt(ZonedDateTime lockInAt) { + this.lockInAt = lockInAt; + return this; + } + + /** + * Setter for createdAt. + * @param createdAt ZonedDateTime value for createdAt. + * @return Builder + */ + public Builder createdAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Setter for status. + * @param status String value for status. + * @return Builder + */ + public Builder status(String status) { + this.status = status; + return this; + } + + /** + * Setter for scheduledRenewalConfigurationItems. + * @param scheduledRenewalConfigurationItems List of ScheduledRenewalConfigurationItem + * value for scheduledRenewalConfigurationItems. + * @return Builder + */ + public Builder scheduledRenewalConfigurationItems( + List scheduledRenewalConfigurationItems) { + this.scheduledRenewalConfigurationItems = scheduledRenewalConfigurationItems; + return this; + } + + /** + * Setter for contract. + * @param contract Contract value for contract. + * @return Builder + */ + public Builder contract(Contract contract) { + this.contract = contract; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfiguration} object using the set fields. + * @return {@link ScheduledRenewalConfiguration} + */ + public ScheduledRenewalConfiguration build() { + return new ScheduledRenewalConfiguration(id, siteId, subscriptionId, startsAt, endsAt, + lockInAt, createdAt, status, scheduledRenewalConfigurationItems, contract); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItem.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItem.java new file mode 100644 index 00000000..f77e7d89 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItem.java @@ -0,0 +1,468 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import java.time.ZonedDateTime; + +/** + * This is a model class for ScheduledRenewalConfigurationItem type. + */ +public class ScheduledRenewalConfigurationItem + extends BaseModel { + private Integer id; + private Integer subscriptionId; + private Integer subscriptionRenewalConfigurationId; + private Integer itemId; + private String itemType; + private String itemSubclass; + private Integer pricePointId; + private String pricePointType; + private Integer quantity; + private String decimalQuantity; + private ZonedDateTime createdAt; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationItem() { + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param subscriptionId Integer value for subscriptionId. + * @param subscriptionRenewalConfigurationId Integer value for + * subscriptionRenewalConfigurationId. + * @param itemId Integer value for itemId. + * @param itemType String value for itemType. + * @param itemSubclass String value for itemSubclass. + * @param pricePointId Integer value for pricePointId. + * @param pricePointType String value for pricePointType. + * @param quantity Integer value for quantity. + * @param decimalQuantity String value for decimalQuantity. + * @param createdAt ZonedDateTime value for createdAt. + */ + public ScheduledRenewalConfigurationItem( + Integer id, + Integer subscriptionId, + Integer subscriptionRenewalConfigurationId, + Integer itemId, + String itemType, + String itemSubclass, + Integer pricePointId, + String pricePointType, + Integer quantity, + String decimalQuantity, + ZonedDateTime createdAt) { + this.id = id; + this.subscriptionId = subscriptionId; + this.subscriptionRenewalConfigurationId = subscriptionRenewalConfigurationId; + this.itemId = itemId; + this.itemType = itemType; + this.itemSubclass = itemSubclass; + this.pricePointId = pricePointId; + this.pricePointType = pricePointType; + this.quantity = quantity; + this.decimalQuantity = decimalQuantity; + this.createdAt = createdAt; + } + + /** + * Getter for Id. + * @return Returns the Integer + */ + @JsonGetter("id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for Integer + */ + @JsonSetter("id") + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for SubscriptionId. + * @return Returns the Integer + */ + @JsonGetter("subscription_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionId() { + return subscriptionId; + } + + /** + * Setter for SubscriptionId. + * @param subscriptionId Value for Integer + */ + @JsonSetter("subscription_id") + public void setSubscriptionId(Integer subscriptionId) { + this.subscriptionId = subscriptionId; + } + + /** + * Getter for SubscriptionRenewalConfigurationId. + * @return Returns the Integer + */ + @JsonGetter("subscription_renewal_configuration_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getSubscriptionRenewalConfigurationId() { + return subscriptionRenewalConfigurationId; + } + + /** + * Setter for SubscriptionRenewalConfigurationId. + * @param subscriptionRenewalConfigurationId Value for Integer + */ + @JsonSetter("subscription_renewal_configuration_id") + public void setSubscriptionRenewalConfigurationId(Integer subscriptionRenewalConfigurationId) { + this.subscriptionRenewalConfigurationId = subscriptionRenewalConfigurationId; + } + + /** + * Getter for ItemId. + * @return Returns the Integer + */ + @JsonGetter("item_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getItemId() { + return itemId; + } + + /** + * Setter for ItemId. + * @param itemId Value for Integer + */ + @JsonSetter("item_id") + public void setItemId(Integer itemId) { + this.itemId = itemId; + } + + /** + * Getter for ItemType. + * @return Returns the String + */ + @JsonGetter("item_type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getItemType() { + return itemType; + } + + /** + * Setter for ItemType. + * @param itemType Value for String + */ + @JsonSetter("item_type") + public void setItemType(String itemType) { + this.itemType = itemType; + } + + /** + * Getter for ItemSubclass. + * @return Returns the String + */ + @JsonGetter("item_subclass") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getItemSubclass() { + return itemSubclass; + } + + /** + * Setter for ItemSubclass. + * @param itemSubclass Value for String + */ + @JsonSetter("item_subclass") + public void setItemSubclass(String itemSubclass) { + this.itemSubclass = itemSubclass; + } + + /** + * Getter for PricePointId. + * @return Returns the Integer + */ + @JsonGetter("price_point_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPricePointId() { + return pricePointId; + } + + /** + * Setter for PricePointId. + * @param pricePointId Value for Integer + */ + @JsonSetter("price_point_id") + public void setPricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + } + + /** + * Getter for PricePointType. + * @return Returns the String + */ + @JsonGetter("price_point_type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getPricePointType() { + return pricePointType; + } + + /** + * Setter for PricePointType. + * @param pricePointType Value for String + */ + @JsonSetter("price_point_type") + public void setPricePointType(String pricePointType) { + this.pricePointType = pricePointType; + } + + /** + * Getter for Quantity. + * @return Returns the Integer + */ + @JsonGetter("quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getQuantity() { + return quantity; + } + + /** + * Setter for Quantity. + * @param quantity Value for Integer + */ + @JsonSetter("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Getter for DecimalQuantity. + * @return Returns the String + */ + @JsonGetter("decimal_quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getDecimalQuantity() { + return decimalQuantity; + } + + /** + * Setter for DecimalQuantity. + * @param decimalQuantity Value for String + */ + @JsonSetter("decimal_quantity") + public void setDecimalQuantity(String decimalQuantity) { + this.decimalQuantity = decimalQuantity; + } + + /** + * Getter for CreatedAt. + * @return Returns the ZonedDateTime + */ + @JsonGetter("created_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getCreatedAt() { + return createdAt; + } + + /** + * Setter for CreatedAt. + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Converts this ScheduledRenewalConfigurationItem into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationItem [" + "id=" + id + ", subscriptionId=" + + subscriptionId + ", subscriptionRenewalConfigurationId=" + + subscriptionRenewalConfigurationId + ", itemId=" + itemId + ", itemType=" + + itemType + ", itemSubclass=" + itemSubclass + ", pricePointId=" + pricePointId + + ", pricePointType=" + pricePointType + ", quantity=" + quantity + + ", decimalQuantity=" + decimalQuantity + ", createdAt=" + createdAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItem.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationItem.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .subscriptionId(getSubscriptionId()) + .subscriptionRenewalConfigurationId(getSubscriptionRenewalConfigurationId()) + .itemId(getItemId()) + .itemType(getItemType()) + .itemSubclass(getItemSubclass()) + .pricePointId(getPricePointId()) + .pricePointType(getPricePointType()) + .quantity(getQuantity()) + .decimalQuantity(getDecimalQuantity()) + .createdAt(getCreatedAt()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationItem}. + */ + public static class Builder { + private Integer id; + private Integer subscriptionId; + private Integer subscriptionRenewalConfigurationId; + private Integer itemId; + private String itemType; + private String itemSubclass; + private Integer pricePointId; + private String pricePointType; + private Integer quantity; + private String decimalQuantity; + private ZonedDateTime createdAt; + + + + /** + * Setter for id. + * @param id Integer value for id. + * @return Builder + */ + public Builder id(Integer id) { + this.id = id; + 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 subscriptionRenewalConfigurationId. + * @param subscriptionRenewalConfigurationId Integer value for + * subscriptionRenewalConfigurationId. + * @return Builder + */ + public Builder subscriptionRenewalConfigurationId( + Integer subscriptionRenewalConfigurationId) { + this.subscriptionRenewalConfigurationId = subscriptionRenewalConfigurationId; + return this; + } + + /** + * Setter for itemId. + * @param itemId Integer value for itemId. + * @return Builder + */ + public Builder itemId(Integer itemId) { + this.itemId = itemId; + return this; + } + + /** + * Setter for itemType. + * @param itemType String value for itemType. + * @return Builder + */ + public Builder itemType(String itemType) { + this.itemType = itemType; + return this; + } + + /** + * Setter for itemSubclass. + * @param itemSubclass String value for itemSubclass. + * @return Builder + */ + public Builder itemSubclass(String itemSubclass) { + this.itemSubclass = itemSubclass; + return this; + } + + /** + * Setter for pricePointId. + * @param pricePointId Integer value for pricePointId. + * @return Builder + */ + public Builder pricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + return this; + } + + /** + * Setter for pricePointType. + * @param pricePointType String value for pricePointType. + * @return Builder + */ + public Builder pricePointType(String pricePointType) { + this.pricePointType = pricePointType; + return this; + } + + /** + * Setter for quantity. + * @param quantity Integer value for quantity. + * @return Builder + */ + public Builder quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Setter for decimalQuantity. + * @param decimalQuantity String value for decimalQuantity. + * @return Builder + */ + public Builder decimalQuantity(String decimalQuantity) { + this.decimalQuantity = decimalQuantity; + return this; + } + + /** + * Setter for createdAt. + * @param createdAt ZonedDateTime value for createdAt. + * @return Builder + */ + public Builder createdAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItem} object using the set fields. + * @return {@link ScheduledRenewalConfigurationItem} + */ + public ScheduledRenewalConfigurationItem build() { + return new ScheduledRenewalConfigurationItem(id, subscriptionId, + subscriptionRenewalConfigurationId, itemId, itemType, itemSubclass, + pricePointId, pricePointType, quantity, decimalQuantity, createdAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemRequest.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemRequest.java new file mode 100644 index 00000000..daa28a5c --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemRequest.java @@ -0,0 +1,122 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.maxio.advancedbilling.models.containers.ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalConfigurationItemRequest type. + */ +public class ScheduledRenewalConfigurationItemRequest + extends BaseModel { + private ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationItemRequest() { + } + + /** + * Initialization constructor. + * @param renewalConfigurationItem + * ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem value for + * renewalConfigurationItem. + */ + public ScheduledRenewalConfigurationItemRequest( + ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Getter for RenewalConfigurationItem. + * @return Returns the ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem + */ + @JsonGetter("renewal_configuration_item") + public ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem getRenewalConfigurationItem() { + return renewalConfigurationItem; + } + + /** + * Setter for RenewalConfigurationItem. + * @param renewalConfigurationItem Value for ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem + */ + @JsonSetter("renewal_configuration_item") + public void setRenewalConfigurationItem(ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Converts this ScheduledRenewalConfigurationItemRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationItemRequest [" + "renewalConfigurationItem=" + + renewalConfigurationItem + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItemRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationItemRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(renewalConfigurationItem); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationItemRequest}. + */ + public static class Builder { + private ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param renewalConfigurationItem + * ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem value for + * renewalConfigurationItem. + */ + public Builder( + ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Setter for renewalConfigurationItem. + * @param renewalConfigurationItem + * ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem value for + * renewalConfigurationItem. + * @return Builder + */ + public Builder renewalConfigurationItem( + ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItemRequest} object using the set + * fields. + * @return {@link ScheduledRenewalConfigurationItemRequest} + */ + public ScheduledRenewalConfigurationItemRequest build() { + return new ScheduledRenewalConfigurationItemRequest(renewalConfigurationItem); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemResponse.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemResponse.java new file mode 100644 index 00000000..acfd8cf5 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationItemResponse.java @@ -0,0 +1,107 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalConfigurationItemResponse type. + */ +public class ScheduledRenewalConfigurationItemResponse + extends BaseModel { + private ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationItemResponse() { + } + + /** + * Initialization constructor. + * @param scheduledRenewalConfigurationItem ScheduledRenewalConfigurationItem value for + * scheduledRenewalConfigurationItem. + */ + public ScheduledRenewalConfigurationItemResponse( + ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem) { + this.scheduledRenewalConfigurationItem = scheduledRenewalConfigurationItem; + } + + /** + * Getter for ScheduledRenewalConfigurationItem. + * @return Returns the ScheduledRenewalConfigurationItem + */ + @JsonGetter("scheduled_renewal_configuration_item") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ScheduledRenewalConfigurationItem getScheduledRenewalConfigurationItem() { + return scheduledRenewalConfigurationItem; + } + + /** + * Setter for ScheduledRenewalConfigurationItem. + * @param scheduledRenewalConfigurationItem Value for ScheduledRenewalConfigurationItem + */ + @JsonSetter("scheduled_renewal_configuration_item") + public void setScheduledRenewalConfigurationItem(ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem) { + this.scheduledRenewalConfigurationItem = scheduledRenewalConfigurationItem; + } + + /** + * Converts this ScheduledRenewalConfigurationItemResponse into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationItemResponse [" + "scheduledRenewalConfigurationItem=" + + scheduledRenewalConfigurationItem + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItemResponse.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationItemResponse.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .scheduledRenewalConfigurationItem(getScheduledRenewalConfigurationItem()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationItemResponse}. + */ + public static class Builder { + private ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem; + + + + /** + * Setter for scheduledRenewalConfigurationItem. + * @param scheduledRenewalConfigurationItem ScheduledRenewalConfigurationItem value for + * scheduledRenewalConfigurationItem. + * @return Builder + */ + public Builder scheduledRenewalConfigurationItem( + ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem) { + this.scheduledRenewalConfigurationItem = scheduledRenewalConfigurationItem; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationItemResponse} object using the set + * fields. + * @return {@link ScheduledRenewalConfigurationItemResponse} + */ + public ScheduledRenewalConfigurationItemResponse build() { + return new ScheduledRenewalConfigurationItemResponse(scheduledRenewalConfigurationItem); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequest.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequest.java new file mode 100644 index 00000000..c07c381e --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequest.java @@ -0,0 +1,116 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalConfigurationRequest type. + */ +public class ScheduledRenewalConfigurationRequest + extends BaseModel { + private ScheduledRenewalConfigurationRequestBody renewalConfiguration; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationRequest() { + } + + /** + * Initialization constructor. + * @param renewalConfiguration ScheduledRenewalConfigurationRequestBody value for + * renewalConfiguration. + */ + public ScheduledRenewalConfigurationRequest( + ScheduledRenewalConfigurationRequestBody renewalConfiguration) { + this.renewalConfiguration = renewalConfiguration; + } + + /** + * Getter for RenewalConfiguration. + * @return Returns the ScheduledRenewalConfigurationRequestBody + */ + @JsonGetter("renewal_configuration") + public ScheduledRenewalConfigurationRequestBody getRenewalConfiguration() { + return renewalConfiguration; + } + + /** + * Setter for RenewalConfiguration. + * @param renewalConfiguration Value for ScheduledRenewalConfigurationRequestBody + */ + @JsonSetter("renewal_configuration") + public void setRenewalConfiguration(ScheduledRenewalConfigurationRequestBody renewalConfiguration) { + this.renewalConfiguration = renewalConfiguration; + } + + /** + * Converts this ScheduledRenewalConfigurationRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationRequest [" + "renewalConfiguration=" + + renewalConfiguration + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(renewalConfiguration); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationRequest}. + */ + public static class Builder { + private ScheduledRenewalConfigurationRequestBody renewalConfiguration; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param renewalConfiguration ScheduledRenewalConfigurationRequestBody value for + * renewalConfiguration. + */ + public Builder(ScheduledRenewalConfigurationRequestBody renewalConfiguration) { + this.renewalConfiguration = renewalConfiguration; + } + + /** + * Setter for renewalConfiguration. + * @param renewalConfiguration ScheduledRenewalConfigurationRequestBody value for + * renewalConfiguration. + * @return Builder + */ + public Builder renewalConfiguration( + ScheduledRenewalConfigurationRequestBody renewalConfiguration) { + this.renewalConfiguration = renewalConfiguration; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationRequest} object using the set fields. + * @return {@link ScheduledRenewalConfigurationRequest} + */ + public ScheduledRenewalConfigurationRequest build() { + return new ScheduledRenewalConfigurationRequest(renewalConfiguration); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequestBody.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequestBody.java new file mode 100644 index 00000000..ac4b3e30 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationRequestBody.java @@ -0,0 +1,270 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import java.time.ZonedDateTime; + +/** + * This is a model class for ScheduledRenewalConfigurationRequestBody type. + */ +public class ScheduledRenewalConfigurationRequestBody + extends BaseModel { + private ZonedDateTime startsAt; + private ZonedDateTime endsAt; + private ZonedDateTime lockInAt; + private Integer contractId; + private Boolean createNewContract; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationRequestBody() { + } + + /** + * Initialization constructor. + * @param startsAt ZonedDateTime value for startsAt. + * @param endsAt ZonedDateTime value for endsAt. + * @param lockInAt ZonedDateTime value for lockInAt. + * @param contractId Integer value for contractId. + * @param createNewContract Boolean value for createNewContract. + */ + public ScheduledRenewalConfigurationRequestBody( + ZonedDateTime startsAt, + ZonedDateTime endsAt, + ZonedDateTime lockInAt, + Integer contractId, + Boolean createNewContract) { + this.startsAt = startsAt; + this.endsAt = endsAt; + this.lockInAt = lockInAt; + this.contractId = contractId; + this.createNewContract = createNewContract; + } + + /** + * Getter for StartsAt. + * (Optional) Start of the renewal term. + * @return Returns the ZonedDateTime + */ + @JsonGetter("starts_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getStartsAt() { + return startsAt; + } + + /** + * Setter for StartsAt. + * (Optional) Start of the renewal term. + * @param startsAt Value for ZonedDateTime + */ + @JsonSetter("starts_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setStartsAt(ZonedDateTime startsAt) { + this.startsAt = startsAt; + } + + /** + * Getter for EndsAt. + * (Optional) End of the renewal term. + * @return Returns the ZonedDateTime + */ + @JsonGetter("ends_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getEndsAt() { + return endsAt; + } + + /** + * Setter for EndsAt. + * (Optional) End of the renewal term. + * @param endsAt Value for ZonedDateTime + */ + @JsonSetter("ends_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setEndsAt(ZonedDateTime endsAt) { + this.endsAt = endsAt; + } + + /** + * Getter for LockInAt. + * (Optional) Lock-in date for the renewal. + * @return Returns the ZonedDateTime + */ + @JsonGetter("lock_in_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getLockInAt() { + return lockInAt; + } + + /** + * Setter for LockInAt. + * (Optional) Lock-in date for the renewal. + * @param lockInAt Value for ZonedDateTime + */ + @JsonSetter("lock_in_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setLockInAt(ZonedDateTime lockInAt) { + this.lockInAt = lockInAt; + } + + /** + * Getter for ContractId. + * (Optional) Existing contract to associate with the scheduled renewal. Contracts must be + * enabled for your site. + * @return Returns the Integer + */ + @JsonGetter("contract_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getContractId() { + return contractId; + } + + /** + * Setter for ContractId. + * (Optional) Existing contract to associate with the scheduled renewal. Contracts must be + * enabled for your site. + * @param contractId Value for Integer + */ + @JsonSetter("contract_id") + public void setContractId(Integer contractId) { + this.contractId = contractId; + } + + /** + * Getter for CreateNewContract. + * (Optional) Set to true to create a new contract when contracts are enabled. Contracts must be + * enabled for your site. + * @return Returns the Boolean + */ + @JsonGetter("create_new_contract") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getCreateNewContract() { + return createNewContract; + } + + /** + * Setter for CreateNewContract. + * (Optional) Set to true to create a new contract when contracts are enabled. Contracts must be + * enabled for your site. + * @param createNewContract Value for Boolean + */ + @JsonSetter("create_new_contract") + public void setCreateNewContract(Boolean createNewContract) { + this.createNewContract = createNewContract; + } + + /** + * Converts this ScheduledRenewalConfigurationRequestBody into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationRequestBody [" + "startsAt=" + startsAt + ", endsAt=" + + endsAt + ", lockInAt=" + lockInAt + ", contractId=" + contractId + + ", createNewContract=" + createNewContract + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationRequestBody.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationRequestBody.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .startsAt(getStartsAt()) + .endsAt(getEndsAt()) + .lockInAt(getLockInAt()) + .contractId(getContractId()) + .createNewContract(getCreateNewContract()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationRequestBody}. + */ + public static class Builder { + private ZonedDateTime startsAt; + private ZonedDateTime endsAt; + private ZonedDateTime lockInAt; + private Integer contractId; + private Boolean createNewContract; + + + + /** + * Setter for startsAt. + * @param startsAt ZonedDateTime value for startsAt. + * @return Builder + */ + public Builder startsAt(ZonedDateTime startsAt) { + this.startsAt = startsAt; + return this; + } + + /** + * Setter for endsAt. + * @param endsAt ZonedDateTime value for endsAt. + * @return Builder + */ + public Builder endsAt(ZonedDateTime endsAt) { + this.endsAt = endsAt; + return this; + } + + /** + * Setter for lockInAt. + * @param lockInAt ZonedDateTime value for lockInAt. + * @return Builder + */ + public Builder lockInAt(ZonedDateTime lockInAt) { + this.lockInAt = lockInAt; + return this; + } + + /** + * Setter for contractId. + * @param contractId Integer value for contractId. + * @return Builder + */ + public Builder contractId(Integer contractId) { + this.contractId = contractId; + return this; + } + + /** + * Setter for createNewContract. + * @param createNewContract Boolean value for createNewContract. + * @return Builder + */ + public Builder createNewContract(Boolean createNewContract) { + this.createNewContract = createNewContract; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationRequestBody} object using the set + * fields. + * @return {@link ScheduledRenewalConfigurationRequestBody} + */ + public ScheduledRenewalConfigurationRequestBody build() { + return new ScheduledRenewalConfigurationRequestBody(startsAt, endsAt, lockInAt, + contractId, createNewContract); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationResponse.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationResponse.java new file mode 100644 index 00000000..c1020b8f --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationResponse.java @@ -0,0 +1,106 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalConfigurationResponse type. + */ +public class ScheduledRenewalConfigurationResponse + extends BaseModel { + private ScheduledRenewalConfiguration scheduledRenewalConfiguration; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationResponse() { + } + + /** + * Initialization constructor. + * @param scheduledRenewalConfiguration ScheduledRenewalConfiguration value for + * scheduledRenewalConfiguration. + */ + public ScheduledRenewalConfigurationResponse( + ScheduledRenewalConfiguration scheduledRenewalConfiguration) { + this.scheduledRenewalConfiguration = scheduledRenewalConfiguration; + } + + /** + * Getter for ScheduledRenewalConfiguration. + * @return Returns the ScheduledRenewalConfiguration + */ + @JsonGetter("scheduled_renewal_configuration") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ScheduledRenewalConfiguration getScheduledRenewalConfiguration() { + return scheduledRenewalConfiguration; + } + + /** + * Setter for ScheduledRenewalConfiguration. + * @param scheduledRenewalConfiguration Value for ScheduledRenewalConfiguration + */ + @JsonSetter("scheduled_renewal_configuration") + public void setScheduledRenewalConfiguration(ScheduledRenewalConfiguration scheduledRenewalConfiguration) { + this.scheduledRenewalConfiguration = scheduledRenewalConfiguration; + } + + /** + * Converts this ScheduledRenewalConfigurationResponse into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationResponse [" + "scheduledRenewalConfiguration=" + + scheduledRenewalConfiguration + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationResponse.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationResponse.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .scheduledRenewalConfiguration(getScheduledRenewalConfiguration()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationResponse}. + */ + public static class Builder { + private ScheduledRenewalConfiguration scheduledRenewalConfiguration; + + + + /** + * Setter for scheduledRenewalConfiguration. + * @param scheduledRenewalConfiguration ScheduledRenewalConfiguration value for + * scheduledRenewalConfiguration. + * @return Builder + */ + public Builder scheduledRenewalConfiguration( + ScheduledRenewalConfiguration scheduledRenewalConfiguration) { + this.scheduledRenewalConfiguration = scheduledRenewalConfiguration; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationResponse} object using the set fields. + * @return {@link ScheduledRenewalConfigurationResponse} + */ + public ScheduledRenewalConfigurationResponse build() { + return new ScheduledRenewalConfigurationResponse(scheduledRenewalConfiguration); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationsResponse.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationsResponse.java new file mode 100644 index 00000000..3ea8e452 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalConfigurationsResponse.java @@ -0,0 +1,107 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; +import java.util.List; + +/** + * This is a model class for ScheduledRenewalConfigurationsResponse type. + */ +public class ScheduledRenewalConfigurationsResponse + extends BaseModel { + private List scheduledRenewalConfigurations; + + /** + * Default constructor. + */ + public ScheduledRenewalConfigurationsResponse() { + } + + /** + * Initialization constructor. + * @param scheduledRenewalConfigurations List of ScheduledRenewalConfiguration value for + * scheduledRenewalConfigurations. + */ + public ScheduledRenewalConfigurationsResponse( + List scheduledRenewalConfigurations) { + this.scheduledRenewalConfigurations = scheduledRenewalConfigurations; + } + + /** + * Getter for ScheduledRenewalConfigurations. + * @return Returns the List of ScheduledRenewalConfiguration + */ + @JsonGetter("scheduled_renewal_configurations") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getScheduledRenewalConfigurations() { + return scheduledRenewalConfigurations; + } + + /** + * Setter for ScheduledRenewalConfigurations. + * @param scheduledRenewalConfigurations Value for List of ScheduledRenewalConfiguration + */ + @JsonSetter("scheduled_renewal_configurations") + public void setScheduledRenewalConfigurations(List scheduledRenewalConfigurations) { + this.scheduledRenewalConfigurations = scheduledRenewalConfigurations; + } + + /** + * Converts this ScheduledRenewalConfigurationsResponse into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalConfigurationsResponse [" + "scheduledRenewalConfigurations=" + + scheduledRenewalConfigurations + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationsResponse.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalConfigurationsResponse.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .scheduledRenewalConfigurations(getScheduledRenewalConfigurations()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalConfigurationsResponse}. + */ + public static class Builder { + private List scheduledRenewalConfigurations; + + + + /** + * Setter for scheduledRenewalConfigurations. + * @param scheduledRenewalConfigurations List of ScheduledRenewalConfiguration value for + * scheduledRenewalConfigurations. + * @return Builder + */ + public Builder scheduledRenewalConfigurations( + List scheduledRenewalConfigurations) { + this.scheduledRenewalConfigurations = scheduledRenewalConfigurations; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalConfigurationsResponse} object using the set fields. + * @return {@link ScheduledRenewalConfigurationsResponse} + */ + public ScheduledRenewalConfigurationsResponse build() { + return new ScheduledRenewalConfigurationsResponse(scheduledRenewalConfigurations); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyComponent.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyComponent.java new file mode 100644 index 00000000..147e216f --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyComponent.java @@ -0,0 +1,281 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalItemRequestBodyComponent type. + */ +public class ScheduledRenewalItemRequestBodyComponent + extends BaseModel { + private String itemType; + private int itemId; + private Integer pricePointId; + private Integer quantity; + private ScheduledRenewalComponentCustomPrice customPrice; + + /** + * Default constructor. + */ + public ScheduledRenewalItemRequestBodyComponent() { + itemType = "Component"; + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + * @param pricePointId Integer value for pricePointId. + * @param quantity Integer value for quantity. + * @param customPrice ScheduledRenewalComponentCustomPrice value for customPrice. + */ + public ScheduledRenewalItemRequestBodyComponent( + String itemType, + int itemId, + Integer pricePointId, + Integer quantity, + ScheduledRenewalComponentCustomPrice customPrice) { + this.itemType = itemType; + this.itemId = itemId; + this.pricePointId = pricePointId; + this.quantity = quantity; + this.customPrice = customPrice; + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + */ + @JsonCreator + protected ScheduledRenewalItemRequestBodyComponent( + @JsonProperty("item_type") String itemType, + @JsonProperty("item_id") int itemId) { + this(itemType, itemId, null, null, null); + } + + /** + * Getter for ItemType. + * Item type to add. Either Product or Component. + * @return Returns the String + */ + @JsonGetter("item_type") + public String getItemType() { + return itemType; + } + + /** + * Setter for ItemType. + * Item type to add. Either Product or Component. + * @param itemType Value for String + */ + @JsonSetter("item_type") + private void setItemType(String itemType) { + this.itemType = itemType; + } + + /** + * Getter for ItemId. + * Product or component identifier. + * @return Returns the int + */ + @JsonGetter("item_id") + public int getItemId() { + return itemId; + } + + /** + * Setter for ItemId. + * Product or component identifier. + * @param itemId Value for int + */ + @JsonSetter("item_id") + public void setItemId(int itemId) { + this.itemId = itemId; + } + + /** + * Getter for PricePointId. + * Price point identifier. + * @return Returns the Integer + */ + @JsonGetter("price_point_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPricePointId() { + return pricePointId; + } + + /** + * Setter for PricePointId. + * Price point identifier. + * @param pricePointId Value for Integer + */ + @JsonSetter("price_point_id") + public void setPricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + } + + /** + * Getter for Quantity. + * Optional quantity for the item. + * @return Returns the Integer + */ + @JsonGetter("quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getQuantity() { + return quantity; + } + + /** + * Setter for Quantity. + * Optional quantity for the item. + * @param quantity Value for Integer + */ + @JsonSetter("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Getter for CustomPrice. + * Custom pricing for a component within a scheduled renewal. + * @return Returns the ScheduledRenewalComponentCustomPrice + */ + @JsonGetter("custom_price") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ScheduledRenewalComponentCustomPrice getCustomPrice() { + return customPrice; + } + + /** + * Setter for CustomPrice. + * Custom pricing for a component within a scheduled renewal. + * @param customPrice Value for ScheduledRenewalComponentCustomPrice + */ + @JsonSetter("custom_price") + public void setCustomPrice(ScheduledRenewalComponentCustomPrice customPrice) { + this.customPrice = customPrice; + } + + /** + * Converts this ScheduledRenewalItemRequestBodyComponent into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalItemRequestBodyComponent [" + "itemType=" + itemType + ", itemId=" + + itemId + ", pricePointId=" + pricePointId + ", quantity=" + quantity + + ", customPrice=" + customPrice + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalItemRequestBodyComponent.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalItemRequestBodyComponent.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(itemType, itemId) + .pricePointId(getPricePointId()) + .quantity(getQuantity()) + .customPrice(getCustomPrice()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalItemRequestBodyComponent}. + */ + public static class Builder { + private String itemType = "Component"; + private int itemId; + private Integer pricePointId; + private Integer quantity; + private ScheduledRenewalComponentCustomPrice customPrice; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + */ + public Builder(String itemType, int itemId) { + this.itemType = itemType; + this.itemId = itemId; + } + + /** + * Setter for itemType. + * @param itemType String value for itemType. + * @return Builder + */ + public Builder itemType(String itemType) { + this.itemType = itemType; + return this; + } + + /** + * Setter for itemId. + * @param itemId int value for itemId. + * @return Builder + */ + public Builder itemId(int itemId) { + this.itemId = itemId; + return this; + } + + /** + * Setter for pricePointId. + * @param pricePointId Integer value for pricePointId. + * @return Builder + */ + public Builder pricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + return this; + } + + /** + * Setter for quantity. + * @param quantity Integer value for quantity. + * @return Builder + */ + public Builder quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Setter for customPrice. + * @param customPrice ScheduledRenewalComponentCustomPrice value for customPrice. + * @return Builder + */ + public Builder customPrice(ScheduledRenewalComponentCustomPrice customPrice) { + this.customPrice = customPrice; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalItemRequestBodyComponent} object using the set + * fields. + * @return {@link ScheduledRenewalItemRequestBodyComponent} + */ + public ScheduledRenewalItemRequestBodyComponent build() { + return new ScheduledRenewalItemRequestBodyComponent(itemType, itemId, pricePointId, + quantity, customPrice); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyProduct.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyProduct.java new file mode 100644 index 00000000..495666e9 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalItemRequestBodyProduct.java @@ -0,0 +1,280 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalItemRequestBodyProduct type. + */ +public class ScheduledRenewalItemRequestBodyProduct + extends BaseModel { + private String itemType; + private int itemId; + private Integer pricePointId; + private Integer quantity; + private ScheduledRenewalProductPricePoint customPrice; + + /** + * Default constructor. + */ + public ScheduledRenewalItemRequestBodyProduct() { + itemType = "Product"; + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + * @param pricePointId Integer value for pricePointId. + * @param quantity Integer value for quantity. + * @param customPrice ScheduledRenewalProductPricePoint value for customPrice. + */ + public ScheduledRenewalItemRequestBodyProduct( + String itemType, + int itemId, + Integer pricePointId, + Integer quantity, + ScheduledRenewalProductPricePoint customPrice) { + this.itemType = itemType; + this.itemId = itemId; + this.pricePointId = pricePointId; + this.quantity = quantity; + this.customPrice = customPrice; + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + */ + @JsonCreator + protected ScheduledRenewalItemRequestBodyProduct( + @JsonProperty("item_type") String itemType, + @JsonProperty("item_id") int itemId) { + this(itemType, itemId, null, null, null); + } + + /** + * Getter for ItemType. + * Item type to add. Either Product or Component. + * @return Returns the String + */ + @JsonGetter("item_type") + public String getItemType() { + return itemType; + } + + /** + * Setter for ItemType. + * Item type to add. Either Product or Component. + * @param itemType Value for String + */ + @JsonSetter("item_type") + private void setItemType(String itemType) { + this.itemType = itemType; + } + + /** + * Getter for ItemId. + * Product or component identifier. + * @return Returns the int + */ + @JsonGetter("item_id") + public int getItemId() { + return itemId; + } + + /** + * Setter for ItemId. + * Product or component identifier. + * @param itemId Value for int + */ + @JsonSetter("item_id") + public void setItemId(int itemId) { + this.itemId = itemId; + } + + /** + * Getter for PricePointId. + * Price point identifier. + * @return Returns the Integer + */ + @JsonGetter("price_point_id") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getPricePointId() { + return pricePointId; + } + + /** + * Setter for PricePointId. + * Price point identifier. + * @param pricePointId Value for Integer + */ + @JsonSetter("price_point_id") + public void setPricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + } + + /** + * Getter for Quantity. + * Optional quantity for the item. + * @return Returns the Integer + */ + @JsonGetter("quantity") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getQuantity() { + return quantity; + } + + /** + * Setter for Quantity. + * Optional quantity for the item. + * @param quantity Value for Integer + */ + @JsonSetter("quantity") + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + /** + * Getter for CustomPrice. + * Custom pricing for a product within a scheduled renewal. + * @return Returns the ScheduledRenewalProductPricePoint + */ + @JsonGetter("custom_price") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ScheduledRenewalProductPricePoint getCustomPrice() { + return customPrice; + } + + /** + * Setter for CustomPrice. + * Custom pricing for a product within a scheduled renewal. + * @param customPrice Value for ScheduledRenewalProductPricePoint + */ + @JsonSetter("custom_price") + public void setCustomPrice(ScheduledRenewalProductPricePoint customPrice) { + this.customPrice = customPrice; + } + + /** + * Converts this ScheduledRenewalItemRequestBodyProduct into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalItemRequestBodyProduct [" + "itemType=" + itemType + ", itemId=" + + itemId + ", pricePointId=" + pricePointId + ", quantity=" + quantity + + ", customPrice=" + customPrice + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalItemRequestBodyProduct.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalItemRequestBodyProduct.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(itemType, itemId) + .pricePointId(getPricePointId()) + .quantity(getQuantity()) + .customPrice(getCustomPrice()); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalItemRequestBodyProduct}. + */ + public static class Builder { + private String itemType = "Product"; + private int itemId; + private Integer pricePointId; + private Integer quantity; + private ScheduledRenewalProductPricePoint customPrice; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param itemType String value for itemType. + * @param itemId int value for itemId. + */ + public Builder(String itemType, int itemId) { + this.itemType = itemType; + this.itemId = itemId; + } + + /** + * Setter for itemType. + * @param itemType String value for itemType. + * @return Builder + */ + public Builder itemType(String itemType) { + this.itemType = itemType; + return this; + } + + /** + * Setter for itemId. + * @param itemId int value for itemId. + * @return Builder + */ + public Builder itemId(int itemId) { + this.itemId = itemId; + return this; + } + + /** + * Setter for pricePointId. + * @param pricePointId Integer value for pricePointId. + * @return Builder + */ + public Builder pricePointId(Integer pricePointId) { + this.pricePointId = pricePointId; + return this; + } + + /** + * Setter for quantity. + * @param quantity Integer value for quantity. + * @return Builder + */ + public Builder quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Setter for customPrice. + * @param customPrice ScheduledRenewalProductPricePoint value for customPrice. + * @return Builder + */ + public Builder customPrice(ScheduledRenewalProductPricePoint customPrice) { + this.customPrice = customPrice; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalItemRequestBodyProduct} object using the set fields. + * @return {@link ScheduledRenewalItemRequestBodyProduct} + */ + public ScheduledRenewalItemRequestBodyProduct build() { + return new ScheduledRenewalItemRequestBodyProduct(itemType, itemId, pricePointId, + quantity, customPrice); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalLockInRequest.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalLockInRequest.java new file mode 100644 index 00000000..374c3b96 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalLockInRequest.java @@ -0,0 +1,119 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.DateTimeHelper; +import io.apimatic.core.types.BaseModel; +import java.time.LocalDate; + +/** + * This is a model class for ScheduledRenewalLockInRequest type. + */ +public class ScheduledRenewalLockInRequest + extends BaseModel { + private LocalDate lockInAt; + + /** + * Default constructor. + */ + public ScheduledRenewalLockInRequest() { + } + + /** + * Initialization constructor. + * @param lockInAt LocalDate value for lockInAt. + */ + public ScheduledRenewalLockInRequest( + LocalDate lockInAt) { + this.lockInAt = lockInAt; + } + + /** + * Getter for LockInAt. + * Date to lock in the renewal. + * @return Returns the LocalDate + */ + @JsonGetter("lock_in_at") + @JsonSerialize(using = DateTimeHelper.SimpleDateSerializer.class) + public LocalDate getLockInAt() { + return lockInAt; + } + + /** + * Setter for LockInAt. + * Date to lock in the renewal. + * @param lockInAt Value for LocalDate + */ + @JsonSetter("lock_in_at") + @JsonDeserialize(using = DateTimeHelper.SimpleDateDeserializer.class) + public void setLockInAt(LocalDate lockInAt) { + this.lockInAt = lockInAt; + } + + /** + * Converts this ScheduledRenewalLockInRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalLockInRequest [" + "lockInAt=" + lockInAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalLockInRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalLockInRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(lockInAt); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalLockInRequest}. + */ + public static class Builder { + private LocalDate lockInAt; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param lockInAt LocalDate value for lockInAt. + */ + public Builder(LocalDate lockInAt) { + this.lockInAt = lockInAt; + } + + /** + * Setter for lockInAt. + * @param lockInAt LocalDate value for lockInAt. + * @return Builder + */ + public Builder lockInAt(LocalDate lockInAt) { + this.lockInAt = lockInAt; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalLockInRequest} object using the set fields. + * @return {@link ScheduledRenewalLockInRequest} + */ + public ScheduledRenewalLockInRequest build() { + return new ScheduledRenewalLockInRequest(lockInAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalProductPricePoint.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalProductPricePoint.java new file mode 100644 index 00000000..f42a3c43 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalProductPricePoint.java @@ -0,0 +1,488 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.maxio.advancedbilling.models.containers.ScheduledRenewalProductPricePointInterval; +import com.maxio.advancedbilling.models.containers.ScheduledRenewalProductPricePointPriceInCents; +import io.apimatic.core.types.BaseModel; +import io.apimatic.core.types.OptionalNullable; + +/** + * This is a model class for ScheduledRenewalProductPricePoint type. + */ +public class ScheduledRenewalProductPricePoint + extends BaseModel { + private String name; + private String handle; + private ScheduledRenewalProductPricePointPriceInCents priceInCents; + private ScheduledRenewalProductPricePointInterval interval; + private IntervalUnit intervalUnit; + private Boolean taxIncluded; + private Long initialChargeInCents; + private Integer expirationInterval; + private OptionalNullable expirationIntervalUnit; + + /** + * Default constructor. + */ + public ScheduledRenewalProductPricePoint() { + } + + /** + * Initialization constructor. + * @param priceInCents ScheduledRenewalProductPricePointPriceInCents value for priceInCents. + * @param interval ScheduledRenewalProductPricePointInterval value for interval. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @param name String value for name. + * @param handle String value for handle. + * @param taxIncluded Boolean value for taxIncluded. + * @param initialChargeInCents Long value for initialChargeInCents. + * @param expirationInterval Integer value for expirationInterval. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + */ + public ScheduledRenewalProductPricePoint( + ScheduledRenewalProductPricePointPriceInCents priceInCents, + ScheduledRenewalProductPricePointInterval interval, + IntervalUnit intervalUnit, + String name, + String handle, + Boolean taxIncluded, + Long initialChargeInCents, + Integer expirationInterval, + ExpirationIntervalUnit expirationIntervalUnit) { + this.name = name; + this.handle = handle; + this.priceInCents = priceInCents; + this.interval = interval; + this.intervalUnit = intervalUnit; + this.taxIncluded = taxIncluded; + this.initialChargeInCents = initialChargeInCents; + this.expirationInterval = expirationInterval; + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + } + + /** + * Initialization constructor. + * @param priceInCents ScheduledRenewalProductPricePointPriceInCents value for priceInCents. + * @param interval ScheduledRenewalProductPricePointInterval value for interval. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @param name String value for name. + * @param handle String value for handle. + * @param taxIncluded Boolean value for taxIncluded. + * @param initialChargeInCents Long value for initialChargeInCents. + * @param expirationInterval Integer value for expirationInterval. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + */ + + protected ScheduledRenewalProductPricePoint( + ScheduledRenewalProductPricePointPriceInCents priceInCents, + ScheduledRenewalProductPricePointInterval interval, IntervalUnit intervalUnit, + String name, String handle, Boolean taxIncluded, Long initialChargeInCents, + Integer expirationInterval, + OptionalNullable expirationIntervalUnit) { + this.name = name; + this.handle = handle; + this.priceInCents = priceInCents; + this.interval = interval; + this.intervalUnit = intervalUnit; + this.taxIncluded = taxIncluded; + this.initialChargeInCents = initialChargeInCents; + this.expirationInterval = expirationInterval; + this.expirationIntervalUnit = expirationIntervalUnit; + } + + /** + * Getter for Name. + * (Optional) + * @return Returns the String + */ + @JsonGetter("name") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getName() { + return name; + } + + /** + * Setter for Name. + * (Optional) + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for Handle. + * (Optional) + * @return Returns the String + */ + @JsonGetter("handle") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getHandle() { + return handle; + } + + /** + * Setter for Handle. + * (Optional) + * @param handle Value for String + */ + @JsonSetter("handle") + public void setHandle(String handle) { + this.handle = handle; + } + + /** + * Getter for PriceInCents. + * Required if using `custom_price` attribute. + * @return Returns the ScheduledRenewalProductPricePointPriceInCents + */ + @JsonGetter("price_in_cents") + public ScheduledRenewalProductPricePointPriceInCents getPriceInCents() { + return priceInCents; + } + + /** + * Setter for PriceInCents. + * Required if using `custom_price` attribute. + * @param priceInCents Value for ScheduledRenewalProductPricePointPriceInCents + */ + @JsonSetter("price_in_cents") + public void setPriceInCents(ScheduledRenewalProductPricePointPriceInCents priceInCents) { + this.priceInCents = priceInCents; + } + + /** + * Getter for Interval. + * Required if using `custom_price` attribute. + * @return Returns the ScheduledRenewalProductPricePointInterval + */ + @JsonGetter("interval") + public ScheduledRenewalProductPricePointInterval getInterval() { + return interval; + } + + /** + * Setter for Interval. + * Required if using `custom_price` attribute. + * @param interval Value for ScheduledRenewalProductPricePointInterval + */ + @JsonSetter("interval") + public void setInterval(ScheduledRenewalProductPricePointInterval interval) { + this.interval = interval; + } + + /** + * Getter for IntervalUnit. + * Required if using `custom_price` attribute. + * @return Returns the IntervalUnit + */ + @JsonGetter("interval_unit") + public IntervalUnit getIntervalUnit() { + return intervalUnit; + } + + /** + * Setter for IntervalUnit. + * Required if using `custom_price` attribute. + * @param intervalUnit Value for IntervalUnit + */ + @JsonSetter("interval_unit") + public void setIntervalUnit(IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + } + + /** + * Getter for TaxIncluded. + * (Optional) + * @return Returns the Boolean + */ + @JsonGetter("tax_included") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getTaxIncluded() { + return taxIncluded; + } + + /** + * Setter for TaxIncluded. + * (Optional) + * @param taxIncluded Value for Boolean + */ + @JsonSetter("tax_included") + public void setTaxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + } + + /** + * Getter for InitialChargeInCents. + * The product price point initial charge, in integer cents. + * @return Returns the Long + */ + @JsonGetter("initial_charge_in_cents") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Long getInitialChargeInCents() { + return initialChargeInCents; + } + + /** + * Setter for InitialChargeInCents. + * The product price point initial charge, in integer cents. + * @param initialChargeInCents Value for Long + */ + @JsonSetter("initial_charge_in_cents") + public void setInitialChargeInCents(Long initialChargeInCents) { + this.initialChargeInCents = initialChargeInCents; + } + + /** + * Getter for ExpirationInterval. + * The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an + * expiration_interval_unit of day would mean this product price point would expire after 30 + * days. + * @return Returns the Integer + */ + @JsonGetter("expiration_interval") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Integer getExpirationInterval() { + return expirationInterval; + } + + /** + * Setter for ExpirationInterval. + * The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an + * expiration_interval_unit of day would mean this product price point would expire after 30 + * days. + * @param expirationInterval Value for Integer + */ + @JsonSetter("expiration_interval") + public void setExpirationInterval(Integer expirationInterval) { + this.expirationInterval = expirationInterval; + } + + /** + * Internal Getter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either + * month, day or never + * @return Returns the Internal ExpirationIntervalUnit + */ + @JsonGetter("expiration_interval_unit") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetExpirationIntervalUnit() { + return this.expirationIntervalUnit; + } + + /** + * Getter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either + * month, day or never + * @return Returns the ExpirationIntervalUnit + */ + public ExpirationIntervalUnit getExpirationIntervalUnit() { + return OptionalNullable.getFrom(expirationIntervalUnit); + } + + /** + * Setter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either + * month, day or never + * @param expirationIntervalUnit Value for ExpirationIntervalUnit + */ + @JsonSetter("expiration_interval_unit") + public void setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) { + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + } + + /** + * UnSetter for ExpirationIntervalUnit. + * A string representing the expiration interval unit for this product price point, either + * month, day or never + */ + public void unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; + } + + /** + * Converts this ScheduledRenewalProductPricePoint into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalProductPricePoint [" + "priceInCents=" + priceInCents + + ", interval=" + interval + ", intervalUnit=" + intervalUnit + ", name=" + name + + ", handle=" + handle + ", taxIncluded=" + taxIncluded + ", initialChargeInCents=" + + initialChargeInCents + ", expirationInterval=" + expirationInterval + + ", expirationIntervalUnit=" + expirationIntervalUnit + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalProductPricePoint.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalProductPricePoint.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(priceInCents, interval, intervalUnit) + .name(getName()) + .handle(getHandle()) + .taxIncluded(getTaxIncluded()) + .initialChargeInCents(getInitialChargeInCents()) + .expirationInterval(getExpirationInterval()); + builder.expirationIntervalUnit = internalGetExpirationIntervalUnit(); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalProductPricePoint}. + */ + public static class Builder { + private ScheduledRenewalProductPricePointPriceInCents priceInCents; + private ScheduledRenewalProductPricePointInterval interval; + private IntervalUnit intervalUnit; + private String name; + private String handle; + private Boolean taxIncluded; + private Long initialChargeInCents; + private Integer expirationInterval; + private OptionalNullable expirationIntervalUnit; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param priceInCents ScheduledRenewalProductPricePointPriceInCents value for + * priceInCents. + * @param interval ScheduledRenewalProductPricePointInterval value for interval. + * @param intervalUnit IntervalUnit value for intervalUnit. + */ + public Builder(ScheduledRenewalProductPricePointPriceInCents priceInCents, + ScheduledRenewalProductPricePointInterval interval, IntervalUnit intervalUnit) { + this.priceInCents = priceInCents; + this.interval = interval; + this.intervalUnit = intervalUnit; + } + + /** + * Setter for priceInCents. + * @param priceInCents ScheduledRenewalProductPricePointPriceInCents value for + * priceInCents. + * @return Builder + */ + public Builder priceInCents(ScheduledRenewalProductPricePointPriceInCents priceInCents) { + this.priceInCents = priceInCents; + return this; + } + + /** + * Setter for interval. + * @param interval ScheduledRenewalProductPricePointInterval value for interval. + * @return Builder + */ + public Builder interval(ScheduledRenewalProductPricePointInterval interval) { + this.interval = interval; + return this; + } + + /** + * Setter for intervalUnit. + * @param intervalUnit IntervalUnit value for intervalUnit. + * @return Builder + */ + public Builder intervalUnit(IntervalUnit intervalUnit) { + this.intervalUnit = intervalUnit; + 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 handle. + * @param handle String value for handle. + * @return Builder + */ + public Builder handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Setter for taxIncluded. + * @param taxIncluded Boolean value for taxIncluded. + * @return Builder + */ + public Builder taxIncluded(Boolean taxIncluded) { + this.taxIncluded = taxIncluded; + return this; + } + + /** + * Setter for initialChargeInCents. + * @param initialChargeInCents Long value for initialChargeInCents. + * @return Builder + */ + public Builder initialChargeInCents(Long initialChargeInCents) { + this.initialChargeInCents = initialChargeInCents; + return this; + } + + /** + * Setter for expirationInterval. + * @param expirationInterval Integer value for expirationInterval. + * @return Builder + */ + public Builder expirationInterval(Integer expirationInterval) { + this.expirationInterval = expirationInterval; + return this; + } + + /** + * Setter for expirationIntervalUnit. + * @param expirationIntervalUnit ExpirationIntervalUnit value for expirationIntervalUnit. + * @return Builder + */ + public Builder expirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) { + this.expirationIntervalUnit = OptionalNullable.of(expirationIntervalUnit); + return this; + } + + /** + * UnSetter for expirationIntervalUnit. + * @return Builder + */ + public Builder unsetExpirationIntervalUnit() { + expirationIntervalUnit = null; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalProductPricePoint} object using the set fields. + * @return {@link ScheduledRenewalProductPricePoint} + */ + public ScheduledRenewalProductPricePoint build() { + return new ScheduledRenewalProductPricePoint(priceInCents, interval, intervalUnit, name, + handle, taxIncluded, initialChargeInCents, expirationInterval, + expirationIntervalUnit); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalUpdateRequest.java b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalUpdateRequest.java new file mode 100644 index 00000000..a75d61e9 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ScheduledRenewalUpdateRequest.java @@ -0,0 +1,118 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.maxio.advancedbilling.models.containers.ScheduledRenewalUpdateRequestRenewalConfigurationItem; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for ScheduledRenewalUpdateRequest type. + */ +public class ScheduledRenewalUpdateRequest + extends BaseModel { + private ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem; + + /** + * Default constructor. + */ + public ScheduledRenewalUpdateRequest() { + } + + /** + * Initialization constructor. + * @param renewalConfigurationItem ScheduledRenewalUpdateRequestRenewalConfigurationItem value + * for renewalConfigurationItem. + */ + public ScheduledRenewalUpdateRequest( + ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Getter for RenewalConfigurationItem. + * @return Returns the ScheduledRenewalUpdateRequestRenewalConfigurationItem + */ + @JsonGetter("renewal_configuration_item") + public ScheduledRenewalUpdateRequestRenewalConfigurationItem getRenewalConfigurationItem() { + return renewalConfigurationItem; + } + + /** + * Setter for RenewalConfigurationItem. + * @param renewalConfigurationItem Value for ScheduledRenewalUpdateRequestRenewalConfigurationItem + */ + @JsonSetter("renewal_configuration_item") + public void setRenewalConfigurationItem(ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Converts this ScheduledRenewalUpdateRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ScheduledRenewalUpdateRequest [" + "renewalConfigurationItem=" + + renewalConfigurationItem + ", additionalProperties=" + getAdditionalProperties() + + "]"; + } + + /** + * Builds a new {@link ScheduledRenewalUpdateRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ScheduledRenewalUpdateRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(renewalConfigurationItem); + return builder; + } + + /** + * Class to build instances of {@link ScheduledRenewalUpdateRequest}. + */ + public static class Builder { + private ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param renewalConfigurationItem ScheduledRenewalUpdateRequestRenewalConfigurationItem + * value for renewalConfigurationItem. + */ + public Builder( + ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + } + + /** + * Setter for renewalConfigurationItem. + * @param renewalConfigurationItem ScheduledRenewalUpdateRequestRenewalConfigurationItem + * value for renewalConfigurationItem. + * @return Builder + */ + public Builder renewalConfigurationItem( + ScheduledRenewalUpdateRequestRenewalConfigurationItem renewalConfigurationItem) { + this.renewalConfigurationItem = renewalConfigurationItem; + return this; + } + + /** + * Builds a new {@link ScheduledRenewalUpdateRequest} object using the set fields. + * @return {@link ScheduledRenewalUpdateRequest} + */ + public ScheduledRenewalUpdateRequest build() { + return new ScheduledRenewalUpdateRequest(renewalConfigurationItem); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/SendEmail.java b/src/main/java/com/maxio/advancedbilling/models/SendEmail.java new file mode 100644 index 00000000..ea3f5cb3 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/SendEmail.java @@ -0,0 +1,146 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonSetter; +import io.apimatic.core.types.BaseModel; + +/** + * This is a model class for SendEmail type. + */ +public class SendEmail + extends BaseModel { + private boolean canExecute; + private String url; + + /** + * Default constructor. + */ + public SendEmail() { + } + + /** + * Initialization constructor. + * @param canExecute boolean value for canExecute. + * @param url String value for url. + */ + public SendEmail( + boolean canExecute, + String url) { + this.canExecute = canExecute; + this.url = url; + } + + /** + * Getter for CanExecute. + * @return Returns the boolean + */ + @JsonGetter("can_execute") + public boolean getCanExecute() { + return canExecute; + } + + /** + * Setter for CanExecute. + * @param canExecute Value for boolean + */ + @JsonSetter("can_execute") + public void setCanExecute(boolean canExecute) { + this.canExecute = canExecute; + } + + /** + * Getter for Url. + * @return Returns the String + */ + @JsonGetter("url") + public String getUrl() { + return url; + } + + /** + * Setter for Url. + * @param url Value for String + */ + @JsonSetter("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Converts this SendEmail into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "SendEmail [" + "canExecute=" + canExecute + ", url=" + url + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link SendEmail.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link SendEmail.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder(canExecute, url); + return builder; + } + + /** + * Class to build instances of {@link SendEmail}. + */ + public static class Builder { + private boolean canExecute; + private String url; + + /** + * Initialization constructor. + */ + public Builder() { + } + + /** + * Initialization constructor. + * @param canExecute boolean value for canExecute. + * @param url String value for url. + */ + public Builder(boolean canExecute, String url) { + this.canExecute = canExecute; + this.url = url; + } + + /** + * Setter for canExecute. + * @param canExecute boolean value for canExecute. + * @return Builder + */ + public Builder canExecute(boolean canExecute) { + this.canExecute = canExecute; + return this; + } + + /** + * Setter for url. + * @param url String value for url. + * @return Builder + */ + public Builder url(String url) { + this.url = url; + return this; + } + + /** + * Builds a new {@link SendEmail} object using the set fields. + * @return {@link SendEmail} + */ + public SendEmail build() { + return new SendEmail(canExecute, url); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/SendInvoiceRequest.java b/src/main/java/com/maxio/advancedbilling/models/SendInvoiceRequest.java index d80bd0c3..76f0cd5b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SendInvoiceRequest.java +++ b/src/main/java/com/maxio/advancedbilling/models/SendInvoiceRequest.java @@ -20,6 +20,7 @@ public class SendInvoiceRequest private List recipientEmails; private List ccRecipientEmails; private List bccRecipientEmails; + private List attachmentUrls; /** * Default constructor. @@ -32,14 +33,17 @@ public SendInvoiceRequest() { * @param recipientEmails List of String value for recipientEmails. * @param ccRecipientEmails List of String value for ccRecipientEmails. * @param bccRecipientEmails List of String value for bccRecipientEmails. + * @param attachmentUrls List of String value for attachmentUrls. */ public SendInvoiceRequest( List recipientEmails, List ccRecipientEmails, - List bccRecipientEmails) { + List bccRecipientEmails, + List attachmentUrls) { this.recipientEmails = recipientEmails; this.ccRecipientEmails = ccRecipientEmails; this.bccRecipientEmails = bccRecipientEmails; + this.attachmentUrls = attachmentUrls; } /** @@ -99,6 +103,27 @@ public void setBccRecipientEmails(List bccRecipientEmails) { this.bccRecipientEmails = bccRecipientEmails; } + /** + * Getter for AttachmentUrls. + * Array of URLs to files to attach to the invoice email. Max 10 files, 10MB each. + * @return Returns the List of String + */ + @JsonGetter("attachment_urls") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getAttachmentUrls() { + return attachmentUrls; + } + + /** + * Setter for AttachmentUrls. + * Array of URLs to files to attach to the invoice email. Max 10 files, 10MB each. + * @param attachmentUrls Value for List of String + */ + @JsonSetter("attachment_urls") + public void setAttachmentUrls(List attachmentUrls) { + this.attachmentUrls = attachmentUrls; + } + /** * Converts this SendInvoiceRequest into string format. * @return String representation of this class @@ -107,7 +132,8 @@ public void setBccRecipientEmails(List bccRecipientEmails) { public String toString() { return "SendInvoiceRequest [" + "recipientEmails=" + recipientEmails + ", ccRecipientEmails=" + ccRecipientEmails + ", bccRecipientEmails=" - + bccRecipientEmails + ", additionalProperties=" + getAdditionalProperties() + "]"; + + bccRecipientEmails + ", attachmentUrls=" + attachmentUrls + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -119,7 +145,8 @@ public Builder toBuilder() { Builder builder = new Builder() .recipientEmails(getRecipientEmails()) .ccRecipientEmails(getCcRecipientEmails()) - .bccRecipientEmails(getBccRecipientEmails()); + .bccRecipientEmails(getBccRecipientEmails()) + .attachmentUrls(getAttachmentUrls()); return builder; } @@ -130,6 +157,7 @@ public static class Builder { private List recipientEmails; private List ccRecipientEmails; private List bccRecipientEmails; + private List attachmentUrls; @@ -163,12 +191,23 @@ public Builder bccRecipientEmails(List bccRecipientEmails) { return this; } + /** + * Setter for attachmentUrls. + * @param attachmentUrls List of String value for attachmentUrls. + * @return Builder + */ + public Builder attachmentUrls(List attachmentUrls) { + this.attachmentUrls = attachmentUrls; + return this; + } + /** * Builds a new {@link SendInvoiceRequest} object using the set fields. * @return {@link SendInvoiceRequest} */ public SendInvoiceRequest build() { - return new SendInvoiceRequest(recipientEmails, ccRecipientEmails, bccRecipientEmails); + return new SendInvoiceRequest(recipientEmails, ccRecipientEmails, bccRecipientEmails, + attachmentUrls); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/Status.java b/src/main/java/com/maxio/advancedbilling/models/Status.java new file mode 100644 index 00000000..4470021a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/Status.java @@ -0,0 +1,108 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; + + +/** + * Status to be used. + */ +public enum Status { + DRAFT, + + SCHEDULED, + + PENDING, + + CANCELED, + + ACTIVE, + + FULFILLED; + + + private static TreeMap valueMap = new TreeMap<>(); + private String value; + + static { + DRAFT.value = "draft"; + SCHEDULED.value = "scheduled"; + PENDING.value = "pending"; + CANCELED.value = "canceled"; + ACTIVE.value = "active"; + FULFILLED.value = "fulfilled"; + + valueMap.put("draft", DRAFT); + valueMap.put("scheduled", SCHEDULED); + valueMap.put("pending", PENDING); + valueMap.put("canceled", CANCELED); + valueMap.put("active", ACTIVE); + valueMap.put("fulfilled", FULFILLED); + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + * @throws IOException when provided value is not mapped to any enum member. + */ + @JsonCreator + public static Status constructFromString(String toConvert) throws IOException { + Status enumValue = fromString(toConvert); + if (enumValue == null) { + throw new IOException("Unable to create enum instance with value: " + toConvert); + } + return enumValue; + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + */ + public static Status fromString(String toConvert) { + return valueMap.get(toConvert); + } + + /** + * Returns the string value associated with the enum member. + * @return The string value against enum member. + */ + @JsonValue + public String value() { + return value; + } + + /** + * Get string representation of this enum. + */ + @Override + public String toString() { + return value.toString(); + } + + /** + * Convert list of Status values to list of string values. + * @param toConvert The list of Status values to convert. + * @return List of representative string values. + */ + public static List toValue(List toConvert) { + if (toConvert == null) { + return null; + } + List convertedValues = new ArrayList<>(); + for (Status enumValue : toConvert) { + convertedValues.add(enumValue.value); + } + return convertedValues; + } +} \ No newline at end of file diff --git a/src/main/java/com/maxio/advancedbilling/models/Subscription.java b/src/main/java/com/maxio/advancedbilling/models/Subscription.java index 586450a5..33c4aac3 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Subscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/Subscription.java @@ -12,7 +12,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.maxio.advancedbilling.DateTimeHelper; -import com.maxio.advancedbilling.models.containers.SubscriptionSnapDay; import io.apimatic.core.types.BaseModel; import io.apimatic.core.types.OptionalNullable; import java.time.ZonedDateTime; @@ -47,7 +46,7 @@ public class Subscription private String signupRevenue; private OptionalNullable delayedCancelAt; private OptionalNullable couponCode; - private OptionalNullable snapDay; + private OptionalNullable snapDay; private CollectionMethod paymentCollectionMethod; private Customer customer; private Product product; @@ -118,7 +117,7 @@ public Subscription() { * @param signupRevenue String value for signupRevenue. * @param delayedCancelAt ZonedDateTime value for delayedCancelAt. * @param couponCode String value for couponCode. - * @param snapDay SubscriptionSnapDay value for snapDay. + * @param snapDay String value for snapDay. * @param paymentCollectionMethod CollectionMethod value for paymentCollectionMethod. * @param customer Customer value for customer. * @param product Product value for product. @@ -183,7 +182,7 @@ public Subscription( String signupRevenue, ZonedDateTime delayedCancelAt, String couponCode, - SubscriptionSnapDay snapDay, + String snapDay, CollectionMethod paymentCollectionMethod, Customer customer, Product product, @@ -312,7 +311,7 @@ public Subscription( * @param signupRevenue String value for signupRevenue. * @param delayedCancelAt ZonedDateTime value for delayedCancelAt. * @param couponCode String value for couponCode. - * @param snapDay SubscriptionSnapDay value for snapDay. + * @param snapDay String value for snapDay. * @param paymentCollectionMethod CollectionMethod value for paymentCollectionMethod. * @param customer Customer value for customer. * @param product Product value for product. @@ -368,7 +367,7 @@ protected Subscription(Integer id, SubscriptionState state, Long balanceInCents, OptionalNullable currentPeriodStartedAt, SubscriptionState previousState, Integer signupPaymentId, String signupRevenue, OptionalNullable delayedCancelAt, OptionalNullable couponCode, - OptionalNullable snapDay, CollectionMethod paymentCollectionMethod, + OptionalNullable snapDay, CollectionMethod paymentCollectionMethod, Customer customer, Product product, CreditCardPaymentProfile creditCard, OptionalNullable group, BankAccountPaymentProfile bankAccount, OptionalNullable paymentType, OptionalNullable referralCode, @@ -1339,42 +1338,38 @@ public void unsetCouponCode() { /** * Internal Getter for SnapDay. - * The day of the month that the subscription will charge according to calendar billing rules, - * if used. - * @return Returns the Internal SubscriptionSnapDay + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. + * @return Returns the Internal String */ @JsonGetter("snap_day") @JsonInclude(JsonInclude.Include.NON_NULL) @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetSnapDay() { + protected OptionalNullable internalGetSnapDay() { return this.snapDay; } /** * Getter for SnapDay. - * The day of the month that the subscription will charge according to calendar billing rules, - * if used. - * @return Returns the SubscriptionSnapDay + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. + * @return Returns the String */ - public SubscriptionSnapDay getSnapDay() { + public String getSnapDay() { return OptionalNullable.getFrom(snapDay); } /** * Setter for SnapDay. - * The day of the month that the subscription will charge according to calendar billing rules, - * if used. - * @param snapDay Value for SubscriptionSnapDay + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. + * @param snapDay Value for String */ @JsonSetter("snap_day") - public void setSnapDay(SubscriptionSnapDay snapDay) { + public void setSnapDay(String snapDay) { this.snapDay = OptionalNullable.of(snapDay); } /** * UnSetter for SnapDay. - * The day of the month that the subscription will charge according to calendar billing rules, - * if used. + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. */ public void unsetSnapDay() { snapDay = null; @@ -1768,7 +1763,7 @@ public void unsetCouponUsesAllowed() { /** * Internal Getter for ReasonCode. - * If the subscription is canceled, this is their churn code. + * The churn reason code associated to a cancelled subscription. * @return Returns the Internal String */ @JsonGetter("reason_code") @@ -1780,7 +1775,7 @@ protected OptionalNullable internalGetReasonCode() { /** * Getter for ReasonCode. - * If the subscription is canceled, this is their churn code. + * The churn reason code associated to a cancelled subscription. * @return Returns the String */ public String getReasonCode() { @@ -1789,7 +1784,7 @@ public String getReasonCode() { /** * Setter for ReasonCode. - * If the subscription is canceled, this is their churn code. + * The churn reason code associated to a cancelled subscription. * @param reasonCode Value for String */ @JsonSetter("reason_code") @@ -1799,7 +1794,7 @@ public void setReasonCode(String reasonCode) { /** * UnSetter for ReasonCode. - * If the subscription is canceled, this is their churn code. + * The churn reason code associated to a cancelled subscription. */ public void unsetReasonCode() { reasonCode = null; @@ -2150,7 +2145,7 @@ public void unsetStoredCredentialTransactionId() { /** * Internal Getter for Reference. - * The reference value (provided by your app) for the subscription itelf. + * The reference value (provided by your app) for the subscription istelf. * @return Returns the Internal String */ @JsonGetter("reference") @@ -2162,7 +2157,7 @@ protected OptionalNullable internalGetReference() { /** * Getter for Reference. - * The reference value (provided by your app) for the subscription itelf. + * The reference value (provided by your app) for the subscription istelf. * @return Returns the String */ public String getReference() { @@ -2171,7 +2166,7 @@ public String getReference() { /** * Setter for Reference. - * The reference value (provided by your app) for the subscription itelf. + * The reference value (provided by your app) for the subscription istelf. * @param reference Value for String */ @JsonSetter("reference") @@ -2181,7 +2176,7 @@ public void setReference(String reference) { /** * UnSetter for Reference. - * The reference value (provided by your app) for the subscription itelf. + * The reference value (provided by your app) for the subscription istelf. */ public void unsetReference() { reference = null; @@ -2701,7 +2696,7 @@ public static class Builder { private String signupRevenue; private OptionalNullable delayedCancelAt; private OptionalNullable couponCode; - private OptionalNullable snapDay; + private OptionalNullable snapDay; private CollectionMethod paymentCollectionMethod; private Customer customer; private Product product; @@ -3101,10 +3096,10 @@ public Builder unsetCouponCode() { /** * Setter for snapDay. - * @param snapDay SubscriptionSnapDay value for snapDay. + * @param snapDay String value for snapDay. * @return Builder */ - public Builder snapDay(SubscriptionSnapDay snapDay) { + public Builder snapDay(String snapDay) { this.snapDay = OptionalNullable.of(snapDay); return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java index 2ec5fa43..08983383 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionComponent.java @@ -542,7 +542,7 @@ public void setRecurring(Boolean recurring) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -555,7 +555,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -565,7 +565,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -576,7 +576,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; @@ -585,7 +585,7 @@ public void unsetUpgradeCharge() { /** * Internal Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("downgrade_credit") @@ -598,7 +598,7 @@ protected OptionalNullable internalGetDowngradeCredit() { /** * Getter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getDowngradeCredit() { @@ -608,7 +608,7 @@ public CreditType getDowngradeCredit() { /** * Setter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param downgradeCredit Value for CreditType */ @JsonSetter("downgrade_credit") @@ -619,7 +619,7 @@ public void setDowngradeCredit(CreditType downgradeCredit) { /** * UnSetter for DowngradeCredit. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetDowngradeCredit() { downgradeCredit = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroup.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroup.java index 7507ca80..bfc6ed9f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroup.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroup.java @@ -21,6 +21,7 @@ */ public class SubscriptionGroup extends BaseModel { + private String uid; private Integer customerId; private SubscriptionGroupPaymentProfile paymentProfile; private CollectionMethod paymentCollectionMethod; @@ -35,6 +36,7 @@ public SubscriptionGroup() { /** * Initialization constructor. + * @param uid String value for uid. * @param customerId Integer value for customerId. * @param paymentProfile SubscriptionGroupPaymentProfile value for paymentProfile. * @param paymentCollectionMethod CollectionMethod value for paymentCollectionMethod. @@ -42,11 +44,13 @@ public SubscriptionGroup() { * @param createdAt ZonedDateTime value for createdAt. */ public SubscriptionGroup( + String uid, Integer customerId, SubscriptionGroupPaymentProfile paymentProfile, CollectionMethod paymentCollectionMethod, List subscriptionIds, ZonedDateTime createdAt) { + this.uid = uid; this.customerId = customerId; this.paymentProfile = paymentProfile; this.paymentCollectionMethod = paymentCollectionMethod; @@ -54,6 +58,25 @@ public SubscriptionGroup( this.createdAt = createdAt; } + /** + * Getter for Uid. + * @return Returns the String + */ + @JsonGetter("uid") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getUid() { + return uid; + } + + /** + * Setter for Uid. + * @param uid Value for String + */ + @JsonSetter("uid") + public void setUid(String uid) { + this.uid = uid; + } + /** * Getter for CustomerId. * @return Returns the Integer @@ -163,10 +186,10 @@ public void setCreatedAt(ZonedDateTime createdAt) { */ @Override public String toString() { - return "SubscriptionGroup [" + "customerId=" + customerId + ", paymentProfile=" - + paymentProfile + ", paymentCollectionMethod=" + paymentCollectionMethod - + ", subscriptionIds=" + subscriptionIds + ", createdAt=" + createdAt - + ", additionalProperties=" + getAdditionalProperties() + "]"; + return "SubscriptionGroup [" + "uid=" + uid + ", customerId=" + customerId + + ", paymentProfile=" + paymentProfile + ", paymentCollectionMethod=" + + paymentCollectionMethod + ", subscriptionIds=" + subscriptionIds + ", createdAt=" + + createdAt + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -176,6 +199,7 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder() + .uid(getUid()) .customerId(getCustomerId()) .paymentProfile(getPaymentProfile()) .paymentCollectionMethod(getPaymentCollectionMethod()) @@ -188,6 +212,7 @@ public Builder toBuilder() { * Class to build instances of {@link SubscriptionGroup}. */ public static class Builder { + private String uid; private Integer customerId; private SubscriptionGroupPaymentProfile paymentProfile; private CollectionMethod paymentCollectionMethod; @@ -196,6 +221,16 @@ public static class Builder { + /** + * Setter for uid. + * @param uid String value for uid. + * @return Builder + */ + public Builder uid(String uid) { + this.uid = uid; + return this; + } + /** * Setter for customerId. * @param customerId Integer value for customerId. @@ -251,7 +286,7 @@ public Builder createdAt(ZonedDateTime createdAt) { * @return {@link SubscriptionGroup} */ public SubscriptionGroup build() { - return new SubscriptionGroup(customerId, paymentProfile, paymentCollectionMethod, + return new SubscriptionGroup(uid, customerId, paymentProfile, paymentCollectionMethod, subscriptionIds, createdAt); } } diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupSignupItem.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupSignupItem.java index 5f81713d..d648501b 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupSignupItem.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupSignupItem.java @@ -306,7 +306,8 @@ public void setComponents(List components) { /** * Getter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @return Returns the SubscriptionCustomPrice */ @JsonGetter("custom_price") @@ -318,7 +319,8 @@ public SubscriptionCustomPrice getCustomPrice() { /** * Setter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @param customPrice Value for SubscriptionCustomPrice */ @JsonSetter("custom_price") diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java index a3a285a0..f0583e17 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionSort.java @@ -27,7 +27,15 @@ public enum SubscriptionSort { UPDATED_AT, - CREATED_AT; + CREATED_AT, + + TOTAL_PAYMENTS, + + ID, + + OPEN_BALANCE, + + EXPIRES_AT; private static TreeMap valueMap = new TreeMap<>(); @@ -40,6 +48,10 @@ public enum SubscriptionSort { NEXT_ASSESSMENT.value = "next_assessment"; UPDATED_AT.value = "updated_at"; CREATED_AT.value = "created_at"; + TOTAL_PAYMENTS.value = "total_payments"; + ID.value = "id"; + OPEN_BALANCE.value = "open_balance"; + EXPIRES_AT.value = "expires_at"; valueMap.put("signup_date", SIGNUP_DATE); valueMap.put("period_start", PERIOD_START); @@ -47,6 +59,10 @@ public enum SubscriptionSort { valueMap.put("next_assessment", NEXT_ASSESSMENT); valueMap.put("updated_at", UPDATED_AT); valueMap.put("created_at", CREATED_AT); + valueMap.put("total_payments", TOTAL_PAYMENTS); + valueMap.put("id", ID); + valueMap.put("open_balance", OPEN_BALANCE); + valueMap.put("expires_at", EXPIRES_AT); } /** diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java b/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java index 76c3ad3d..7157fba2 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateComponent.java @@ -342,7 +342,7 @@ public void setDisplayOnHostedPage(Boolean displayOnHostedPage) { /** * Internal Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the Internal CreditType */ @JsonGetter("upgrade_charge") @@ -355,7 +355,7 @@ protected OptionalNullable internalGetUpgradeCharge() { /** * Getter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @return Returns the CreditType */ public CreditType getUpgradeCharge() { @@ -365,7 +365,7 @@ public CreditType getUpgradeCharge() { /** * Setter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. * @param upgradeCharge Value for CreditType */ @JsonSetter("upgrade_charge") @@ -376,7 +376,7 @@ public void setUpgradeCharge(CreditType upgradeCharge) { /** * UnSetter for UpgradeCharge. * The type of credit to be created when upgrading/downgrading. Defaults to the component and - * then site setting if one is not provided. Available values: `full`, `prorated`, `none`. + * then site setting if one is not provided. */ public void unsetUpgradeCharge() { upgradeCharge = null; diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java index a6589cec..43ad063a 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java @@ -30,7 +30,7 @@ public class UpdateSubscription private Boolean productChangeDelayed; private String nextProductId; private String nextProductPricePointId; - private OptionalNullable snapDay; + private UpdateSubscriptionSnapDay snapDay; private ZonedDateTime initialBillingAt; private Boolean deferSignup; private ZonedDateTime nextBillingAt; @@ -109,7 +109,7 @@ public UpdateSubscription( this.productChangeDelayed = productChangeDelayed; this.nextProductId = nextProductId; this.nextProductPricePointId = nextProductPricePointId; - this.snapDay = OptionalNullable.of(snapDay); + this.snapDay = snapDay; this.initialBillingAt = initialBillingAt; this.deferSignup = deferSignup; this.nextBillingAt = nextBillingAt; @@ -157,7 +157,7 @@ public UpdateSubscription( protected UpdateSubscription(CreditCardAttributes creditCardAttributes, String productHandle, Integer productId, Boolean productChangeDelayed, String nextProductId, - String nextProductPricePointId, OptionalNullable snapDay, + String nextProductPricePointId, UpdateSubscriptionSnapDay snapDay, ZonedDateTime initialBillingAt, Boolean deferSignup, ZonedDateTime nextBillingAt, ZonedDateTime expiresAt, String paymentCollectionMethod, Boolean receivesInvoiceEmails, UpdateSubscriptionNetTerms netTerms, Integer storedCredentialTransactionId, @@ -309,47 +309,25 @@ public void setNextProductPricePointId(String nextProductPricePointId) { this.nextProductPricePointId = nextProductPricePointId; } - /** - * Internal Getter for SnapDay. - * Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or - * 'end'. - * @return Returns the Internal UpdateSubscriptionSnapDay - */ - @JsonGetter("snap_day") - @JsonInclude(JsonInclude.Include.NON_NULL) - @JsonSerialize(using = OptionalNullable.Serializer.class) - protected OptionalNullable internalGetSnapDay() { - return this.snapDay; - } - /** * Getter for SnapDay. - * Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or - * 'end'. + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. * @return Returns the UpdateSubscriptionSnapDay */ + @JsonGetter("snap_day") + @JsonInclude(JsonInclude.Include.NON_NULL) public UpdateSubscriptionSnapDay getSnapDay() { - return OptionalNullable.getFrom(snapDay); + return snapDay; } /** * Setter for SnapDay. - * Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or - * 'end'. + * A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. * @param snapDay Value for UpdateSubscriptionSnapDay */ @JsonSetter("snap_day") public void setSnapDay(UpdateSubscriptionSnapDay snapDay) { - this.snapDay = OptionalNullable.of(snapDay); - } - - /** - * UnSetter for SnapDay. - * Use for subscriptions with product eligible for calendar billing only. Value can be 1-28 or - * 'end'. - */ - public void unsetSnapDay() { - snapDay = null; + this.snapDay = snapDay; } /** @@ -574,7 +552,8 @@ public void setReference(String reference) { /** * Getter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @return Returns the SubscriptionCustomPrice */ @JsonGetter("custom_price") @@ -586,7 +565,8 @@ public SubscriptionCustomPrice getCustomPrice() { /** * Setter for CustomPrice. * (Optional) Used in place of `product_price_point_id` to define a custom price point unique to - * the subscription + * the subscription. A subscription can have up to 30 custom price points. Exceeding this limit + * will result in an API error. * @param customPrice Value for SubscriptionCustomPrice */ @JsonSetter("custom_price") @@ -757,6 +737,7 @@ public Builder toBuilder() { .productChangeDelayed(getProductChangeDelayed()) .nextProductId(getNextProductId()) .nextProductPricePointId(getNextProductPricePointId()) + .snapDay(getSnapDay()) .initialBillingAt(getInitialBillingAt()) .deferSignup(getDeferSignup()) .nextBillingAt(getNextBillingAt()) @@ -771,7 +752,6 @@ public Builder toBuilder() { .dunningCommunicationDelayEnabled(getDunningCommunicationDelayEnabled()) .productPricePointId(getProductPricePointId()) .productPricePointHandle(getProductPricePointHandle()); - builder.snapDay = internalGetSnapDay(); builder.dunningCommunicationDelayTimeZone = internalGetDunningCommunicationDelayTimeZone(); return builder; } @@ -786,7 +766,7 @@ public static class Builder { private Boolean productChangeDelayed; private String nextProductId; private String nextProductPricePointId; - private OptionalNullable snapDay; + private UpdateSubscriptionSnapDay snapDay; private ZonedDateTime initialBillingAt; private Boolean deferSignup = false; private ZonedDateTime nextBillingAt; @@ -871,16 +851,7 @@ public Builder nextProductPricePointId(String nextProductPricePointId) { * @return Builder */ public Builder snapDay(UpdateSubscriptionSnapDay snapDay) { - this.snapDay = OptionalNullable.of(snapDay); - return this; - } - - /** - * UnSetter for snapDay. - * @return Builder - */ - public Builder unsetSnapDay() { - snapDay = null; + this.snapDay = snapDay; return this; } diff --git a/src/main/java/com/maxio/advancedbilling/models/SnapDay.java b/src/main/java/com/maxio/advancedbilling/models/UpgradeChargeCreditType.java similarity index 65% rename from src/main/java/com/maxio/advancedbilling/models/SnapDay.java rename to src/main/java/com/maxio/advancedbilling/models/UpgradeChargeCreditType.java index 40d24884..37497f5e 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SnapDay.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpgradeChargeCreditType.java @@ -14,19 +14,27 @@ /** - * SnapDay to be used. + * UpgradeChargeCreditType to be used. */ -public enum SnapDay { - END; +public enum UpgradeChargeCreditType { + FULL, + PRORATED, - private static TreeMap valueMap = new TreeMap<>(); + NONE; + + + private static TreeMap valueMap = new TreeMap<>(); private String value; static { - END.value = "end"; + FULL.value = "full"; + PRORATED.value = "prorated"; + NONE.value = "none"; - valueMap.put("end", END); + valueMap.put("full", FULL); + valueMap.put("prorated", PRORATED); + valueMap.put("none", NONE); } /** @@ -36,8 +44,8 @@ public enum SnapDay { * @throws IOException when provided value is not mapped to any enum member. */ @JsonCreator - public static SnapDay constructFromString(String toConvert) throws IOException { - SnapDay enumValue = fromString(toConvert); + public static UpgradeChargeCreditType constructFromString(String toConvert) throws IOException { + UpgradeChargeCreditType enumValue = fromString(toConvert); if (enumValue == null) { throw new IOException("Unable to create enum instance with value: " + toConvert); } @@ -49,7 +57,7 @@ public static SnapDay constructFromString(String toConvert) throws IOException { * @param toConvert String value to get enum member. * @return The enum member against the given string value. */ - public static SnapDay fromString(String toConvert) { + public static UpgradeChargeCreditType fromString(String toConvert) { return valueMap.get(toConvert); } @@ -71,16 +79,16 @@ public String toString() { } /** - * Convert list of SnapDay values to list of string values. - * @param toConvert The list of SnapDay values to convert. + * Convert list of UpgradeChargeCreditType values to list of string values. + * @param toConvert The list of UpgradeChargeCreditType values to convert. * @return List of representative string values. */ - public static List toValue(List toConvert) { + public static List toValue(List toConvert) { if (toConvert == null) { return null; } List convertedValues = new ArrayList<>(); - for (SnapDay enumValue : toConvert) { + for (UpgradeChargeCreditType enumValue : toConvert) { convertedValues.add(enumValue.value); } return convertedValues; diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CalendarBillingSnapDay.java b/src/main/java/com/maxio/advancedbilling/models/containers/CalendarBillingSnapDay.java index 4913a587..301b7e02 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/CalendarBillingSnapDay.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/CalendarBillingSnapDay.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.models.SnapDay; import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; import java.io.IOException; import java.util.Arrays; @@ -37,12 +37,12 @@ public static CalendarBillingSnapDay fromNumber(int number) { } /** - * This is SnapDay case. - * @param snapDay SnapDay value for snapDay. - * @return The SnapDayCase object. + * This is String case. + * @param string String value for string. + * @return The StringCase object. */ - public static CalendarBillingSnapDay fromSnapDay(SnapDay snapDay) { - return snapDay == null ? null : new SnapDayCase(snapDay); + public static CalendarBillingSnapDay fromString(String string) { + return string == null ? null : new StringCase(string); } /** @@ -60,7 +60,7 @@ public static CalendarBillingSnapDay fromSnapDay(SnapDay snapDay) { public interface Cases { R number(int number); - R snapDay(SnapDay snapDay); + R string(String string); } /** @@ -98,36 +98,37 @@ public String toString() { } /** - * This is a implementation class for SnapDayCase. + * This is a implementation class for StringCase. */ @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "SnapDay") - private static class SnapDayCase extends CalendarBillingSnapDay { + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends CalendarBillingSnapDay { @JsonValue - private SnapDay snapDay; + private String string; - SnapDayCase(SnapDay snapDay) { - this.snapDay = snapDay; + StringCase(String string) { + this.string = string; } @Override public R match(Cases cases) { - return cases.snapDay(this.snapDay); + return cases.string(this.string); } @JsonCreator - private SnapDayCase(JsonNode jsonNode) throws IOException { - this.snapDay = - SnapDay.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.snapDay == null) { + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); + } else { throw new IllegalArgumentException(); } } @Override public String toString() { - return snapDay.toString(); + return string.toString(); } } @@ -143,7 +144,7 @@ public CalendarBillingSnapDay deserialize(JsonParser jp, DeserializationContext ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); return ApiHelper.deserialize(node, Arrays.asList(NumberCase.class, - SnapDayCase.class), true); + StringCase.class), true); } } diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionSnapDay.java b/src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointComponentId.java similarity index 64% rename from src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionSnapDay.java rename to src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointComponentId.java index 0630a4ea..ffb10081 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/SubscriptionSnapDay.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointComponentId.java @@ -16,33 +16,33 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.models.SnapDay; import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; import java.io.IOException; import java.util.Arrays; /** * This is a container class for one-of types. */ -@JsonDeserialize(using = SubscriptionSnapDay.SubscriptionSnapDayDeserializer.class) -public abstract class SubscriptionSnapDay { +@JsonDeserialize(using = CloneComponentPricePointComponentId.CloneComponentPricePointComponentIdDeserializer.class) +public abstract class CloneComponentPricePointComponentId { /** * This is Number case. * @param number int value for number. * @return The NumberCase object. */ - public static SubscriptionSnapDay fromNumber(int number) { + public static CloneComponentPricePointComponentId fromNumber(int number) { return new NumberCase(number); } /** - * This is SnapDay case. - * @param snapDay SnapDay value for snapDay. - * @return The SnapDayCase object. + * This is String case. + * @param string String value for string. + * @return The StringCase object. */ - public static SubscriptionSnapDay fromSnapDay(SnapDay snapDay) { - return snapDay == null ? null : new SnapDayCase(snapDay); + public static CloneComponentPricePointComponentId fromString(String string) { + return string == null ? null : new StringCase(string); } /** @@ -60,7 +60,7 @@ public static SubscriptionSnapDay fromSnapDay(SnapDay snapDay) { public interface Cases { R number(int number); - R snapDay(SnapDay snapDay); + R string(String string); } /** @@ -68,7 +68,7 @@ public interface Cases { */ @JsonDeserialize(using = JsonDeserializer.None.class) @TypeCombinatorCase(type = "int") - private static class NumberCase extends SubscriptionSnapDay { + private static class NumberCase extends CloneComponentPricePointComponentId { @JsonValue private int number; @@ -98,52 +98,53 @@ public String toString() { } /** - * This is a implementation class for SnapDayCase. + * This is a implementation class for StringCase. */ @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "SnapDay") - private static class SnapDayCase extends SubscriptionSnapDay { + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends CloneComponentPricePointComponentId { @JsonValue - private SnapDay snapDay; + private String string; - SnapDayCase(SnapDay snapDay) { - this.snapDay = snapDay; + StringCase(String string) { + this.string = string; } @Override public R match(Cases cases) { - return cases.snapDay(this.snapDay); + return cases.string(this.string); } @JsonCreator - private SnapDayCase(JsonNode jsonNode) throws IOException { - this.snapDay = - SnapDay.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.snapDay == null) { + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); + } else { throw new IllegalArgumentException(); } } @Override public String toString() { - return snapDay.toString(); + return string.toString(); } } /** - * This is a custom deserializer class for SubscriptionSnapDay. + * This is a custom deserializer class for CloneComponentPricePointComponentId. */ - protected static class SubscriptionSnapDayDeserializer - extends JsonDeserializer { + protected static class CloneComponentPricePointComponentIdDeserializer + extends JsonDeserializer { @Override - public SubscriptionSnapDay deserialize(JsonParser jp, DeserializationContext ctxt) + public CloneComponentPricePointComponentId deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); return ApiHelper.deserialize(node, Arrays.asList(NumberCase.class, - SnapDayCase.class), true); + StringCase.class), true); } } diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointPricePointId.java b/src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointPricePointId.java new file mode 100644 index 00000000..0a034375 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/containers/CloneComponentPricePointPricePointId.java @@ -0,0 +1,151 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models.containers; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.maxio.advancedbilling.ApiHelper; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; +import java.io.IOException; +import java.util.Arrays; + +/** + * This is a container class for one-of types. + */ +@JsonDeserialize(using = CloneComponentPricePointPricePointId.CloneComponentPricePointPricePointIdDeserializer.class) +public abstract class CloneComponentPricePointPricePointId { + + /** + * This is Number case. + * @param number int value for number. + * @return The NumberCase object. + */ + public static CloneComponentPricePointPricePointId fromNumber(int number) { + return new NumberCase(number); + } + + /** + * This is String case. + * @param string String value for string. + * @return The StringCase object. + */ + public static CloneComponentPricePointPricePointId fromString(String string) { + return string == null ? null : new StringCase(string); + } + + /** + * Method to match from the provided one-of cases. + * @param The type to return after applying callback. + * @param cases The one-of type cases callback. + * @return The one-of matched case. + */ + public abstract R match(Cases cases); + + /** + * This is interface for one-of cases. + * @param The type to return after applying callback. + */ + public interface Cases { + R number(int number); + + R string(String string); + } + + /** + * This is a implementation class for NumberCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "int") + private static class NumberCase extends CloneComponentPricePointPricePointId { + + @JsonValue + private int number; + + NumberCase(int number) { + this.number = number; + } + + @Override + public R match(Cases cases) { + return cases.number(this.number); + } + + @JsonCreator + private NumberCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isInt()) { + this.number = ApiHelper.deserialize(jsonNode, Integer.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return String.valueOf(number); + } + } + + /** + * This is a implementation class for StringCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends CloneComponentPricePointPricePointId { + + @JsonValue + private String string; + + StringCase(String string) { + this.string = string; + } + + @Override + public R match(Cases cases) { + return cases.string(this.string); + } + + @JsonCreator + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return string.toString(); + } + } + + /** + * This is a custom deserializer class for CloneComponentPricePointPricePointId. + */ + protected static class CloneComponentPricePointPricePointIdDeserializer + extends JsonDeserializer { + + @Override + public CloneComponentPricePointPricePointId deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode node = oc.readTree(jp); + return ApiHelper.deserialize(node, Arrays.asList(NumberCase.class, + StringCase.class), true); + } + } + +} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.java b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.java new file mode 100644 index 00000000..5bcc3d3c --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.java @@ -0,0 +1,148 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models.containers; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.maxio.advancedbilling.ApiHelper; +import com.maxio.advancedbilling.models.ScheduledRenewalItemRequestBodyComponent; +import com.maxio.advancedbilling.models.ScheduledRenewalItemRequestBodyProduct; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import java.io.IOException; +import java.util.Arrays; + +/** + * This is a container class for one-of types. + */ +@JsonDeserialize(using = ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.ScheduledRenewalConfigurationItemRequestRenewalConfigurationItemDeserializer.class) +public abstract class ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem { + + /** + * This is Scheduled Renewal Item Request Body Component case. + * @param scheduledRenewalItemRequestBodyComponent ScheduledRenewalItemRequestBodyComponent value for scheduledRenewalItemRequestBodyComponent. + * @return The ScheduledRenewalItemRequestBodyComponentCase object. + */ + public static ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem fromScheduledRenewalItemRequestBodyComponent( + ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) { + return scheduledRenewalItemRequestBodyComponent == null ? null : new ScheduledRenewalItemRequestBodyComponentCase(scheduledRenewalItemRequestBodyComponent); + } + + /** + * This is Scheduled Renewal Item Request Body Product case. + * @param scheduledRenewalItemRequestBodyProduct ScheduledRenewalItemRequestBodyProduct value for scheduledRenewalItemRequestBodyProduct. + * @return The ScheduledRenewalItemRequestBodyProductCase object. + */ + public static ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem fromScheduledRenewalItemRequestBodyProduct( + ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) { + return scheduledRenewalItemRequestBodyProduct == null ? null : new ScheduledRenewalItemRequestBodyProductCase(scheduledRenewalItemRequestBodyProduct); + } + + /** + * Method to match from the provided one-of cases. + * @param The type to return after applying callback. + * @param cases The one-of type cases callback. + * @return The one-of matched case. + */ + public abstract R match(Cases cases); + + /** + * This is interface for one-of cases. + * @param The type to return after applying callback. + */ + public interface Cases { + R scheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent); + + R scheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct); + } + + /** + * This is a implementation class for ScheduledRenewalItemRequestBodyComponentCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ScheduledRenewalItemRequestBodyComponent") + private static class ScheduledRenewalItemRequestBodyComponentCase extends ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem { + + @JsonValue + private ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent; + + ScheduledRenewalItemRequestBodyComponentCase(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) { + this.scheduledRenewalItemRequestBodyComponent = scheduledRenewalItemRequestBodyComponent; + } + + @Override + public R match(Cases cases) { + return cases.scheduledRenewalItemRequestBodyComponent(this.scheduledRenewalItemRequestBodyComponent); + } + + @JsonCreator + private ScheduledRenewalItemRequestBodyComponentCase(JsonNode jsonNode) throws IOException { + this.scheduledRenewalItemRequestBodyComponent = ApiHelper.deserialize(jsonNode, + ScheduledRenewalItemRequestBodyComponent.class); + } + + @Override + public String toString() { + return scheduledRenewalItemRequestBodyComponent.toString(); + } + } + + /** + * This is a implementation class for ScheduledRenewalItemRequestBodyProductCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ScheduledRenewalItemRequestBodyProduct") + private static class ScheduledRenewalItemRequestBodyProductCase extends ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem { + + @JsonValue + private ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct; + + ScheduledRenewalItemRequestBodyProductCase(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) { + this.scheduledRenewalItemRequestBodyProduct = scheduledRenewalItemRequestBodyProduct; + } + + @Override + public R match(Cases cases) { + return cases.scheduledRenewalItemRequestBodyProduct(this.scheduledRenewalItemRequestBodyProduct); + } + + @JsonCreator + private ScheduledRenewalItemRequestBodyProductCase(JsonNode jsonNode) throws IOException { + this.scheduledRenewalItemRequestBodyProduct = ApiHelper.deserialize(jsonNode, + ScheduledRenewalItemRequestBodyProduct.class); + } + + @Override + public String toString() { + return scheduledRenewalItemRequestBodyProduct.toString(); + } + } + + /** + * This is a custom deserializer class for ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem. + */ + protected static class ScheduledRenewalConfigurationItemRequestRenewalConfigurationItemDeserializer + extends JsonDeserializer { + + @Override + public ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode node = oc.readTree(jp); + return ApiHelper.deserialize(node, Arrays.asList( + ScheduledRenewalItemRequestBodyComponentCase.class, + ScheduledRenewalItemRequestBodyProductCase.class), true); + } + } + +} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointInterval.java b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointInterval.java new file mode 100644 index 00000000..206eda96 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointInterval.java @@ -0,0 +1,151 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models.containers; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.maxio.advancedbilling.ApiHelper; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; +import java.io.IOException; +import java.util.Arrays; + +/** + * This is a container class for one-of types. + */ +@JsonDeserialize(using = ScheduledRenewalProductPricePointInterval.ScheduledRenewalProductPricePointIntervalDeserializer.class) +public abstract class ScheduledRenewalProductPricePointInterval { + + /** + * This is String case. + * @param string String value for string. + * @return The StringCase object. + */ + public static ScheduledRenewalProductPricePointInterval fromString(String string) { + return string == null ? null : new StringCase(string); + } + + /** + * This is Number case. + * @param number int value for number. + * @return The NumberCase object. + */ + public static ScheduledRenewalProductPricePointInterval fromNumber(int number) { + return new NumberCase(number); + } + + /** + * Method to match from the provided one-of cases. + * @param The type to return after applying callback. + * @param cases The one-of type cases callback. + * @return The one-of matched case. + */ + public abstract R match(Cases cases); + + /** + * This is interface for one-of cases. + * @param The type to return after applying callback. + */ + public interface Cases { + R string(String string); + + R number(int number); + } + + /** + * This is a implementation class for StringCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends ScheduledRenewalProductPricePointInterval { + + @JsonValue + private String string; + + StringCase(String string) { + this.string = string; + } + + @Override + public R match(Cases cases) { + return cases.string(this.string); + } + + @JsonCreator + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return string.toString(); + } + } + + /** + * This is a implementation class for NumberCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "int") + private static class NumberCase extends ScheduledRenewalProductPricePointInterval { + + @JsonValue + private int number; + + NumberCase(int number) { + this.number = number; + } + + @Override + public R match(Cases cases) { + return cases.number(this.number); + } + + @JsonCreator + private NumberCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isInt()) { + this.number = ApiHelper.deserialize(jsonNode, Integer.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return String.valueOf(number); + } + } + + /** + * This is a custom deserializer class for ScheduledRenewalProductPricePointInterval. + */ + protected static class ScheduledRenewalProductPricePointIntervalDeserializer + extends JsonDeserializer { + + @Override + public ScheduledRenewalProductPricePointInterval deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode node = oc.readTree(jp); + return ApiHelper.deserialize(node, Arrays.asList(StringCase.class, + NumberCase.class), true); + } + } + +} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointPriceInCents.java b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointPriceInCents.java new file mode 100644 index 00000000..0796088a --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalProductPricePointPriceInCents.java @@ -0,0 +1,151 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models.containers; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.maxio.advancedbilling.ApiHelper; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; +import java.io.IOException; +import java.util.Arrays; + +/** + * This is a container class for one-of types. + */ +@JsonDeserialize(using = ScheduledRenewalProductPricePointPriceInCents.ScheduledRenewalProductPricePointPriceInCentsDeserializer.class) +public abstract class ScheduledRenewalProductPricePointPriceInCents { + + /** + * This is String case. + * @param string String value for string. + * @return The StringCase object. + */ + public static ScheduledRenewalProductPricePointPriceInCents fromString(String string) { + return string == null ? null : new StringCase(string); + } + + /** + * This is Long case. + * @param mLong long value for mLong. + * @return The LongCase object. + */ + public static ScheduledRenewalProductPricePointPriceInCents fromLong(long mLong) { + return new LongCase(mLong); + } + + /** + * Method to match from the provided one-of cases. + * @param The type to return after applying callback. + * @param cases The one-of type cases callback. + * @return The one-of matched case. + */ + public abstract R match(Cases cases); + + /** + * This is interface for one-of cases. + * @param The type to return after applying callback. + */ + public interface Cases { + R string(String string); + + R mLong(long mLong); + } + + /** + * This is a implementation class for StringCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends ScheduledRenewalProductPricePointPriceInCents { + + @JsonValue + private String string; + + StringCase(String string) { + this.string = string; + } + + @Override + public R match(Cases cases) { + return cases.string(this.string); + } + + @JsonCreator + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return string.toString(); + } + } + + /** + * This is a implementation class for LongCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "long") + private static class LongCase extends ScheduledRenewalProductPricePointPriceInCents { + + @JsonValue + private long mLong; + + LongCase(long mLong) { + this.mLong = mLong; + } + + @Override + public R match(Cases cases) { + return cases.mLong(this.mLong); + } + + @JsonCreator + private LongCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isLong()) { + this.mLong = ApiHelper.deserialize(jsonNode, Long.class); + } else { + throw new IllegalArgumentException(); + } + } + + @Override + public String toString() { + return String.valueOf(mLong); + } + } + + /** + * This is a custom deserializer class for ScheduledRenewalProductPricePointPriceInCents. + */ + protected static class ScheduledRenewalProductPricePointPriceInCentsDeserializer + extends JsonDeserializer { + + @Override + public ScheduledRenewalProductPricePointPriceInCents deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode node = oc.readTree(jp); + return ApiHelper.deserialize(node, Arrays.asList(StringCase.class, + LongCase.class), true); + } + } + +} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalUpdateRequestRenewalConfigurationItem.java b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalUpdateRequestRenewalConfigurationItem.java new file mode 100644 index 00000000..b44267ce --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/containers/ScheduledRenewalUpdateRequestRenewalConfigurationItem.java @@ -0,0 +1,148 @@ +/* + * AdvancedBilling + * + * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.maxio.advancedbilling.models.containers; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.maxio.advancedbilling.ApiHelper; +import com.maxio.advancedbilling.models.ScheduledRenewalItemRequestBodyComponent; +import com.maxio.advancedbilling.models.ScheduledRenewalItemRequestBodyProduct; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import java.io.IOException; +import java.util.Arrays; + +/** + * This is a container class for one-of types. + */ +@JsonDeserialize(using = ScheduledRenewalUpdateRequestRenewalConfigurationItem.ScheduledRenewalUpdateRequestRenewalConfigurationItemDeserializer.class) +public abstract class ScheduledRenewalUpdateRequestRenewalConfigurationItem { + + /** + * This is Scheduled Renewal Item Request Body Component case. + * @param scheduledRenewalItemRequestBodyComponent ScheduledRenewalItemRequestBodyComponent value for scheduledRenewalItemRequestBodyComponent. + * @return The ScheduledRenewalItemRequestBodyComponentCase object. + */ + public static ScheduledRenewalUpdateRequestRenewalConfigurationItem fromScheduledRenewalItemRequestBodyComponent( + ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) { + return scheduledRenewalItemRequestBodyComponent == null ? null : new ScheduledRenewalItemRequestBodyComponentCase(scheduledRenewalItemRequestBodyComponent); + } + + /** + * This is Scheduled Renewal Item Request Body Product case. + * @param scheduledRenewalItemRequestBodyProduct ScheduledRenewalItemRequestBodyProduct value for scheduledRenewalItemRequestBodyProduct. + * @return The ScheduledRenewalItemRequestBodyProductCase object. + */ + public static ScheduledRenewalUpdateRequestRenewalConfigurationItem fromScheduledRenewalItemRequestBodyProduct( + ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) { + return scheduledRenewalItemRequestBodyProduct == null ? null : new ScheduledRenewalItemRequestBodyProductCase(scheduledRenewalItemRequestBodyProduct); + } + + /** + * Method to match from the provided one-of cases. + * @param The type to return after applying callback. + * @param cases The one-of type cases callback. + * @return The one-of matched case. + */ + public abstract R match(Cases cases); + + /** + * This is interface for one-of cases. + * @param The type to return after applying callback. + */ + public interface Cases { + R scheduledRenewalItemRequestBodyComponent(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent); + + R scheduledRenewalItemRequestBodyProduct(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct); + } + + /** + * This is a implementation class for ScheduledRenewalItemRequestBodyComponentCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ScheduledRenewalItemRequestBodyComponent") + private static class ScheduledRenewalItemRequestBodyComponentCase extends ScheduledRenewalUpdateRequestRenewalConfigurationItem { + + @JsonValue + private ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent; + + ScheduledRenewalItemRequestBodyComponentCase(ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent) { + this.scheduledRenewalItemRequestBodyComponent = scheduledRenewalItemRequestBodyComponent; + } + + @Override + public R match(Cases cases) { + return cases.scheduledRenewalItemRequestBodyComponent(this.scheduledRenewalItemRequestBodyComponent); + } + + @JsonCreator + private ScheduledRenewalItemRequestBodyComponentCase(JsonNode jsonNode) throws IOException { + this.scheduledRenewalItemRequestBodyComponent = ApiHelper.deserialize(jsonNode, + ScheduledRenewalItemRequestBodyComponent.class); + } + + @Override + public String toString() { + return scheduledRenewalItemRequestBodyComponent.toString(); + } + } + + /** + * This is a implementation class for ScheduledRenewalItemRequestBodyProductCase. + */ + @JsonDeserialize(using = JsonDeserializer.None.class) + @TypeCombinatorCase(type = "ScheduledRenewalItemRequestBodyProduct") + private static class ScheduledRenewalItemRequestBodyProductCase extends ScheduledRenewalUpdateRequestRenewalConfigurationItem { + + @JsonValue + private ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct; + + ScheduledRenewalItemRequestBodyProductCase(ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct) { + this.scheduledRenewalItemRequestBodyProduct = scheduledRenewalItemRequestBodyProduct; + } + + @Override + public R match(Cases cases) { + return cases.scheduledRenewalItemRequestBodyProduct(this.scheduledRenewalItemRequestBodyProduct); + } + + @JsonCreator + private ScheduledRenewalItemRequestBodyProductCase(JsonNode jsonNode) throws IOException { + this.scheduledRenewalItemRequestBodyProduct = ApiHelper.deserialize(jsonNode, + ScheduledRenewalItemRequestBodyProduct.class); + } + + @Override + public String toString() { + return scheduledRenewalItemRequestBodyProduct.toString(); + } + } + + /** + * This is a custom deserializer class for ScheduledRenewalUpdateRequestRenewalConfigurationItem. + */ + protected static class ScheduledRenewalUpdateRequestRenewalConfigurationItemDeserializer + extends JsonDeserializer { + + @Override + public ScheduledRenewalUpdateRequestRenewalConfigurationItem deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode node = oc.readTree(jp); + return ApiHelper.deserialize(node, Arrays.asList( + ScheduledRenewalItemRequestBodyComponentCase.class, + ScheduledRenewalItemRequestBodyProductCase.class), true); + } + } + +} diff --git a/src/main/java/com/maxio/advancedbilling/models/containers/UpdateSubscriptionSnapDay.java b/src/main/java/com/maxio/advancedbilling/models/containers/UpdateSubscriptionSnapDay.java index 8fc0f996..9bd7eea1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/containers/UpdateSubscriptionSnapDay.java +++ b/src/main/java/com/maxio/advancedbilling/models/containers/UpdateSubscriptionSnapDay.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.maxio.advancedbilling.ApiHelper; -import com.maxio.advancedbilling.models.SnapDay; import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorCase; +import io.apimatic.core.annotations.TypeCombinator.TypeCombinatorStringCase; import java.io.IOException; import java.util.Arrays; @@ -27,6 +27,15 @@ @JsonDeserialize(using = UpdateSubscriptionSnapDay.UpdateSubscriptionSnapDayDeserializer.class) public abstract class UpdateSubscriptionSnapDay { + /** + * This is String case. + * @param string String value for string. + * @return The StringCase object. + */ + public static UpdateSubscriptionSnapDay fromString(String string) { + return string == null ? null : new StringCase(string); + } + /** * This is Number case. * @param number int value for number. @@ -36,15 +45,6 @@ public static UpdateSubscriptionSnapDay fromNumber(int number) { return new NumberCase(number); } - /** - * This is SnapDay case. - * @param snapDay SnapDay value for snapDay. - * @return The SnapDayCase object. - */ - public static UpdateSubscriptionSnapDay fromSnapDay(SnapDay snapDay) { - return snapDay == null ? null : new SnapDayCase(snapDay); - } - /** * Method to match from the provided one-of cases. * @param The type to return after applying callback. @@ -58,34 +58,35 @@ public static UpdateSubscriptionSnapDay fromSnapDay(SnapDay snapDay) { * @param The type to return after applying callback. */ public interface Cases { - R number(int number); + R string(String string); - R snapDay(SnapDay snapDay); + R number(int number); } /** - * This is a implementation class for NumberCase. + * This is a implementation class for StringCase. */ @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "int") - private static class NumberCase extends UpdateSubscriptionSnapDay { + @TypeCombinatorStringCase + @TypeCombinatorCase(type = "String") + private static class StringCase extends UpdateSubscriptionSnapDay { @JsonValue - private int number; + private String string; - NumberCase(int number) { - this.number = number; + StringCase(String string) { + this.string = string; } @Override public R match(Cases cases) { - return cases.number(this.number); + return cases.string(this.string); } @JsonCreator - private NumberCase(JsonNode jsonNode) throws IOException { - if (jsonNode.isInt()) { - this.number = ApiHelper.deserialize(jsonNode, Integer.class); + private StringCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isTextual()) { + this.string = ApiHelper.deserialize(jsonNode, String.class); } else { throw new IllegalArgumentException(); } @@ -93,41 +94,41 @@ private NumberCase(JsonNode jsonNode) throws IOException { @Override public String toString() { - return String.valueOf(number); + return string.toString(); } } /** - * This is a implementation class for SnapDayCase. + * This is a implementation class for NumberCase. */ @JsonDeserialize(using = JsonDeserializer.None.class) - @TypeCombinatorCase(type = "SnapDay") - private static class SnapDayCase extends UpdateSubscriptionSnapDay { + @TypeCombinatorCase(type = "int") + private static class NumberCase extends UpdateSubscriptionSnapDay { @JsonValue - private SnapDay snapDay; + private int number; - SnapDayCase(SnapDay snapDay) { - this.snapDay = snapDay; + NumberCase(int number) { + this.number = number; } @Override public R match(Cases cases) { - return cases.snapDay(this.snapDay); + return cases.number(this.number); } @JsonCreator - private SnapDayCase(JsonNode jsonNode) throws IOException { - this.snapDay = - SnapDay.fromString(ApiHelper.deserialize(jsonNode, String.class)); - if (this.snapDay == null) { + private NumberCase(JsonNode jsonNode) throws IOException { + if (jsonNode.isInt()) { + this.number = ApiHelper.deserialize(jsonNode, Integer.class); + } else { throw new IllegalArgumentException(); } } @Override public String toString() { - return snapDay.toString(); + return String.valueOf(number); } } @@ -142,8 +143,8 @@ public UpdateSubscriptionSnapDay deserialize(JsonParser jp, DeserializationConte throws IOException, JsonProcessingException { ObjectCodec oc = jp.getCodec(); JsonNode node = oc.readTree(jp); - return ApiHelper.deserialize(node, Arrays.asList(NumberCase.class, - SnapDayCase.class), true); + return ApiHelper.deserialize(node, Arrays.asList(StringCase.class, + NumberCase.class), true); } } diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/BaseCustomerInformationTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/BaseCustomerInformationTest.java index bf96b1fc..4a0589c0 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/BaseCustomerInformationTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/BaseCustomerInformationTest.java @@ -12,7 +12,7 @@ import com.maxio.advancedbilling.models.CreateMetafield; import com.maxio.advancedbilling.models.CreateMetafieldsRequest; import com.maxio.advancedbilling.models.CreateSubscriptionComponent; -import com.maxio.advancedbilling.models.CreditType; +import com.maxio.advancedbilling.models.UpgradeChargeCreditType; import com.maxio.advancedbilling.models.Customer; import com.maxio.advancedbilling.models.IncludeOption; import com.maxio.advancedbilling.models.Invoice; @@ -174,7 +174,7 @@ protected Invoice createOpenInvoice(Subscription subscription) throws ApiExcepti new CreateAllocation.Builder() .memo("Allocate metered for invoice") .quantity(100) - .upgradeCharge(CreditType.FULL) + .upgradeCharge(UpgradeChargeCreditType.FULL) .build()) ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoiceEventsTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoiceEventsTest.java index 49540d3f..88bf2b0f 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoiceEventsTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoiceEventsTest.java @@ -407,7 +407,7 @@ void shouldThrowUnauthorizedForInvalidCredentials() { void assertInvoiceInEvent(Invoice eventInvoice, Invoice invoice) { assertThat(eventInvoice.getAdditionalProperties()).satisfies(additionalProperties -> { - assertThat(additionalProperties.size()).isEqualTo(17); + assertThat(additionalProperties.size()).isEqualTo(20); assertThat(additionalProperties.get("statement_id")).isNull(); assertThat(additionalProperties.get("legacy_invoice_number")).isNull(); assertThat(additionalProperties.get("backported_at")).isNull(); @@ -423,6 +423,9 @@ void assertInvoiceInEvent(Invoice eventInvoice, Invoice invoice) { assertThat(additionalProperties.get("core_invoice_number")).isNull(); assertThat(additionalProperties.get("maxio_metadata")).isNull(); assertThat(additionalProperties.get("core_po_number")).isNull(); + assertThat(additionalProperties.get("surcharges")).asList().isEmpty(); + assertThat(additionalProperties.get("surcharge_amount")).isEqualTo("0.0"); + assertThat(additionalProperties.get("is_issuance_pending")).isEqualTo(false); }); assertThat(eventInvoice) .usingRecursiveComparison() diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReopenInvoiceTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReopenInvoiceTest.java index 7fd1e769..296ac21f 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReopenInvoiceTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReopenInvoiceTest.java @@ -10,7 +10,7 @@ import com.maxio.advancedbilling.models.CreateAllocation; import com.maxio.advancedbilling.models.CreateAllocationRequest; import com.maxio.advancedbilling.models.CreateSubscriptionComponent; -import com.maxio.advancedbilling.models.CreditType; +import com.maxio.advancedbilling.models.UpgradeChargeCreditType; import com.maxio.advancedbilling.models.Customer; import com.maxio.advancedbilling.models.Invoice; import com.maxio.advancedbilling.models.InvoiceStatus; @@ -127,7 +127,7 @@ private Invoice triggerCancelledInvoice(Subscription subscription) throws ApiExc new CreateAllocation.Builder() .memo("Allocate metered for invoice") .quantity(100) - .upgradeCharge(CreditType.FULL) + .upgradeCharge(UpgradeChargeCreditType.FULL) .build()) ); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerPreviewSignupProformaTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerPreviewSignupProformaTest.java index 9bba03d0..14eda861 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerPreviewSignupProformaTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerPreviewSignupProformaTest.java @@ -48,7 +48,7 @@ void shouldPreviewSignupProformaWithNextProforma() throws IOException, ApiExcept assertThat(previewWithData.preview().getNextProformaInvoice()).usingRecursiveComparison() .ignoringFields("createdAt", "subtotalAmount", "totalAmount", "uid", "lineItems", - "deliveryDate", "dueAmount") + "deliveryDate", "dueAmount", "availableActions.sendEmail.url") .isEqualTo(previewWithData.preview().getCurrentProformaInvoice()); }