diff --git a/README.md b/README.md index 80eb7d75..e0e863ff 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,21 @@ ## Introduction Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST. -One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries). -The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for Merchants who require it. +One of the many reasons to use Advanced Billing is the immense feature set and [client libraries](page:development-tools/client-libraries). +The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for merchants who require it. ### Steps to make your first Maxio Advanced Billing API call 1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio.zendesk.com/hc/en-us/articles/24250712113165-Testing-Overview) account. -2. [Setup and configure authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. -3. Submit your API request and try it out. -4. Verify results through response. -5. Test our integrations. +2. [Setup authentication](https://maxio.zendesk.com/hc/en-us/articles/24294819360525-API-Keys) credentials. +3. [Submit an API request and verify the response](page:development-tools/client-libraries#make-your-first-maxio-advanced-billing-api-request). +4. Test the Advanced Billing [integrations](https://www.maxio.com/integrations). -We strongly suggest exploring the developer portal, our [integrations](https://www.maxio.com/integrations) and the API guide, as well as the entire set of application-based documentation to aid in your discovery of the product. +Next, you can explore [authentication methods](page:introduction/authentication), [basic concepts](page:introduction/basic-concepts/connected-sites) for interacting with Advanced Billing via the API, and the entire set of [application-based documentation](https://docs.maxio.com/hc/en-us) to aid in your discovery of the product. -#### Example +#### Request Example -The following example uses the curl command-line tool to execute API requests. +The following example uses the curl command-line tool to make an API request. **Request** @@ -33,29 +32,35 @@ Install the SDK by adding the following dependency in your project's pom.xml fil com.maxio advanced-billing-sdk - 6.1.0 + 7.0.0 ``` You can also view the package at: -https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/6.1.0 +https://central.sonatype.com/artifact/com.maxio/advanced-billing-sdk/7.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/6.1.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-java-sdk/tree/7.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/6.1.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/6.1.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| 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/7.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/7.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: ```java +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; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .httpClientConfig(configBuilder -> configBuilder .timeout(0)) @@ -84,55 +89,65 @@ 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/6.1.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/controllers/webhooks.md) - -## Classes Documentation - -* [Utility Classes](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/utility-classes.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-string-response.md) -* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-context.md) -* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-body-request.md) -* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-callback-interface.md) -* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/headers.md) -* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/api-exception.md) -* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/configuration-interface.md) -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-client-configuration.md) -* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/6.1.0/doc/http-client-configuration-builder.md) +* [API Exports](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/controllers/webhooks.md) + +## SDK Infrastructure + +### Configuration + +* [Configuration Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/configuration-interface.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-client-configuration.md) +* [HttpClientConfiguration.Builder](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-client-configuration-builder.md) + +### HTTP + +* [Headers](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/headers.md) +* [HttpCallback Interface](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-callback-interface.md) +* [HttpContext](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-context.md) +* [HttpBodyRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-body-request.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/http-string-response.md) + +### Utilities + +* [ApiException](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/api-exception.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/api-helper.md) +* [FileWrapper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/file-wrapper.md) +* [DateTimeHelper](https://www.github.com/maxio-com/ab-java-sdk/tree/7.0.0/doc/date-time-helper.md) diff --git a/doc/api-exception.md b/doc/api-exception.md index 593ee783..a57e999b 100644 --- a/doc/api-exception.md +++ b/doc/api-exception.md @@ -1,5 +1,5 @@ -# ApiException Class +# ApiException This is the base class for all exceptions that represent an error response from the server. @@ -8,12 +8,12 @@ This is the base class for all exceptions that represent an error response from | Name | Description | | --- | --- | | `ApiException(String reason)` | Initialization constructor. | -| `ApiException(String reason,` [`HttpContext`](http-context.md) `context)` | Initialization constructor. | +| ApiException(String reason, [`HttpContext`](../doc/http-context.md) context) | Initialization constructor. | ## Methods | Name | Description | Return Type | | --- | --- | --- | | `getResponseCode()` | The HTTP response code from the API request | `int` | -| `getHeaders()` | The HTTP response body from the API request. | [`Headers`](headers.md) | +| `getHeaders()` | The HTTP response body from the API request. | [`Headers`](../doc/headers.md) | diff --git a/doc/api-helper.md b/doc/api-helper.md new file mode 100644 index 00000000..b24a9666 --- /dev/null +++ b/doc/api-helper.md @@ -0,0 +1,21 @@ + +# ApiHelper + +This is a Helper class with commonly used utilities for the SDK. + +## Fields + +| Name | Description | Type | +| --- | --- | --- | +| mapper | Deserialization of Json data. | `ObjectMapper` | + +## Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `serialize(Object obj)` | Json Serialization of a given object. | `String` | +| `deserialize(String json)` | Json deserialization of the given Json string. | `LinkedHashMap` | +| `deserialize(String json, Class clazz)` | Json deserialization of the given Json string. | ` T` | +| `deserialize(String json, TypeReference typeReference)` | JSON Deserialization of the given json string. | ` T` | +| `deserializeArray(String json, Class classArray)` | JSON Deserialization of the given json string. | ` List` | + diff --git a/doc/auth/basic-authentication.md b/doc/auth/basic-authentication.md index 0dc3d4a0..bb18ddbd 100644 --- a/doc/auth/basic-authentication.md +++ b/doc/auth/basic-authentication.md @@ -23,6 +23,9 @@ Documentation for accessing and setting credentials for BasicAuth. You must provide credentials in the client as shown in the following code snippet. ```java +import com.maxio.advancedbilling.AdvancedBillingClient; +import com.maxio.advancedbilling.authentication.BasicAuthModel; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .basicAuthCredentials(new BasicAuthModel.Builder( "BasicAuthUserName", diff --git a/doc/client.md b/doc/client.md index 4cfa7feb..95473ddb 100644 --- a/doc/client.md +++ b/doc/client.md @@ -5,14 +5,20 @@ 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`](http-client-configuration-builder.md) | Set up Http Client Configuration instance. | -| `basicAuthCredentials` | [`BasicAuthCredentials`](auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| site | `String` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | +| environment | `Environment` | 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 | The API client can be initialized as follows: ```java +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; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .httpClientConfig(configBuilder -> configBuilder .timeout(0)) @@ -75,7 +81,7 @@ The gateway for the SDK. This class acts as a factory for the Controllers and al | `getEnvironment()` | Current API environment. | `Environment` | | `getSite()` | The subdomain for your Advanced Billing site. | `String` | | `getHttpClient()` | The HTTP Client instance to use for making HTTP requests. | `HttpClient` | -| `getHttpClientConfig()` | Http Client Configuration instance. | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | +| `getHttpClientConfig()` | Http Client Configuration instance. | [`ReadonlyHttpClientConfiguration`](../doc/http-client-configuration.md) | | `getBasicAuthCredentials()` | The credentials to use with BasicAuth. | [`BasicAuthCredentials`](auth/basic-authentication.md) | | `getBaseUri(Server server)` | Get base URI by current environment | `String` | | `getBaseUri()` | Get base URI by current environment | `String` | diff --git a/doc/configuration-interface.md b/doc/configuration-interface.md index 59568589..4ea2e5a6 100644 --- a/doc/configuration-interface.md +++ b/doc/configuration-interface.md @@ -9,7 +9,7 @@ This is the interface for client class that holds the configuration getters. | --- | --- | --- | | `getEnvironment()` | Current API environment. | `Environment` | | `getSite()` | The subdomain for your Advanced Billing site. | `String` | -| `getHttpClientConfig()` | Http Client Configuration instance. | [`ReadonlyHttpClientConfiguration`](http-client-configuration.md) | +| `getHttpClientConfig()` | Http Client Configuration instance. | [`ReadonlyHttpClientConfiguration`](../doc/http-client-configuration.md) | | `getBaseUri(Server server)` | Get base URI by current environment. | `String` | | `getBaseUri()` | Get base URI by current environment. | `String` | diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 51942c16..53c40dec 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -37,8 +37,8 @@ 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` | +| `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` | ## Response Type @@ -87,8 +87,8 @@ 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` | +| `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` | ## Response Type @@ -137,8 +137,8 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 47b2364f..85e056ae 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -149,6 +149,7 @@ CreateComponentPricePointRequest body = new CreateComponentPricePointRequest.Bui "4.00" ) ) + .endingQuantity(null) .build() ) ) @@ -197,8 +198,8 @@ ComponentPricePointsResponse listComponentPricePoints( | --- | --- | --- | --- | | `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` | +| `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`. | ## Response Type @@ -213,7 +214,8 @@ ListComponentPricePointsInput listComponentPricePointsInput = new ListComponentP ) .page(2) .perPage(50) -Liquid error: Value cannot be null. (Parameter 'key').build(); +.filterType(Liquid error: Value cannot be null. (Parameter 'key')) +.build(); try { ComponentPricePointsResponse result = componentPricePointsController.listComponentPricePoints(listComponentPricePointsInput); @@ -881,8 +883,8 @@ 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` | +| `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 | diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 867ead59..111082de 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -722,7 +722,7 @@ ComponentResponse readComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -769,7 +769,8 @@ try { "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", - "product_family_name": "Chargify" + "product_family_name": "Chargify", + "product_family_handle": "chargify" } } ``` @@ -793,7 +794,7 @@ ComponentResponse updateProductFamilyComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | | `body` | [`UpdateComponentRequest`](../../doc/models/update-component-request.md) | Body, Optional | - | ## Response Type @@ -874,7 +875,7 @@ Component archiveComponent( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the component belongs | -| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`
**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | +| `componentId` | `String` | Template, Required | Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`

**Constraints**: *Pattern*: `/\A(?:\d+\|handle:(?:uuid:\|[a-z])(?:\w\|-)+)\z/` | ## Response Type @@ -948,8 +949,8 @@ List listComponents( | `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` | +| `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 | ## Response Type @@ -1020,6 +1021,7 @@ try { "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -1046,6 +1048,7 @@ try { "created_at": "2019-08-01T09:35:37-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } }, @@ -1072,6 +1075,7 @@ try { "created_at": "2019-08-01T09:35:38-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify", + "product_family_handle": "chargify", "use_site_exchange_rate": true } } @@ -1175,8 +1179,8 @@ List listComponentsForProductFamily( | --- | --- | --- | --- | | `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` | +| `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. | diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index e89204b4..23fe333d 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -123,8 +123,8 @@ 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` | +| `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`. | @@ -563,8 +563,8 @@ 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` | +| `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`. | @@ -988,8 +988,8 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/custom-fields.md b/doc/controllers/custom-fields.md index 85171b26..f33d00e7 100644 --- a/doc/controllers/custom-fields.md +++ b/doc/controllers/custom-fields.md @@ -42,7 +42,7 @@ Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource ### Metafields "On-the-Fly" -It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existant name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. +It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. ### Metafield Scope Warning @@ -150,8 +150,8 @@ ListMetafieldsResponse listMetafields( | --- | --- | --- | --- | | `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` | +| `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`. | ## Response Type @@ -392,8 +392,8 @@ PaginatedMetadata listMetadata( | --- | --- | --- | --- | | `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` | +| `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` | ## Response Type @@ -560,15 +560,15 @@ 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` | +| `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` | +| `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`. | ## Response Type diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index a2a13f7e..2b7c4ae5 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -165,8 +165,8 @@ 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` | +| `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. | diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index a0450ade..17b841f8 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -116,8 +116,8 @@ ListSegmentsResponse listSegmentsForPricePoint( | --- | --- | --- | --- | | `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` | +| `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 | ## Response Type diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 43fab79b..d9431561 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -95,11 +95,11 @@ 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` | +| `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` | +| `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. | @@ -222,11 +222,11 @@ 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` | +| `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` | +| `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`. | ## Response Type @@ -315,11 +315,11 @@ 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` | +| `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` | +| `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`. | ## Response Type diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index 0864228c..4d7b96d2 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -22,7 +22,7 @@ The Stats API is a very basic view of some Site-level stats. This API call only ## Stats Documentation -There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats reposnse. +There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats response. ``` https://subdomain.chargify.com/dashboard @@ -165,8 +165,8 @@ 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` | +| `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`. | ## Response Type @@ -261,8 +261,8 @@ SubscriptionMRRResponse listMrrPerSubscription( | --- | --- | --- | --- | | `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` | +| `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`. | ## Response Type diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index d1a7b438..619ce854 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -110,23 +110,24 @@ ListInvoicesResponse listInvoices( | `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. | -| `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` | +| `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` | +| `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` | ## Response Type @@ -595,7 +596,8 @@ try { "type": "credit_card" }, "transaction_id": 253028955, - "prepayment": false + "prepayment": false, + "received_on": "2018-07-26" } ], "public_url": "https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y" @@ -641,8 +643,8 @@ ListInvoiceEventsResponse listInvoiceEvents( | --- | --- | --- | --- | | `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` | +| `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`. | @@ -1055,51 +1057,7 @@ try { # Record Payment for Invoice -This API call should be used when you want to record a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. - -## Create a Payment from the existing payment profile - -In order to apply a payment to an invoice using an existing payment profile, specify `type` as `payment`, the amount less than the invoice total, and the customer's `payment_profile_id`. The ID of a payment profile might be retrieved via the Payment Profiles API endpoint. - -``` -{ - "type": "payment", - "payment": { - "amount": 10.00, - "payment_profile_id": 123 - } -} -``` - -## Create a Payment from the Subscription's Prepayment Account - -In order apply a prepayment to an invoice, specify the `type` as `prepayment`, and also the `amount`. - -``` -{ - "type": "prepayment", - "payment": { - "amount": 10.00 - } -} -``` - -Note that the `amount` must be less than or equal to the Subscription's Prepayment account balance. - -## Create a Payment from the Subscription's Service Credit Account - -In order to apply a service credit to an invoice, specify the `type` as `service_credit`, and also the `amount`: - -``` -{ - "type": "service_credit", - "payment": { - "amount": 10.00 - } -} -``` - -Note that Advanced Billing will attempt to fully pay the invoice's `due_amount` from the Subscription's Service Credit account. At this time, partial payments from a Service Credit Account are only allowed for consolidated invoices (subscription groups). Therefore, for normal invoices the Service Credit account balance must be greater than or equal to the invoice's `due_amount`. +Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. ```java Invoice recordPaymentForInvoice( @@ -1280,13 +1238,13 @@ 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` | +| `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` | ## Response Type @@ -2160,9 +2118,9 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index 6c7da68d..9c7cf3bc 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -144,8 +144,8 @@ 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` | +| `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`. | ## Response Type diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index d340e685..e9a860fe 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -390,8 +390,8 @@ 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` | +| `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 | ## Response Type @@ -425,6 +425,8 @@ try { "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -451,6 +453,8 @@ try { "id": 10188522, "first_name": "Frankie", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543712, "current_vault": "bogus", "vault_token": "123456789", @@ -492,6 +496,8 @@ Example response for Bank Account: "id": 10089892, "first_name": "Chester", "last_name": "Tester", + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", @@ -556,6 +562,8 @@ try { "card_type": "bogus", "expiration_month": 1, "expiration_year": 2022, + "created_at": "2025-01-01T00:00:00-05:00", + "updated_at": "2025-01-01T00:00:00-05:00", "customer_id": 14543792, "current_vault": "bogus", "vault_token": "1", diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 1beac8e1..14414516 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -30,8 +30,8 @@ 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` | +| `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. | diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 1dbaf060..24761332 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -128,8 +128,8 @@ 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` | +| `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. | @@ -148,7 +148,8 @@ ListProductPricePointsInput listProductPricePointsInput = new ListProductPricePo ) .page(2) .perPage(10) -Liquid error: Value cannot be null. (Parameter 'key').build(); +.filterType(Liquid error: Value cannot be null. (Parameter 'key')) +.build(); try { ListProductPricePointsResponse result = productPricePointsController.listProductPricePoints(listProductPricePointsInput); @@ -865,8 +866,8 @@ ListProductPricePointsResponse listAllProductPricePoints( | `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` | +| `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` | ## Response Type diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 6d645f5e..78141bb6 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -513,8 +513,8 @@ List listProducts( | `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` | +| `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`. | diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 90458b31..23397633 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -83,12 +83,12 @@ 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` | +| `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` | ## Response Type @@ -234,15 +234,15 @@ ListProformaInvoicesResponse listProformaInvoices( | `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` | +| `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` | ## Response Type diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index 053e8bea..d4f7830b 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -21,7 +21,7 @@ ReasonCodesController reasonCodesController = client.getReasonCodesController(); # Reason Codes Intro -ReasonCodes are a way to gain a high level view of why your customers are cancelling the subcription to your product or service. +ReasonCodes are a way to gain a high level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. @@ -93,8 +93,8 @@ 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` | +| `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` | ## Response Type @@ -138,7 +138,7 @@ try { "id": 1, "site_id": 2, "code": "CH1", - "description": "This doesnt meet my needs", + "description": "This does not meet my needs", "position": 2, "created_at": "2017-02-16T16:48:45-05:00", "updated_at": "2017-02-17T16:29:59-05:00" @@ -251,7 +251,7 @@ try { # Delete Reason Code -This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversable. +This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible. ```java OkResponse deleteReasonCode( diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index 1d6dc6d4..41bd3465 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -37,10 +37,10 @@ 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 <>"` | +| `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` | +| `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` | ## Response Type @@ -124,10 +124,10 @@ 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 <>"` | +| `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` | +| `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` | ## Response Type @@ -266,10 +266,10 @@ SaleRep readSalesRep( | --- | --- | --- | --- | | `sellerId` | `String` | Template, Required | The Chargify id of your seller account | | `salesRepId` | `String` | Template, Required | The Advanced Billing id of sales rep. | -| `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 <>"` | +| `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` | +| `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` | ## Response Type diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index 204b44c8..4186fd40 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -122,7 +122,7 @@ Void clearSite( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `cleanupScope` | [`CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.
**Default**: `CleanupScope.ALL` | +| `cleanupScope` | [`CleanupScope`](../../doc/models/cleanup-scope.md) | Query, Optional | `all`: Will clear all products, customers, and related subscriptions from the site.
`customers`: Will clear only customers and related subscriptions (leaving the products untouched) for the site.
Revenue will also be reset to 0.
Use in query `cleanup_scope=all`.

**Default**: `CleanupScope.ALL` | ## Response Type @@ -156,8 +156,8 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 798a9c26..35411a14 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -585,7 +585,7 @@ List listAllocations( | --- | --- | --- | --- | | `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` | +| `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` | ## Response Type @@ -1225,8 +1225,8 @@ List listUsages( | `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` | +| `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` | ## Response Type @@ -1336,6 +1336,7 @@ ActivateEventBasedComponent body = new ActivateEventBasedComponent.Builder() "5.0" ) ) + .endingQuantity(null) .build() ) ) @@ -1526,8 +1527,8 @@ 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` | +| `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 | @@ -1536,7 +1537,7 @@ ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( | `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` | +| `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`. | diff --git a/doc/controllers/subscription-group-invoice-account.md b/doc/controllers/subscription-group-invoice-account.md index d34470a6..3965fd47 100644 --- a/doc/controllers/subscription-group-invoice-account.md +++ b/doc/controllers/subscription-group-invoice-account.md @@ -84,8 +84,8 @@ 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` | +| `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 | ## Response Type diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 217d33d4..f42eeec3 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -180,8 +180,8 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/subscription-invoice-account.md b/doc/controllers/subscription-invoice-account.md index f7906c37..1d7a220b 100644 --- a/doc/controllers/subscription-invoice-account.md +++ b/doc/controllers/subscription-invoice-account.md @@ -15,6 +15,7 @@ SubscriptionInvoiceAccountController subscriptionInvoiceAccountController = clie * [List Prepayments](../../doc/controllers/subscription-invoice-account.md#list-prepayments) * [Issue Service Credit](../../doc/controllers/subscription-invoice-account.md#issue-service-credit) * [Deduct Service Credit](../../doc/controllers/subscription-invoice-account.md#deduct-service-credit) +* [List Service Credits](../../doc/controllers/subscription-invoice-account.md#list-service-credits) * [Refund Prepayment](../../doc/controllers/subscription-invoice-account.md#refund-prepayment) @@ -142,8 +143,8 @@ 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` | +| `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 | ## Response Type @@ -319,6 +320,85 @@ try { | 422 | Unprocessable Entity (WebDAV) | `ApiException` | +# List Service Credits + +This request will list a subscription's service credits. + +```java +ListServiceCreditsResponse listServiceCredits( + final int subscriptionId, + final Integer page, + final Integer perPage, + final SortingDirection direction) +``` + +## Parameters + +| 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` | +| `direction` | [`SortingDirection`](../../doc/models/sorting-direction.md) | Query, Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | + +## Response Type + +[`ListServiceCreditsResponse`](../../doc/models/list-service-credits-response.md) + +## Example Usage + +```java +int subscriptionId = 222; +Integer page = 2; +Integer perPage = 50; + +try { + ListServiceCreditsResponse result = subscriptionInvoiceAccountController.listServiceCredits(subscriptionId, page, perPage, null); + System.out.println(result); +} catch (ApiException e) { + e.printStackTrace(); +} catch (IOException e) { + e.printStackTrace(); +} +``` + +## Example Response *(as JSON)* + +```json +{ + "service_credits": [ + { + "id": 68, + "amount_in_cents": 2200, + "ending_balance_in_cents": 1100, + "entry_type": "Debit", + "memo": "Service credit memo", + "invoice_uid": "inv_brntdvmmqxc3j", + "remaining_balance_in_cents": 1100, + "created_at": "2025-04-01T09:54:49-04:00" + }, + { + "id": 67, + "amount_in_cents": 3300, + "ending_balance_in_cents": 3300, + "entry_type": "Credit", + "memo": "Service credit memo", + "invoice_uid": null, + "remaining_balance_in_cents": 1100, + "created_at": "2025-03-05T16:06:08-05:00" + } + ] +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | `ApiException` | +| 422 | Unprocessable Entity | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + # Refund Prepayment This endpoint will refund, completely or partially, a particular prepayment applied to a 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. diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index f8c036c1..2e84b5e5 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -90,8 +90,8 @@ 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` | +| `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` | ## Response Type diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index f7fd66f2..2ade2c38 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -401,7 +401,7 @@ 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` | +| `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 @@ -411,9 +411,9 @@ SubscriptionResponse resumeSubscription( ```java int subscriptionId = 222; -Liquid error: Value cannot be null. (Parameter 'key') + try { - SubscriptionResponse result = subscriptionStatusController.resumeSubscription(subscriptionId, Liquid error: Value cannot be null. (Parameter 'key')); + SubscriptionResponse result = subscriptionStatusController.resumeSubscription(subscriptionId, null); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 9745c627..278b9386 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -164,42 +164,6 @@ If you already have a customer and card stored in your payment gateway, you may } ``` -## Subscription with Credit Card - -```json -"subscription": { - "product_handle": "basic", - "customer_attributes": { - "first_name": "Joe", - "last_name": "Blow", - "email": "joe@example.com", - "zip": "02120", - "state": "MA", - "reference": "XYZ", - "phone": "(617) 111 - 0000", - "organization": "Acme", - "country": "US", - "city": "Boston", - "address_2": null, - "address": "123 Mass Ave." - }, - "credit_card_attributes": { - "last_name": "Smith", - "first_name": "Joe", - "full_number": "4111111111111111", - "expiration_year": "2021", - "expiration_month": "1", - "card_type": "visa", - "billing_zip": "02120", - "billing_state": "MA", - "billing_country": "US", - "billing_city": "Boston", - "billing_address_2": null, - "billing_address": "123 Mass Ave." - } -} -``` - ## Subscription with ACH as Payment Profile ```json @@ -898,12 +862,13 @@ 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` | +| `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`. | @@ -911,7 +876,7 @@ List listSubscriptions( | `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` | +| `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`. | ## Response Type @@ -1012,12 +977,8 @@ SubscriptionResponse updateSubscription( int subscriptionId = 222; UpdateSubscriptionRequest body = new UpdateSubscriptionRequest.Builder( new UpdateSubscription.Builder() - .creditCardAttributes(new CreditCardAttributes.Builder() - .fullNumber("4111111111111111") - .expirationMonth("10") - .expirationYear("2030") - .build()) .nextBillingAt(DateTimeHelper.fromRfc8601DateTime("2010-08-06T15:34:00Z")) + .paymentCollectionMethod("remittance") .build() ) .build(); @@ -1569,11 +1530,11 @@ try { The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. -The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). +The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. -## Side effects +A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction. -A subscription will not be created by sending a POST to this endpoint. It is meant to serve as a prediction. +For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). ## Taxable Subscriptions diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 9f6f2f36..30aa1bf8 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -47,8 +47,8 @@ List listWebhooks( | `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` | +| `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 | diff --git a/doc/date-time-helper.md b/doc/date-time-helper.md new file mode 100644 index 00000000..474765f5 --- /dev/null +++ b/doc/date-time-helper.md @@ -0,0 +1,54 @@ + +# DateTimeHelper + +This is a utility class for DateTime operations. + +## Local Date Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `fromSimpleDate(String date)` | Parse a simple date string to a LocalDate object. | `LocalDate` | +| `toSimpleDate(LocalDate value)` | Convert a LocalDate object to a string. | `String` | +| `toSimpleDate(List values)` | Convert a List of LocalDate objects to strings. | `List` | +| `toSimpleDate(Map values)` | Convert a Map of LocalDate objects to strings. | `Map` | +| `toArrayOfMapOfSimpleDate(List> values)` | Convert a List of Map of LocalDate objects to strings. | `List>` | + +## Rfc1123 Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `fromRfc1123DateTime(String date)` | Parse a datetime string in Rfc1123 format to a DateTime object. | `ZonedDateTime` | +| `toRfc1123DateTime(ZonedDateTime value)` | Convert a DateTime object to a Rfc1123 formatted string. | `String` | +| `toRfc1123DateTime(List values)` | Convert a List of DateTime objects to Rfc1123 formatted strings. | `List` | +| `toRfc1123DateTime(Map values)` | Convert a Map of DateTime objects to Rfc1123 formatted strings. | `Map` | +| `toArrayOfMapOfRfc1123DateTime(List values)` | Convert a List of Map of DateTime objects to Rfc1123 formatted strings. | `List>` | + +## Rfc8601(Rfc3339) Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `fromRfc8601DateTime(String date)` | Parse a datetime string in Rfc8601(Rfc3339) format to a DateTime object. | `ZonedDateTime` | +| `toRfc8601DateTime(ZonedDateTime value)` | Convert a DateTime object to a Rfc8601(Rfc3339) formatted string. | `String` | +| `toRfc8601DateTime(List values)` | Convert a List of DateTime objects to Rfc8601(Rfc3339) formatted strings. | `List` | +| `toRfc8601DateTime(Map values)` | Convert a Map of DateTime objects to Rfc8601(Rfc3339) formatted strings. | `Map` | +| `toArrayOfMapOfRfc8601DateTime(List values)` | Convert a List of Map of DateTime objects to Rfc8601(Rfc3339) formatted strings. | `List>` | + +## Unix Timestamp Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `fromUnixTimestamp(String date)` | Parse a Unix Timestamp string to a DateTime object. | `ZonedDateTime` | +| `toUnixTimestamp(ZonedDateTime value)` | Convert a DateTime object to a Unix Timestamp string. | `String` | +| `toUnixTimestamp(List values)` | Convert a List of DateTime objects to Unix Timestamp strings. | `List` | +| `toUnixTimestamp(Map values)` | Convert a Map of DateTime objects to Unix Timestamp strings. | `Map` | + +## Unix Timestamp(Long) Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `fromUnixTimestamp(Long date)` | Parse a Unix Timestamp to a DateTime object. | `ZonedDateTime` | +| `toUnixTimestampLong(ZonedDateTime value)` | Convert a DateTime object to a Unix Timestamp. | `Long` | +| `toUnixTimestampLong(List values)` | Convert a List of DateTime objects to Unix Timestamp. | `List` | +| `toUnixTimestampLong(Map values)` | Convert a Map of DateTime objects to Unix Timestamp. | `Map` | +| `toArrayOfMapOfUnixTimestampLong(List values)` | Convert a List of Map DateTime objects to Unix Timestamp. | `List>` | + diff --git a/doc/file-wrapper.md b/doc/file-wrapper.md new file mode 100644 index 00000000..e174e177 --- /dev/null +++ b/doc/file-wrapper.md @@ -0,0 +1,19 @@ + +# FileWrapper + +Class to wrap file and contentType to be sent as part of a HTTP request. + +## Constructors + +| Name | Description | +| --- | --- | +| `FileWrapper(File file)` | Initialization constructor. | +| `FileWrapper(File file, String contentType)` | Initialization constructor. | + +## Methods + +| Name | Description | Return Type | +| --- | --- | --- | +| `getFile()` | File instance. | `File` | +| `getContentType()` | Content type of the file. | `String` | + diff --git a/doc/headers.md b/doc/headers.md index 4ea4cdf5..4ef94c76 100644 --- a/doc/headers.md +++ b/doc/headers.md @@ -1,5 +1,5 @@ -# Headers Class +# Headers Class for creating and managing HTTP Headers. diff --git a/doc/http-body-request.md b/doc/http-body-request.md index a0184238..6dbef8ee 100644 --- a/doc/http-body-request.md +++ b/doc/http-body-request.md @@ -1,14 +1,8 @@ -# HttpBodyRequest Class +# HttpBodyRequest HTTP Request with an explicit body. -## Constructors - -| Name | Description | -| --- | --- | -| `HttpBodyRequest(HttpMethod method, StringBuilder queryUrlBuilder,` [`Headers`](headers.md) `headers, Map queryParams, Object body)` | Create a request with explicit body. | - ## Methods | Name | Description | Return Type | diff --git a/doc/http-callback-interface.md b/doc/http-callback-interface.md index 525329e9..1698fa15 100644 --- a/doc/http-callback-interface.md +++ b/doc/http-callback-interface.md @@ -7,6 +7,6 @@ Callback to be called before and after the HTTP call for an endpoint is made. | Name | Description | Return Type | | --- | --- | --- | -| `onBeforeRequest(`[`HttpRequest`](http-request.md) `request)` | Callback called just before the HTTP request is sent. | `void` | -| `onAfterResponse(`[`HttpContext`](http-context.md) `context)` | Callback called just after the HTTP response is received. | `void` | +| onBeforeRequest([`HttpRequest`](../doc/http-request.md) request) | Callback called just before the HTTP request is sent. | `void` | +| onAfterResponse([`HttpContext`](../doc/http-context.md) context) | Callback called just after the HTTP response is received. | `void` | diff --git a/doc/http-client-configuration-builder.md b/doc/http-client-configuration-builder.md index 3eb84de3..27777c38 100644 --- a/doc/http-client-configuration-builder.md +++ b/doc/http-client-configuration-builder.md @@ -1,7 +1,7 @@ -# HttpClientConfiguration.Builder Class +# HttpClientConfiguration.Builder -Class to build instances of {@link HttpClientConfiguration}. +Class to build instances of [HttpClientConfiguration](../doc/http-client-configuration.md). ## Constructors @@ -13,15 +13,15 @@ Class to build instances of {@link HttpClientConfiguration}. | Name | Description | Return Type | | --- | --- | --- | -| `timeout(long timeout)` | Sets the timeout in seconds to use for making http requests. | [`Builder`](http-client-configuration-builder.md) | -| `numberOfRetries(int numberOfRetries)` | Sets the number of retries to make. | [`Builder`](http-client-configuration-builder.md) | -| `backOffFactor(int backOffFactor)` | Sets to use in calculation of wait time for next request in case of failure. | [`Builder`](http-client-configuration-builder.md) | -| `retryInterval(long retryInterval)` | Sets to use in calculation of wait time for next request in case of failure. | [`Builder`](http-client-configuration-builder.md) | -| `httpStatusCodesToRetry(Set httpStatusCodesToRetry)` | Sets http status codes to retry against. | [`Builder`](http-client-configuration-builder.md) | -| `httpMethodsToRetry(Set httpMethodsToRetry)` | Sets http methods to retry against. | [`Builder`](http-client-configuration-builder.md) | -| `maximumRetryWaitTime(long maximumRetryWaitTime)` | Sets the maximum wait time for overall retrying requests. | [`Builder`](http-client-configuration-builder.md) | -| `shouldRetryOnTimeout(boolean shouldRetryOnTimeout)` | Sets whether to retry on request timeout. | [`Builder`](http-client-configuration-builder.md) | -| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance)` | Sets the okhttpclient instance used to make the http calls. | [`Builder`](http-client-configuration-builder.md) | -| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance, boolean overrideHttpClientConfigurations)` | Sets the okhttpclient instance used to make the http calls and an option to Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc. | [`Builder`](http-client-configuration-builder.md) | -| `build()` | Builds a new HttpClientConfiguration object using the set fields. | [`HttpClientConfiguration`](http-client-configuration.md) | +| `timeout(long timeout)` | Sets the timeout in seconds to use for making http requests. | `HttpClientConfiguration.Builder` | +| `numberOfRetries(int numberOfRetries)` | Sets the number of retries to make. | `HttpClientConfiguration.Builder` | +| `backOffFactor(int backOffFactor)` | Sets to use in calculation of wait time for next request in case of failure. | `HttpClientConfiguration.Builder` | +| `retryInterval(long retryInterval)` | Sets to use in calculation of wait time for next request in case of failure. | `HttpClientConfiguration.Builder` | +| `httpStatusCodesToRetry(Set httpStatusCodesToRetry)` | Sets http status codes to retry against. | `HttpClientConfiguration.Builder` | +| `httpMethodsToRetry(Set httpMethodsToRetry)` | Sets http methods to retry against. | `HttpClientConfiguration.Builder` | +| `maximumRetryWaitTime(long maximumRetryWaitTime)` | Sets the maximum wait time for overall retrying requests. | `HttpClientConfiguration.Builder` | +| `shouldRetryOnTimeout(boolean shouldRetryOnTimeout)` | Sets whether to retry on request timeout. | `HttpClientConfiguration.Builder` | +| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance)` | Sets the okhttpclient instance used to make the http calls. | `HttpClientConfiguration.Builder` | +| `httpClientInstance(okhttp3.OkHttpClient httpClientInstance, boolean overrideHttpClientConfigurations)` | Sets the okhttpclient instance used to make the http calls and an option to Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc. | `HttpClientConfiguration.Builder` | +| `build()` | Builds a new HttpClientConfiguration object using the set fields. | [`HttpClientConfiguration`](../doc/http-client-configuration.md) | diff --git a/doc/http-client-configuration.md b/doc/http-client-configuration.md index b976c602..eabd480e 100644 --- a/doc/http-client-configuration.md +++ b/doc/http-client-configuration.md @@ -1,5 +1,5 @@ -# HttpClientConfiguration Class +# HttpClientConfiguration Class for holding http client configuration. @@ -18,5 +18,5 @@ Class for holding http client configuration. | `getHttpClientInstance()` | The OkHttpClient instance used to make the HTTP calls. | `okhttp3.OkHttpClient` | | `shouldOverrideHttpClientConfigurations()` | Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc. | `boolean` | | `toString()` | Converts this HttpClientConfiguration into string format. | `String` | -| `newBuilder()` | Builds a new {@link HttpClientConfiguration.Builder} object. Creates the instance with the current state. | [`HttpClientConfiguration.Builder`](http-client-configuration-builder.md) | +| `newBuilder()` | Builds a new {@link HttpClientConfiguration.Builder} object. Creates the instance with the current state. | [`HttpClientConfiguration.Builder`](../doc/http-client-configuration-builder.md) | diff --git a/doc/http-context.md b/doc/http-context.md index 9c6cc803..82661472 100644 --- a/doc/http-context.md +++ b/doc/http-context.md @@ -1,18 +1,12 @@ -# HttpContext Class +# HttpContext Class to wrap the request sent to the server and the response received from the server. -## Constructors - -| Name | Description | -| --- | --- | -| `HttpContext(HttpRequest request, HttpResponse response)` | Constructor for HttpContext. | - ## Methods | Name | Description | Return Type | | --- | --- | --- | -| `getRequest()` | Getter for the Http Request. | [`HttpRequest`](http-request.md) | -| `getResponse()` | Getter for the Http Response. | [`HttpResponse`](http-response.md) | +| `getRequest()` | Getter for the Http Request. | [`HttpRequest`](../doc/http-request.md) | +| `getResponse()` | Getter for the Http Response. | [`HttpResponse`](../doc/http-response.md) | diff --git a/doc/http-request.md b/doc/http-request.md index 69aeffb3..47eaf4e7 100644 --- a/doc/http-request.md +++ b/doc/http-request.md @@ -1,20 +1,14 @@ -# HttpRequest Class +# HttpRequest Class for creating and managing HTTP Requests. -## Constructors - -| Name | Description | -| --- | --- | -| `HttpRequest(HttpMethod method, StringBuilder queryUrlBuilder, Headers headers, Map queryParameters, List< SimpleEntry < String, Object >> parameters)` | Initializes a simple http request. | - ## Methods | Name | Description | Return Type | | --- | --- | --- | | `getHttpMethod()` | HttpMethod for the http request. | `HttpMethod` | -| `getHeaders()` | Headers for the http request. | [`Headers`](headers.md) | +| `getHeaders()` | Headers for the http request. | [`Headers`](../doc/headers.md) | | `getQueryUrl()` | Query url for the http request. | `String` | | `getParameters()` | Parameters for the http request. | `List>` | | `getQueryParameters()` | Query parameters for the http request. | `Map` | diff --git a/doc/http-response.md b/doc/http-response.md index c49ba9cc..8edaf028 100644 --- a/doc/http-response.md +++ b/doc/http-response.md @@ -1,19 +1,13 @@ -# HttpResponse Class +# HttpResponse Class to hold HTTP Response. -## Constructors - -| Name | Description | -| --- | --- | -| `HttpResponse(int code, Headers headers, InputStream rawBody)` | Constructor for HttpResponse. | - ## Methods | Name | Description | Return Type | | --- | --- | --- | | `getStatusCode()` | HTTP Status code of the http response.. | `int` | -| `getHeaders()` | Headers of the http response. | [`Headers`](headers.md) | +| `getHeaders()` | Headers of the http response. | [`Headers`](../doc/headers.md) | | `getRawBody()` | Raw body of the http response. | `InputStream` | diff --git a/doc/http-string-response.md b/doc/http-string-response.md index 33f59f88..36aca979 100644 --- a/doc/http-string-response.md +++ b/doc/http-string-response.md @@ -1,19 +1,13 @@ -# HttpStringResponse Class +# HttpStringResponse Class to hold response body as string. -## Constructors - -| Name | Description | -| --- | --- | -| `HttpStringResponse(int code, Headers headers, InputStream rawBody, String body)` | Constructor for HttpStringResponse. | - ## Methods | Name | Description | Return Type | | --- | --- | --- | | `getStatusCode()` | HTTP Status code of the http response. | `int` | -| `getHeaders()` | Headers of the http response. | [`Headers`](headers.md) | +| `getHeaders()` | Headers of the http response. | [`Headers`](../doc/headers.md) | | `getBody()` | String body of the http response. | `String` | diff --git a/doc/models/apple-pay-payment-profile.md b/doc/models/apple-pay-payment-profile.md index f6fb1642..29bb4079 100644 --- a/doc/models/apple-pay-payment-profile.md +++ b/doc/models/apple-pay-payment-profile.md @@ -25,6 +25,8 @@ | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.APPLE_PAY` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) | | `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) | | `GatewayHandle` | `String` | Optional | - | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | +| `CreatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `UpdatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was last updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | ## Example (as JSON) diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 08725d50..a6b9fb73 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -28,9 +28,11 @@ | `BankAccountType` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | BankAccountType getBankAccountType() | setBankAccountType(BankAccountType bankAccountType) | | `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | BankAccountHolderType getBankAccountHolderType() | setBankAccountHolderType(BankAccountHolderType bankAccountHolderType) | | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.BANK_ACCOUNT` | PaymentType getPaymentType() | setPaymentType(PaymentType paymentType) | -| `Verified` | `Boolean` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account
**Default**: `false` | Boolean getVerified() | setVerified(Boolean verified) | +| `Verified` | `Boolean` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account

**Default**: `false` | Boolean getVerified() | setVerified(Boolean verified) | | `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) | | `GatewayHandle` | `String` | Optional | - | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | +| `CreatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `UpdatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was last updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | ## Example (as JSON) diff --git a/doc/models/chargify-ebb.md b/doc/models/chargify-ebb.md index 0c6fee1d..2e8cc348 100644 --- a/doc/models/chargify-ebb.md +++ b/doc/models/chargify-ebb.md @@ -12,7 +12,7 @@ | `Timestamp` | `ZonedDateTime` | Optional | This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`. | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) | | `Id` | `String` | Optional | A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. | String getId() | setId(String id) | | `CreatedAt` | `ZonedDateTime` | Optional | An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | -| `UniquenessToken` | `String` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.
**Constraints**: *Maximum Length*: `64` | String getUniquenessToken() | setUniquenessToken(String uniquenessToken) | +| `UniquenessToken` | `String` | Optional | User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days.

**Constraints**: *Maximum Length*: `64` | String getUniquenessToken() | setUniquenessToken(String uniquenessToken) | | `SubscriptionId` | `Integer` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | Integer getSubscriptionId() | setSubscriptionId(Integer subscriptionId) | | `SubscriptionReference` | `String` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | String getSubscriptionReference() | setSubscriptionReference(String subscriptionReference) | diff --git a/doc/models/component.md b/doc/models/component.md index 683eb420..2aa3d366 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -17,6 +17,7 @@ | `UnitPrice` | `String` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | String getUnitPrice() | setUnitPrice(String unitPrice) | | `ProductFamilyId` | `Integer` | Optional | The id of the Product Family to which the Component belongs | Integer getProductFamilyId() | setProductFamilyId(Integer productFamilyId) | | `ProductFamilyName` | `String` | Optional | The name of the Product Family to which the Component belongs | String getProductFamilyName() | setProductFamilyName(String productFamilyName) | +| `ProductFamilyHandle` | `String` | Optional | The handle of the Product Family to which the Component belongs | String getProductFamilyHandle() | setProductFamilyHandle(String productFamilyHandle) | | `PricePerUnitInCents` | `Long` | Optional | deprecated - use unit_price instead | Long getPricePerUnitInCents() | setPricePerUnitInCents(Long pricePerUnitInCents) | | `Kind` | [`ComponentKind`](../../doc/models/component-kind.md) | Optional | A handle for the component type | ComponentKind getKind() | setKind(ComponentKind kind) | | `Archived` | `Boolean` | Optional | Boolean flag describing whether a component is archived or not. | Boolean getArchived() | setArchived(Boolean archived) | diff --git a/doc/models/coupon-request.md b/doc/models/coupon-request.md index 6d003697..921e4931 100644 --- a/doc/models/coupon-request.md +++ b/doc/models/coupon-request.md @@ -10,8 +10,8 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | | `Coupon` | [`CouponPayload`](../../doc/models/coupon-payload.md) | Optional | - | CouponPayload getCoupon() | setCoupon(CouponPayload coupon) | -| `RestrictedProducts` | `Map` | Optional | An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product | Map getRestrictedProducts() | setRestrictedProducts(Map restrictedProducts) | -| `RestrictedComponents` | `Map` | Optional | An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component | Map getRestrictedComponents() | setRestrictedComponents(Map restrictedComponents) | +| `RestrictedProducts` | `Map` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product | Map getRestrictedProducts() | setRestrictedProducts(Map restrictedProducts) | +| `RestrictedComponents` | `Map` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component | Map getRestrictedComponents() | setRestrictedComponents(Map restrictedComponents) | ## Example (as JSON) diff --git a/doc/models/create-component-price-point.md b/doc/models/create-component-price-point.md index 7263a1a7..b0906f8e 100644 --- a/doc/models/create-component-price-point.md +++ b/doc/models/create-component-price-point.md @@ -13,7 +13,7 @@ | `Handle` | `String` | Optional | - | String getHandle() | setHandle(String handle) | | `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) | Required | - | 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. Setting not supported when creating price points in bulk.
**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | +| `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. Setting not supported when creating price points in bulk.

**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | | `TaxIncluded` | `Boolean` | Optional | Whether or not the price point includes tax. Setting not supported when creating price points in bulk. | 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 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 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/create-or-update-product.md b/doc/models/create-or-update-product.md index d4066567..20c2219b 100644 --- a/doc/models/create-or-update-product.md +++ b/doc/models/create-or-update-product.md @@ -24,7 +24,7 @@ | `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 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, either month, day or never | ExpirationIntervalUnit getExpirationIntervalUnit() | setExpirationIntervalUnit(ExpirationIntervalUnit expirationIntervalUnit) | | `AutoCreateSignupPage` | `Boolean` | Optional | - | Boolean getAutoCreateSignupPage() | setAutoCreateSignupPage(Boolean autoCreateSignupPage) | -| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
**Constraints**: *Maximum Length*: `10` | String getTaxCode() | setTaxCode(String taxCode) | +| `TaxCode` | `String` | Optional | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.

**Constraints**: *Maximum Length*: `10` | String getTaxCode() | setTaxCode(String taxCode) | ## Example (as JSON) diff --git a/doc/models/create-prepaid-usage-component-price-point.md b/doc/models/create-prepaid-usage-component-price-point.md index 21cb182f..fa2629a9 100644 --- a/doc/models/create-prepaid-usage-component-price-point.md +++ b/doc/models/create-prepaid-usage-component-price-point.md @@ -14,7 +14,7 @@ | `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) | Required | - | List getPrices() | setPrices(List prices) | | `OveragePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | OveragePricing getOveragePricing() | setOveragePricing(OveragePricing overagePricing) | -| `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.
**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | +| `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.

**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | | `RolloverPrepaidRemainder` | `Boolean` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period | Boolean getRolloverPrepaidRemainder() | setRolloverPrepaidRemainder(Boolean rolloverPrepaidRemainder) | | `RenewPrepaidAllocation` | `Boolean` | Optional | (only for 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) | | `ExpirationInterval` | `Double` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | Double getExpirationInterval() | setExpirationInterval(Double expirationInterval) | diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md index a25db0b6..4ba908ac 100644 --- a/doc/models/create-product-price-point.md +++ b/doc/models/create-product-price-point.md @@ -22,7 +22,7 @@ | `InitialChargeAfterTrial` | `Boolean` | Optional | - | Boolean getInitialChargeAfterTrial() | setInitialChargeAfterTrial(Boolean initialChargeAfterTrial) | | `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) | -| `UseSiteExchangeRate` | `Boolean` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.
**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | +| `UseSiteExchangeRate` | `Boolean` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.

**Default**: `true` | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | ## Example (as JSON) diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index fabfc752..5b16c350 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index d2a561bc..01620c61 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -21,11 +21,12 @@ | `NetTerms` | `String` | Optional | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | String getNetTerms() | setNetTerms(String netTerms) | | `CustomerId` | `Integer` | Optional | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | Integer getCustomerId() | setCustomerId(Integer customerId) | | `NextBillingAt` | `ZonedDateTime` | Optional | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | ZonedDateTime getNextBillingAt() | setNextBillingAt(ZonedDateTime nextBillingAt) | -| `InitialBillingAt` | `ZonedDateTime` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See further notes in the section on Delayed Signups. | ZonedDateTime getInitialBillingAt() | setInitialBillingAt(ZonedDateTime initialBillingAt) | +| `InitialBillingAt` | `ZonedDateTime` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. | ZonedDateTime getInitialBillingAt() | setInitialBillingAt(ZonedDateTime initialBillingAt) | +| `DeferSignup` | `Boolean` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | Boolean getDeferSignup() | setDeferSignup(Boolean deferSignup) | | `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) | | `SalesRepId` | `Integer` | Optional | - | Integer getSalesRepId() | setSalesRepId(Integer salesRepId) | | `PaymentProfileId` | `Integer` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) | Integer getPaymentProfileId() | setPaymentProfileId(Integer paymentProfileId) | -| `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 itself. | String getReference() | setReference(String reference) | | `CustomerAttributes` | [`CustomerAttributes`](../../doc/models/customer-attributes.md) | Optional | - | CustomerAttributes getCustomerAttributes() | setCustomerAttributes(CustomerAttributes customerAttributes) | | `PaymentProfileAttributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | alias to credit_card_attributes | PaymentProfileAttributes getPaymentProfileAttributes() | setPaymentProfileAttributes(PaymentProfileAttributes paymentProfileAttributes) | | `CreditCardAttributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property. | PaymentProfileAttributes getCreditCardAttributes() | setCreditCardAttributes(PaymentProfileAttributes creditCardAttributes) | @@ -46,7 +47,7 @@ | `AuthorizerLastName` | `String` | Optional | (Optional) The last name of the person authorizing the ACH agreement. | String getAuthorizerLastName() | setAuthorizerLastName(String authorizerLastName) | | `CalendarBillingFirstCharge` | `String` | Optional | (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal). | String getCalendarBillingFirstCharge() | setCalendarBillingFirstCharge(String calendarBillingFirstCharge) | | `ReasonCode` | `String` | Optional | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. | String getReasonCode() | setReasonCode(String reasonCode) | -| `ProductChangeDelayed` | `Boolean` | Optional | (Optional, used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | Boolean getProductChangeDelayed() | setProductChangeDelayed(Boolean productChangeDelayed) | +| `ProductChangeDelayed` | `Boolean` | Optional | (Optional) used only for Delayed Product Change When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | Boolean getProductChangeDelayed() | setProductChangeDelayed(Boolean productChangeDelayed) | | `OfferId` | [`CreateSubscriptionOfferId`](../../doc/models/containers/create-subscription-offer-id.md) | Optional | This is a container for one-of cases. | CreateSubscriptionOfferId getOfferId() | setOfferId(CreateSubscriptionOfferId offerId) | | `PrepaidConfiguration` | [`UpsertPrepaidConfiguration`](../../doc/models/upsert-prepaid-configuration.md) | Optional | - | UpsertPrepaidConfiguration getPrepaidConfiguration() | setPrepaidConfiguration(UpsertPrepaidConfiguration prepaidConfiguration) | | `PreviousBillingAt` | `ZonedDateTime` | Optional | Providing a previous_billing_at that is in the past will set the current_period_starts_at when the subscription is created. It will also set activated_at if not explicitly passed during the subscription import. Can only be used if next_billing_at is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount. | ZonedDateTime getPreviousBillingAt() | setPreviousBillingAt(ZonedDateTime previousBillingAt) | @@ -55,14 +56,15 @@ | `ActivatedAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getActivatedAt() | setActivatedAt(ZonedDateTime activatedAt) | | `AgreementAcceptance` | [`AgreementAcceptance`](../../doc/models/agreement-acceptance.md) | Optional | Required when creating a subscription with Maxio Payments. | AgreementAcceptance getAgreementAcceptance() | setAgreementAcceptance(AgreementAcceptance agreementAcceptance) | | `AchAgreement` | [`ACHAgreement`](../../doc/models/ach-agreement.md) | Optional | (Optional) If passed, the proof of the authorized ACH agreement terms will be persisted. | ACHAgreement getAchAgreement() | setAchAgreement(ACHAgreement achAgreement) | -| `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.
**Default**: `false` | Boolean getDunningCommunicationDelayEnabled() | setDunningCommunicationDelayEnabled(Boolean dunningCommunicationDelayEnabled) | +| `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.

**Default**: `false` | Boolean getDunningCommunicationDelayEnabled() | setDunningCommunicationDelayEnabled(Boolean dunningCommunicationDelayEnabled) | | `DunningCommunicationDelayTimeZone` | `String` | Optional | Time zone for the Dunning Communication Delay feature. | String getDunningCommunicationDelayTimeZone() | setDunningCommunicationDelayTimeZone(String dunningCommunicationDelayTimeZone) | -| `SkipBillingManifestTaxes` | `Boolean` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.
**Default**: `false` | Boolean getSkipBillingManifestTaxes() | setSkipBillingManifestTaxes(Boolean skipBillingManifestTaxes) | +| `SkipBillingManifestTaxes` | `Boolean` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests.

**Default**: `false` | Boolean getSkipBillingManifestTaxes() | setSkipBillingManifestTaxes(Boolean skipBillingManifestTaxes) | ## Example (as JSON) ```json { + "defer_signup": false, "metafields": { "custom_field_name_1": "custom_field_value_1", "custom_field_name_2": "custom_field_value_2" diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index c75b1cf8..da0204a7 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -31,6 +31,8 @@ | `ChargifyToken` | `String` | Optional | Token received after sending billing information using chargify.js. This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | String getChargifyToken() | setChargifyToken(String chargifyToken) | | `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) | | `GatewayHandle` | `String` | Optional | An identifier of connected gateway. | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | +| `CreatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `UpdatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was last updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | ## Example (as JSON) diff --git a/doc/models/ebb-component.md b/doc/models/ebb-component.md index cf386379..406769a2 100644 --- a/doc/models/ebb-component.md +++ b/doc/models/ebb-component.md @@ -12,7 +12,7 @@ | `Name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | String getName() | setName(String name) | | `UnitName` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | String getUnitName() | setUnitName(String unitName) | | `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) | +| `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) | | `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) | diff --git a/doc/models/group-billing.md b/doc/models/group-billing.md index f88b4b41..1c029beb 100644 --- a/doc/models/group-billing.md +++ b/doc/models/group-billing.md @@ -11,9 +11,9 @@ Optional attributes related to billing date and accrual. Note: Only applicable f | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Accrue` | `Boolean` | Optional | A flag indicating whether or not to accrue charges on the new subscription.
**Default**: `false` | Boolean getAccrue() | setAccrue(Boolean accrue) | -| `AlignDate` | `Boolean` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.
**Default**: `false` | Boolean getAlignDate() | setAlignDate(Boolean alignDate) | -| `Prorate` | `Boolean` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.
**Default**: `false` | Boolean getProrate() | setProrate(Boolean prorate) | +| `Accrue` | `Boolean` | Optional | A flag indicating whether or not to accrue charges on the new subscription.

**Default**: `false` | Boolean getAccrue() | setAccrue(Boolean accrue) | +| `AlignDate` | `Boolean` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.

**Default**: `false` | Boolean getAlignDate() | setAlignDate(Boolean alignDate) | +| `Prorate` | `Boolean` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.

**Default**: `false` | Boolean getProrate() | setProrate(Boolean prorate) | ## Example (as JSON) diff --git a/doc/models/issue-invoice-request.md b/doc/models/issue-invoice-request.md index d28e7e6e..1e8c02f8 100644 --- a/doc/models/issue-invoice-request.md +++ b/doc/models/issue-invoice-request.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `OnFailedPayment` | [`FailedPaymentAction`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `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).
**Default**: `FailedPaymentAction.LEAVE_OPEN_INVOICE` | FailedPaymentAction getOnFailedPayment() | setOnFailedPayment(FailedPaymentAction onFailedPayment) | +| `OnFailedPayment` | [`FailedPaymentAction`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `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).

**Default**: `FailedPaymentAction.LEAVE_OPEN_INVOICE` | FailedPaymentAction getOnFailedPayment() | setOnFailedPayment(FailedPaymentAction onFailedPayment) | ## Example (as JSON) diff --git a/doc/models/list-components-filter.md b/doc/models/list-components-filter.md index 79c4010b..c8602989 100644 --- a/doc/models/list-components-filter.md +++ b/doc/models/list-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Ids` | `List` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | +| `Ids` | `List` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | | `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | ## Example (as JSON) diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md index 72c3de63..f58b54d9 100644 --- a/doc/models/list-coupons-filter.md +++ b/doc/models/list-coupons-filter.md @@ -14,7 +14,7 @@ | `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `filter[end_date]=2011-12-15`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | | `StartDatetime` | `ZonedDateTime` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `filter[start_datetime]=2011-12-19T10:15:30+01:00`. | ZonedDateTime getStartDatetime() | setStartDatetime(ZonedDateTime startDatetime) | | `EndDatetime` | `ZonedDateTime` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `filter[end_datetime]=2011-12-1T10:15:30+01:00`. | ZonedDateTime getEndDatetime() | setEndDatetime(ZonedDateTime endDatetime) | -| `Ids` | `List` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | +| `Ids` | `List` | Optional | Allows fetching coupons with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | | `Codes` | `List` | Optional | Allows fetching coupons with matching codes based on provided values. Use in query `filter[codes]=free,free_trial`. | List getCodes() | setCodes(List codes) | | `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching coupons with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | diff --git a/doc/models/list-mrr-filter.md b/doc/models/list-mrr-filter.md index ce2e7761..fe2afd1b 100644 --- a/doc/models/list-mrr-filter.md +++ b/doc/models/list-mrr-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `SubscriptionIds` | `List` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getSubscriptionIds() | setSubscriptionIds(List subscriptionIds) | +| `SubscriptionIds` | `List` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | List getSubscriptionIds() | setSubscriptionIds(List subscriptionIds) | ## Example (as JSON) diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md index 6277e564..c9b3ab6e 100644 --- a/doc/models/list-products-filter.md +++ b/doc/models/list-products-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Ids` | `List` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.
**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | +| `Ids` | `List` | Optional | Allows fetching products with matching id based on provided values. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | List getIds() | setIds(List ids) | | `PrepaidProductPricePoint` | [`PrepaidProductPricePointFilter`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | PrepaidProductPricePointFilter getPrepaidProductPricePoint() | setPrepaidProductPricePoint(PrepaidProductPricePointFilter prepaidProductPricePoint) | | `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | diff --git a/doc/models/list-service-credits-response.md b/doc/models/list-service-credits-response.md new file mode 100644 index 00000000..e82e6edb --- /dev/null +++ b/doc/models/list-service-credits-response.md @@ -0,0 +1,36 @@ + +# List Service Credits Response + +## Structure + +`ListServiceCreditsResponse` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `ServiceCredits` | [`List`](../../doc/models/service-credit-1.md) | Optional | - | List getServiceCredits() | setServiceCredits(List serviceCredits) | + +## Example (as JSON) + +```json +{ + "service_credits": [ + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + }, + { + "id": 224, + "amount_in_cents": 54, + "ending_balance_in_cents": 94, + "entry_type": "Credit", + "memo": "memo2" + } + ] +} +``` + diff --git a/doc/models/list-subscription-components-filter.md b/doc/models/list-subscription-components-filter.md index 63735be2..b3d58c77 100644 --- a/doc/models/list-subscription-components-filter.md +++ b/doc/models/list-subscription-components-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.
**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | +| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.

**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | | `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | ## Example (as JSON) diff --git a/doc/models/list-subscription-components-for-site-filter.md b/doc/models/list-subscription-components-for-site-filter.md index 83b90ffc..8217d0fd 100644 --- a/doc/models/list-subscription-components-for-site-filter.md +++ b/doc/models/list-subscription-components-for-site-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.
**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | +| `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=USD,EUR`.

**Constraints**: *Minimum Items*: `1` | List getCurrencies() | setCurrencies(List currencies) | | `UseSiteExchangeRate` | `Boolean` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | Boolean getUseSiteExchangeRate() | setUseSiteExchangeRate(Boolean useSiteExchangeRate) | | `Subscription` | [`SubscriptionFilter`](../../doc/models/subscription-filter.md) | Optional | Nested filter used for List Subscription Components For Site Filter | SubscriptionFilter getSubscription() | setSubscription(SubscriptionFilter subscription) | diff --git a/doc/models/metered-component.md b/doc/models/metered-component.md index 358f1176..a1fd26b4 100644 --- a/doc/models/metered-component.md +++ b/doc/models/metered-component.md @@ -12,7 +12,7 @@ | `Name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | String getName() | setName(String name) | | `UnitName` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | String getUnitName() | setUnitName(String unitName) | | `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) | +| `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) | | `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) | diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md index 81ecbe8b..2ed8c725 100644 --- a/doc/models/on-off-component.md +++ b/doc/models/on-off-component.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | --- | --- | | `Name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | String getName() | setName(String name) | | `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) | +| `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) | diff --git a/doc/models/override-subscription.md b/doc/models/override-subscription.md index ef4eec3a..56240e2f 100644 --- a/doc/models/override-subscription.md +++ b/doc/models/override-subscription.md @@ -12,7 +12,7 @@ | `ActivatedAt` | `ZonedDateTime` | Optional | Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end). Only ISO8601 format is supported. | ZonedDateTime getActivatedAt() | setActivatedAt(ZonedDateTime activatedAt) | | `CanceledAt` | `ZonedDateTime` | Optional | Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. Only ISO8601 format is supported. | ZonedDateTime getCanceledAt() | setCanceledAt(ZonedDateTime canceledAt) | | `CancellationMessage` | `String` | Optional | Can be used to record a reason for the original cancellation. | String getCancellationMessage() | setCancellationMessage(String cancellationMessage) | -| `ExpiresAt` | `ZonedDateTime` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) | +| `ExpiresAt` | `ZonedDateTime` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) | | `CurrentPeriodStartsAt` | `ZonedDateTime` | Optional | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. | ZonedDateTime getCurrentPeriodStartsAt() | setCurrentPeriodStartsAt(ZonedDateTime currentPeriodStartsAt) | ## Example (as JSON) diff --git a/doc/models/paypal-payment-profile.md b/doc/models/paypal-payment-profile.md index cd73435a..f717e886 100644 --- a/doc/models/paypal-payment-profile.md +++ b/doc/models/paypal-payment-profile.md @@ -26,6 +26,8 @@ | `SiteGatewaySettingId` | `Integer` | Optional | - | Integer getSiteGatewaySettingId() | setSiteGatewaySettingId(Integer siteGatewaySettingId) | | `GatewayHandle` | `String` | Optional | - | String getGatewayHandle() | setGatewayHandle(String gatewayHandle) | | `PaypalEmail` | `String` | Optional | - | String getPaypalEmail() | setPaypalEmail(String paypalEmail) | +| `CreatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | +| `UpdatedAt` | `ZonedDateTime` | Optional | A timestamp indicating when this payment profile was last updated | ZonedDateTime getUpdatedAt() | setUpdatedAt(ZonedDateTime updatedAt) | ## Example (as JSON) diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md index 2e7684e0..186c0378 100644 --- a/doc/models/prepaid-product-price-point-filter.md +++ b/doc/models/prepaid-product-price-point-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `ProductPricePointId` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Value**: `"not_null"` | String getProductPricePointId() | setProductPricePointId(String productPricePointId) | +| `ProductPricePointId` | `String` | Required, Constant | Passed as a parameter to list methods to return only non null values.

**Value**: `"not_null"` | String getProductPricePointId() | setProductPricePointId(String productPricePointId) | ## Example (as JSON) diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md index 68c890ea..410c6255 100644 --- a/doc/models/prepaid-usage-component.md +++ b/doc/models/prepaid-usage-component.md @@ -12,7 +12,7 @@ | `Name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | String getName() | setName(String name) | | `UnitName` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | String getUnitName() | setUnitName(String unitName) | | `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) | +| `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) | | `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) | diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md index a6954e1e..dc6de8c4 100644 --- a/doc/models/quantity-based-component.md +++ b/doc/models/quantity-based-component.md @@ -12,7 +12,7 @@ | `Name` | `String` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | String getName() | setName(String name) | | `UnitName` | `String` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | String getUnitName() | setUnitName(String unitName) | | `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) | +| `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) | | `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) | diff --git a/doc/models/reactivation-billing.md b/doc/models/reactivation-billing.md index 4ca06b09..e5855c4c 100644 --- a/doc/models/reactivation-billing.md +++ b/doc/models/reactivation-billing.md @@ -11,7 +11,7 @@ These values are only applicable to subscriptions using calendar billing | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `ReactivationCharge` | [`ReactivationCharge`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal
**Default**: `ReactivationCharge.PRORATED` | ReactivationCharge getReactivationCharge() | setReactivationCharge(ReactivationCharge reactivationCharge) | +| `ReactivationCharge` | [`ReactivationCharge`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal

**Default**: `ReactivationCharge.PRORATED` | ReactivationCharge getReactivationCharge() | setReactivationCharge(ReactivationCharge reactivationCharge) | ## Example (as JSON) diff --git a/doc/models/service-credit-1.md b/doc/models/service-credit-1.md new file mode 100644 index 00000000..b641f2a9 --- /dev/null +++ b/doc/models/service-credit-1.md @@ -0,0 +1,32 @@ + +# Service Credit 1 + +## Structure + +`ServiceCredit1` + +## Fields + +| Name | Type | Tags | Description | Getter | Setter | +| --- | --- | --- | --- | --- | --- | +| `Id` | `Integer` | Optional | - | Integer getId() | setId(Integer id) | +| `AmountInCents` | `Long` | Optional | The amount in cents of the entry | Long getAmountInCents() | setAmountInCents(Long amountInCents) | +| `EndingBalanceInCents` | `Long` | Optional | The new balance for the credit account | Long getEndingBalanceInCents() | setEndingBalanceInCents(Long endingBalanceInCents) | +| `EntryType` | [`ServiceCreditType`](../../doc/models/service-credit-type.md) | Optional | The type of entry | ServiceCreditType getEntryType() | setEntryType(ServiceCreditType entryType) | +| `Memo` | `String` | Optional | The memo attached to the entry | String getMemo() | setMemo(String memo) | +| `InvoiceUid` | `String` | Optional | The invoice uid associated with the entry. Only present for debit entries | String getInvoiceUid() | setInvoiceUid(String invoiceUid) | +| `RemainingBalanceInCents` | `Long` | Optional | The remaining balance for the entry | Long getRemainingBalanceInCents() | setRemainingBalanceInCents(Long remainingBalanceInCents) | +| `CreatedAt` | `ZonedDateTime` | Optional | The date and time the entry was created | ZonedDateTime getCreatedAt() | setCreatedAt(ZonedDateTime createdAt) | + +## Example (as JSON) + +```json +{ + "id": 174, + "amount_in_cents": 4, + "ending_balance_in_cents": 44, + "entry_type": "Credit", + "memo": "memo8" +} +``` + diff --git a/doc/models/subscription-filter.md b/doc/models/subscription-filter.md index a0f57a3d..82621dd3 100644 --- a/doc/models/subscription-filter.md +++ b/doc/models/subscription-filter.md @@ -11,7 +11,7 @@ Nested filter used for List Subscription Components For Site Filter | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `States` | [`List`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.
**Constraints**: *Minimum Items*: `1` | List getStates() | setStates(List states) | +| `States` | [`List`](../../doc/models/subscription-state-filter.md) | Optional | Allows fetching components allocations that belong to the subscription with matching states based on provided values. To use this filter you also have to include the following param in the request `include=subscription`. Use in query `filter[subscription][states]=active,canceled&include=subscription`.

**Constraints**: *Minimum Items*: `1` | List getStates() | setStates(List states) | | `DateField` | [`SubscriptionListDateField`](../../doc/models/subscription-list-date-field.md) | Optional | The type of filter you'd like to apply to your search. To use this filter you also have to include the following param in the request `include=subscription`. | SubscriptionListDateField getDateField() | setDateField(SubscriptionListDateField dateField) | | `StartDate` | `LocalDate` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | LocalDate getStartDate() | setStartDate(LocalDate startDate) | | `EndDate` | `LocalDate` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components that belong to the subscription with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. To use this filter you also have to include the following param in the request `include=subscription`. | LocalDate getEndDate() | setEndDate(LocalDate endDate) | diff --git a/doc/models/subscription-group-credit-card.md b/doc/models/subscription-group-credit-card.md index 49877099..5d78cb6e 100644 --- a/doc/models/subscription-group-credit-card.md +++ b/doc/models/subscription-group-credit-card.md @@ -9,9 +9,6 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `FullNumber` | [`SubscriptionGroupCreditCardFullNumber`](../../doc/models/containers/subscription-group-credit-card-full-number.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardFullNumber getFullNumber() | setFullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) | -| `ExpirationMonth` | [`SubscriptionGroupCreditCardExpirationMonth`](../../doc/models/containers/subscription-group-credit-card-expiration-month.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardExpirationMonth getExpirationMonth() | setExpirationMonth(SubscriptionGroupCreditCardExpirationMonth expirationMonth) | -| `ExpirationYear` | [`SubscriptionGroupCreditCardExpirationYear`](../../doc/models/containers/subscription-group-credit-card-expiration-year.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardExpirationYear getExpirationYear() | setExpirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) | | `ChargifyToken` | `String` | Optional | - | String getChargifyToken() | setChargifyToken(String chargifyToken) | | `VaultToken` | `String` | Optional | - | String getVaultToken() | setVaultToken(String vaultToken) | | `CurrentVault` | [`CreditCardVault`](../../doc/models/credit-card-vault.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | CreditCardVault getCurrentVault() | setCurrentVault(CreditCardVault currentVault) | @@ -24,6 +21,9 @@ | `BillingState` | `String` | Optional | - | String getBillingState() | setBillingState(String billingState) | | `BillingZip` | `String` | Optional | - | String getBillingZip() | setBillingZip(String billingZip) | | `BillingCountry` | `String` | Optional | - | String getBillingCountry() | setBillingCountry(String billingCountry) | +| `FullNumber` | [`SubscriptionGroupCreditCardFullNumber`](../../doc/models/containers/subscription-group-credit-card-full-number.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardFullNumber getFullNumber() | setFullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) | +| `ExpirationMonth` | [`SubscriptionGroupCreditCardExpirationMonth`](../../doc/models/containers/subscription-group-credit-card-expiration-month.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardExpirationMonth getExpirationMonth() | setExpirationMonth(SubscriptionGroupCreditCardExpirationMonth expirationMonth) | +| `ExpirationYear` | [`SubscriptionGroupCreditCardExpirationYear`](../../doc/models/containers/subscription-group-credit-card-expiration-year.md) | Optional | This is a container for one-of cases. | SubscriptionGroupCreditCardExpirationYear getExpirationYear() | setExpirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) | | `LastFour` | `String` | Optional | - | String getLastFour() | setLastFour(String lastFour) | | `CardType` | [`CardType`](../../doc/models/card-type.md) | Optional | The type of card used. | CardType getCardType() | setCardType(CardType cardType) | | `CustomerVaultToken` | `String` | Optional | - | String getCustomerVaultToken() | setCustomerVaultToken(String customerVaultToken) | @@ -34,11 +34,12 @@ ```json { - "full_number": 4111111111111111, "chargify_token": "tok_592nf92ng0sjd4300p", - "expiration_month": "String1", - "expiration_year": "String5", - "vault_token": "vault_token6" + "full_number": 4111111111111111, + "vault_token": "vault_token6", + "current_vault": "braintree_blue", + "gateway_handle": "gateway_handle6", + "first_name": "first_name4" } ``` diff --git a/doc/models/subscription-migration-preview-options.md b/doc/models/subscription-migration-preview-options.md index cc1d8ccd..49ca32d6 100644 --- a/doc/models/subscription-migration-preview-options.md +++ b/doc/models/subscription-migration-preview-options.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | --- | --- | | `ProductId` | `Integer` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | Integer getProductId() | setProductId(Integer productId) | | `ProductPricePointId` | `Integer` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | -| `IncludeTrial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `false` | Boolean getIncludeTrial() | setIncludeTrial(Boolean includeTrial) | -| `IncludeInitialCharge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `false` | Boolean getIncludeInitialCharge() | setIncludeInitialCharge(Boolean includeInitialCharge) | -| `IncludeCoupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `true` | Boolean getIncludeCoupons() | setIncludeCoupons(Boolean includeCoupons) | -| `PreservePeriod` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `false` | Boolean getPreservePeriod() | setPreservePeriod(Boolean preservePeriod) | +| `IncludeTrial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | Boolean getIncludeTrial() | setIncludeTrial(Boolean includeTrial) | +| `IncludeInitialCharge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | Boolean getIncludeInitialCharge() | setIncludeInitialCharge(Boolean includeInitialCharge) | +| `IncludeCoupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | Boolean getIncludeCoupons() | setIncludeCoupons(Boolean includeCoupons) | +| `PreservePeriod` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | Boolean getPreservePeriod() | setPreservePeriod(Boolean preservePeriod) | | `ProductHandle` | `String` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | String getProductHandle() | setProductHandle(String productHandle) | | `ProductPricePointHandle` | `String` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | String getProductPricePointHandle() | setProductPricePointHandle(String productPricePointHandle) | | `Proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | Proration getProration() | setProration(Proration proration) | diff --git a/doc/models/subscription-product-migration.md b/doc/models/subscription-product-migration.md index d13ba920..ef926c39 100644 --- a/doc/models/subscription-product-migration.md +++ b/doc/models/subscription-product-migration.md @@ -11,10 +11,10 @@ | --- | --- | --- | --- | --- | --- | | `ProductId` | `Integer` | Optional | The ID of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | Integer getProductId() | setProductId(Integer productId) | | `ProductPricePointId` | `Integer` | Optional | The ID of the specified product's price point. This can be passed to migrate to a non-default price point. | Integer getProductPricePointId() | setProductPricePointId(Integer productPricePointId) | -| `IncludeTrial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.
**Default**: `false` | Boolean getIncludeTrial() | setIncludeTrial(Boolean includeTrial) | -| `IncludeInitialCharge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.
**Default**: `false` | Boolean getIncludeInitialCharge() | setIncludeInitialCharge(Boolean includeInitialCharge) | -| `IncludeCoupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.
**Default**: `true` | Boolean getIncludeCoupons() | setIncludeCoupons(Boolean includeCoupons) | -| `PreservePeriod` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.
**Default**: `false` | Boolean getPreservePeriod() | setPreservePeriod(Boolean preservePeriod) | +| `IncludeTrial` | `Boolean` | Optional | Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.

**Default**: `false` | Boolean getIncludeTrial() | setIncludeTrial(Boolean includeTrial) | +| `IncludeInitialCharge` | `Boolean` | Optional | If `true` is sent initial charges will be assessed.

**Default**: `false` | Boolean getIncludeInitialCharge() | setIncludeInitialCharge(Boolean includeInitialCharge) | +| `IncludeCoupons` | `Boolean` | Optional | If `true` is sent, any coupons associated with the subscription will be applied to the migration. If `false` is sent, coupons will not be applied. Note: When migrating to a new product family, the coupon cannot migrate.

**Default**: `true` | Boolean getIncludeCoupons() | setIncludeCoupons(Boolean includeCoupons) | +| `PreservePeriod` | `Boolean` | Optional | If `false` is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `true` is sent, the billing period will not change and a prorated charge will be issued for the new product.

**Default**: `false` | Boolean getPreservePeriod() | setPreservePeriod(Boolean preservePeriod) | | `ProductHandle` | `String` | Optional | The handle of the target Product. Either a product_id or product_handle must be present. A Subscription can be migrated to another product for both the current Product Family and another Product Family. Note: Going to another Product Family, components will not be migrated as well. | String getProductHandle() | setProductHandle(String productHandle) | | `ProductPricePointHandle` | `String` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | String getProductPricePointHandle() | setProductPricePointHandle(String productPricePointHandle) | | `Proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | Proration getProration() | setProration(Proration proration) | diff --git a/doc/models/tax-configuration.md b/doc/models/tax-configuration.md index 3d2cb7c0..0d05ee96 100644 --- a/doc/models/tax-configuration.md +++ b/doc/models/tax-configuration.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | --- | --- | | `Kind` | [`TaxConfigurationKind`](../../doc/models/tax-configuration-kind.md) | Optional | **Default**: `TaxConfigurationKind.CUSTOM` | TaxConfigurationKind getKind() | setKind(TaxConfigurationKind kind) | | `DestinationAddress` | [`TaxDestinationAddress`](../../doc/models/tax-destination-address.md) | Optional | - | TaxDestinationAddress getDestinationAddress() | setDestinationAddress(TaxDestinationAddress destinationAddress) | -| `FullyConfigured` | `Boolean` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview
**Default**: `false` | Boolean getFullyConfigured() | setFullyConfigured(Boolean fullyConfigured) | +| `FullyConfigured` | `Boolean` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview

**Default**: `false` | Boolean getFullyConfigured() | setFullyConfigured(Boolean fullyConfigured) | ## Example (as JSON) diff --git a/doc/models/update-subscription-request.md b/doc/models/update-subscription-request.md index 6eec1d6e..0af2f0f1 100644 --- a/doc/models/update-subscription-request.md +++ b/doc/models/update-subscription-request.md @@ -16,6 +16,7 @@ ```json { "subscription": { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index 56b16e36..0c8a0655 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -16,7 +16,10 @@ | `NextProductId` | `String` | Optional | Set to an empty string to cancel a delayed product change. | String getNextProductId() | setNextProductId(String nextProductId) | | `NextProductPricePointId` | `String` | Optional | - | String getNextProductPricePointId() | setNextProductPricePointId(String nextProductPricePointId) | | `SnapDay` | [`UpdateSubscriptionSnapDay`](../../doc/models/containers/update-subscription-snap-day.md) | Optional | This is a container for one-of cases. | UpdateSubscriptionSnapDay getSnapDay() | setSnapDay(UpdateSubscriptionSnapDay snapDay) | +| `InitialBillingAt` | `ZonedDateTime` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | ZonedDateTime getInitialBillingAt() | setInitialBillingAt(ZonedDateTime initialBillingAt) | +| `DeferSignup` | `Boolean` | Optional | (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to Awaiting Signup Date. Use this when you want to update a subscription that has an unknown initial billing date. When the first billing date is known, update a subscription to set the `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | Boolean getDeferSignup() | setDeferSignup(Boolean deferSignup) | | `NextBillingAt` | `ZonedDateTime` | Optional | - | ZonedDateTime getNextBillingAt() | setNextBillingAt(ZonedDateTime nextBillingAt) | +| `ExpiresAt` | `ZonedDateTime` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | ZonedDateTime getExpiresAt() | setExpiresAt(ZonedDateTime expiresAt) | | `PaymentCollectionMethod` | `String` | Optional | - | String getPaymentCollectionMethod() | setPaymentCollectionMethod(String paymentCollectionMethod) | | `ReceivesInvoiceEmails` | `Boolean` | Optional | - | Boolean getReceivesInvoiceEmails() | setReceivesInvoiceEmails(Boolean receivesInvoiceEmails) | | `NetTerms` | [`UpdateSubscriptionNetTerms`](../../doc/models/containers/update-subscription-net-terms.md) | Optional | This is a container for one-of cases. | UpdateSubscriptionNetTerms getNetTerms() | setNetTerms(UpdateSubscriptionNetTerms netTerms) | @@ -33,6 +36,7 @@ ```json { + "defer_signup": false, "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", "credit_card_attributes": { "full_number": "full_number2", diff --git a/doc/utility-classes.md b/doc/utility-classes.md deleted file mode 100644 index 7dfd29f5..00000000 --- a/doc/utility-classes.md +++ /dev/null @@ -1,63 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper Class - -This is a Helper class with commonly used utilities for the SDK. - -### Fields - -| Name | Description | Type | -| --- | --- | --- | -| mapper | Deserialization of Json data. | `ObjectMapper` | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `serialize(Object obj)` | Json Serialization of a given object. | `String` | -| `deserialize(String json)` | Json deserialization of the given Json string. | `LinkedHashMap` | -| `deserialize(String json, Class clazz)` | Json deserialization of the given Json string. | ` T` | -| `deserialize(String json, TypeReference typeReference)` | JSON Deserialization of the given json string. | ` T` | -| `deserializeArray(String json, Class classArray)` | JSON Deserialization of the given json string. | ` List` | - -## FileWrapper Class - -Class to wrap file and contentType to be sent as part of a HTTP request. - -### Constructors - -| Name | Description | -| --- | --- | -| `FileWrapper(File file)` | Initialization constructor. | -| `FileWrapper(File file, String contentType)` | Initialization constructor. | - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `getFile()` | File instance. | `File` | -| `getContentType()` | Content type of the file. | `String` | - -## ZonedDateTime Class - -This is a utility class for DateTime operations. - -### Methods - -| Name | Description | Return Type | -| --- | --- | --- | -| `fromUnixTimestamp(Long date)` | Parse a Unix Timestamp to a DateTime object. | `ZonedDateTime` | -| `fromUnixTimestamp(String date)` | Parse a Unix Timestamp string to a DateTime object. | `ZonedDateTime` | -| `toUnixTimestamp(ZonedDateTime value)` | Convert a DateTime object to a Unix Timestamp string. | `String` | -| `toUnixTimestamp(List values)` | Convert a List of DateTime objects to Unix Timestamp strings. | `List` | -| `fromRfc1123DateTime(String date)` | Parse a datetime string in Rfc1123 format to a DateTime object. | `ZonedDateTime` | -| `toRfc1123DateTime(ZonedDateTime value)` | Convert a DateTime object to a Rfc1123 formatted string. | `String` | -| `toRfc1123DateTime(List values)` | Convert a List of DateTime objects to Rfc1123 formatted strings. | `List` | -| `fromRfc8601DateTime(String date)` | Parse a datetime string in Rfc8601(Rfc3339) format to a DateTime object. | `ZonedDateTime` | -| `toRfc8601DateTime(ZonedDateTime value)` | Convert a DateTime object to a Rfc8601(Rfc3339) formatted string. | `String` | -| `toRfc8601DateTime(List values)` | Convert a List of DateTime objects to Rfc8601(Rfc3339) formatted strings. | `List` | -| `fromSimpleDate(String date)` | Parse a simple date string to a LocalDate object. | `LocalDate` | -| `toSimpleDate(LocalDate value)` | Convert a LocalDate object to a string. | `String` | -| `toSimpleDate(List values)` | Convert a List of LocalDate objects to strings. | `List` | - diff --git a/pom.xml b/pom.xml index 92f6bf68..c2640442 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 com.maxio advanced-billing-sdk - 6.1.0 + 7.0.0 jar Advanced Billing SDK Ultimate billing and pricing flexibility for B2B SaaS. @@ -38,10 +38,6 @@ Maxio integrates directly into your product, so you can seamlessly manage your p Repository Snapshot Server https://s01.oss.sonatype.org/content/repositories/snapshots - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - @@ -52,7 +48,7 @@ Maxio integrates directly into your product, so you can seamlessly manage your p io.apimatic core - [0.6.7, 0.7) + [0.6.12, 0.7) io.apimatic @@ -167,14 +163,15 @@ Maxio integrates directly into your product, so you can seamlessly manage your p - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 true - ossrh - https://s01.oss.sonatype.org/ - true + ossrh + true + true + validated diff --git a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java index 412d0aad..50a2ea08 100644 --- a/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java +++ b/src/main/java/com/maxio/advancedbilling/AdvancedBillingClient.java @@ -99,7 +99,7 @@ public final class AdvancedBillingClient implements Configuration { private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl(); - private static String userAgent = "AB SDK Java:6.1.0 on OS {os-info}"; + private static String userAgent = "AB SDK Java:7.0.0 on OS {os-info}"; /** * Current API environment. diff --git a/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java index 321a28e7..a0331494 100644 --- a/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java +++ b/src/main/java/com/maxio/advancedbilling/authentication/BasicAuthManager.java @@ -81,6 +81,6 @@ public String getErrorMessage() { } return "BasicAuth - " + errorMessage; - } + } } diff --git a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java index 5a40453f..2c1a40d0 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/APIExportsController.java @@ -56,7 +56,7 @@ public List listExportedProformaInvoices( * Builds the ApiCall object for listExportedProformaInvoices. */ private ApiCall, ApiException> prepareListExportedProformaInvoicesRequest( - final ListExportedProformaInvoicesInput input) throws IOException { + final ListExportedProformaInvoicesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -103,7 +103,7 @@ public List listExportedInvoices( * Builds the ApiCall object for listExportedInvoices. */ private ApiCall, ApiException> prepareListExportedInvoicesRequest( - final ListExportedInvoicesInput input) throws IOException { + final ListExportedInvoicesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -150,7 +150,7 @@ public List listExportedSubscriptions( * Builds the ApiCall object for listExportedSubscriptions. */ private ApiCall, ApiException> prepareListExportedSubscriptionsRequest( - final ListExportedSubscriptionsInput input) throws IOException { + final ListExportedSubscriptionsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -193,7 +193,7 @@ public BatchJobResponse exportProformaInvoices() throws ApiException, IOExceptio /** * Builds the ApiCall object for exportProformaInvoices. */ - private ApiCall prepareExportProformaInvoicesRequest() throws IOException { + private ApiCall prepareExportProformaInvoicesRequest() { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -231,7 +231,7 @@ public BatchJobResponse exportInvoices() throws ApiException, IOException { /** * Builds the ApiCall object for exportInvoices. */ - private ApiCall prepareExportInvoicesRequest() throws IOException { + private ApiCall prepareExportInvoicesRequest() { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -269,7 +269,7 @@ public BatchJobResponse exportSubscriptions() throws ApiException, IOException { /** * Builds the ApiCall object for exportSubscriptions. */ - private ApiCall prepareExportSubscriptionsRequest() throws IOException { + private ApiCall prepareExportSubscriptionsRequest() { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -307,7 +307,7 @@ public BatchJobResponse readProformaInvoicesExport( * Builds the ApiCall object for readProformaInvoicesExport. */ private ApiCall prepareReadProformaInvoicesExportRequest( - final String batchId) throws IOException { + final String batchId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -347,7 +347,7 @@ public BatchJobResponse readInvoicesExport( * Builds the ApiCall object for readInvoicesExport. */ private ApiCall prepareReadInvoicesExportRequest( - final String batchId) throws IOException { + final String batchId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -387,7 +387,7 @@ public BatchJobResponse readSubscriptionsExport( * Builds the ApiCall object for readSubscriptionsExport. */ private ApiCall prepareReadSubscriptionsExportRequest( - final String batchId) throws IOException { + final String batchId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java index 2158eb6a..dbc60c72 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/AdvanceInvoiceController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -47,7 +46,7 @@ public AdvanceInvoiceController(GlobalConfiguration globalConfig) { * endpoints for proforma invoices to preview this advance invoice before using this endpoint to * generate it. * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -63,7 +62,7 @@ public Invoice issueAdvanceInvoice( */ private ApiCall prepareIssueAdvanceInvoiceRequest( final int subscriptionId, - final IssueAdvanceInvoiceRequest body) throws JsonProcessingException, IOException { + final IssueAdvanceInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -112,7 +111,7 @@ public Invoice readAdvanceInvoice( * Builds the ApiCall object for readAdvanceInvoice. */ private ApiCall prepareReadAdvanceInvoiceRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -143,7 +142,7 @@ private ApiCall prepareReadAdvanceInvoiceRequest( * returned to the subscription. For a full overview of the impact of voiding, please [see our * help docs]($m/Invoice). * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -159,7 +158,7 @@ public Invoice voidAdvanceInvoice( */ private ApiCall prepareVoidAdvanceInvoiceRequest( final int subscriptionId, - final VoidInvoiceRequest body) throws JsonProcessingException, IOException { + final VoidInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java index 17c3afa7..4dc5dcf3 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/BillingPortalController.java @@ -73,7 +73,7 @@ public CustomerResponse enableBillingPortalForCustomer( */ private ApiCall prepareEnableBillingPortalForCustomerRequest( final int customerId, - final AutoInvite autoInvite) throws IOException { + final AutoInvite autoInvite) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -122,7 +122,7 @@ public PortalManagementLink readBillingPortalLink( * Builds the ApiCall object for readBillingPortalLink. */ private ApiCall prepareReadBillingPortalLinkRequest( - final int customerId) throws IOException { + final int customerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -172,7 +172,7 @@ public ResentInvitation resendBillingPortalInvitation( * Builds the ApiCall object for resendBillingPortalInvitation. */ private ApiCall prepareResendBillingPortalInvitationRequest( - final int customerId) throws IOException { + final int customerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -217,7 +217,7 @@ public RevokedInvitation revokeBillingPortalAccess( * Builds the ApiCall object for revokeBillingPortalAccess. */ private ApiCall prepareRevokeBillingPortalAccessRequest( - final int customerId) throws IOException { + final int customerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java index 6f89272a..60591044 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentPricePointsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -77,7 +76,7 @@ public ComponentResponse promoteComponentPricePointToDefault( */ private ApiCall preparePromoteComponentPricePointToDefaultRequest( final int componentId, - final int pricePointId) throws IOException { + final int pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -103,7 +102,7 @@ private ApiCall preparePromoteComponentPricePoi /** * This endpoint can be used to create a new price point for an existing component. * @param componentId Required parameter: The Advanced Billing id of the component - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentPricePointResponse 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. @@ -119,7 +118,7 @@ public ComponentPricePointResponse createComponentPricePoint( */ private ApiCall prepareCreateComponentPricePointRequest( final int componentId, - final CreateComponentPricePointRequest body) throws JsonProcessingException, IOException { + final CreateComponentPricePointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -169,7 +168,7 @@ public ComponentPricePointsResponse listComponentPricePoints( * Builds the ApiCall object for listComponentPricePoints. */ private ApiCall prepareListComponentPricePointsRequest( - final ListComponentPricePointsInput input) throws IOException { + final ListComponentPricePointsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -202,7 +201,7 @@ private ApiCall prepareListComponent * Use this endpoint to create multiple component price points in one request. * @param componentId Required parameter: The Advanced Billing id of the component for which * you want to fetch price points. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentPricePointsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -218,7 +217,7 @@ public ComponentPricePointsResponse bulkCreateComponentPricePoints( */ private ApiCall prepareBulkCreateComponentPricePointsRequest( final String componentId, - final CreateComponentPricePointsRequest body) throws JsonProcessingException, IOException { + final CreateComponentPricePointsRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -258,7 +257,7 @@ private ApiCall prepareBulkCreateCom * @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: Example: + * @param body Optional parameter: * @return Returns the ComponentPricePointResponse 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. @@ -276,7 +275,7 @@ public ComponentPricePointResponse updateComponentPricePoint( private ApiCall prepareUpdateComponentPricePointRequest( final UpdateComponentPricePointComponentId componentId, final UpdateComponentPricePointPricePointId pricePointId, - final UpdateComponentPricePointRequest body) throws JsonProcessingException, IOException { + final UpdateComponentPricePointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -334,7 +333,7 @@ public ComponentPricePointResponse readComponentPricePoint( private ApiCall prepareReadComponentPricePointRequest( final ReadComponentPricePointComponentId componentId, final ReadComponentPricePointPricePointId pricePointId, - final Boolean currencyPrices) throws IOException { + final Boolean currencyPrices) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -383,7 +382,7 @@ public ComponentPricePointResponse archiveComponentPricePoint( */ private ApiCall prepareArchiveComponentPricePointRequest( final ArchiveComponentPricePointComponentId componentId, - final ArchiveComponentPricePointPricePointId pricePointId) throws IOException { + final ArchiveComponentPricePointPricePointId pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -429,7 +428,7 @@ public ComponentPricePointResponse unarchiveComponentPricePoint( */ private ApiCall prepareUnarchiveComponentPricePointRequest( final int componentId, - final int pricePointId) throws IOException { + final int pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -459,7 +458,7 @@ private ApiCall prepareUnarchiveCompo * there should be a matching price level created in the given currency. Note: Currency Prices * are not able to be created for custom price points. * @param pricePointId Required parameter: The Advanced Billing id of the price point - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentCurrencyPricesResponse 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. @@ -475,7 +474,7 @@ public ComponentCurrencyPricesResponse createCurrencyPrices( */ private ApiCall prepareCreateCurrencyPricesRequest( final int pricePointId, - final CreateCurrencyPricesRequest body) throws JsonProcessingException, IOException { + final CreateCurrencyPricesRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -508,7 +507,7 @@ private ApiCall prepareCreateCurr * on the site level in your settings. Note: Currency Prices are not able to be updated for * custom price points. * @param pricePointId Required parameter: The Advanced Billing id of the price point - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentCurrencyPricesResponse 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. @@ -524,7 +523,7 @@ public ComponentCurrencyPricesResponse updateCurrencyPrices( */ private ApiCall prepareUpdateCurrencyPricesRequest( final int pricePointId, - final UpdateCurrencyPricesRequest body) throws JsonProcessingException, IOException { + final UpdateCurrencyPricesRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -568,7 +567,7 @@ public ListComponentsPricePointsResponse listAllComponentPricePoints( * Builds the ApiCall object for listAllComponentPricePoints. */ private ApiCall prepareListAllComponentPricePointsRequest( - final ListAllComponentPricePointsInput input) throws IOException { + final ListAllComponentPricePointsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java index 26e95012..4a019a2a 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ComponentsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -55,7 +54,7 @@ public ComponentsController(GlobalConfiguration globalConfig) { * [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -71,7 +70,7 @@ public ComponentResponse createMeteredComponent( */ private ApiCall prepareCreateMeteredComponentRequest( final String productFamilyId, - final CreateMeteredComponent body) throws JsonProcessingException, IOException { + final CreateMeteredComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -117,7 +116,7 @@ private ApiCall prepareCreateMeteredComponentRe * [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -133,7 +132,7 @@ public ComponentResponse createQuantityBasedComponent( */ private ApiCall prepareCreateQuantityBasedComponentRequest( final String productFamilyId, - final CreateQuantityBasedComponent body) throws JsonProcessingException, IOException { + final CreateQuantityBasedComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -173,7 +172,7 @@ private ApiCall prepareCreateQuantityBasedCompo * [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -189,7 +188,7 @@ public ComponentResponse createOnOffComponent( */ private ApiCall prepareCreateOnOffComponentRequest( final String productFamilyId, - final CreateOnOffComponent body) throws JsonProcessingException, IOException { + final CreateOnOffComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -232,7 +231,7 @@ private ApiCall prepareCreateOnOffComponentRequ * [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -248,7 +247,7 @@ public ComponentResponse createPrepaidUsageComponent( */ private ApiCall prepareCreatePrepaidUsageComponentRequest( final String productFamilyId, - final CreatePrepaidComponent body) throws JsonProcessingException, IOException { + final CreatePrepaidComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -292,7 +291,7 @@ private ApiCall prepareCreatePrepaidUsageCompon * [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -308,7 +307,7 @@ public ComponentResponse createEventBasedComponent( */ private ApiCall prepareCreateEventBasedComponentRequest( final String productFamilyId, - final CreateEBBComponent body) throws JsonProcessingException, IOException { + final CreateEBBComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -357,7 +356,7 @@ public ComponentResponse findComponent( * Builds the ApiCall object for findComponent. */ private ApiCall prepareFindComponentRequest( - final String handle) throws IOException { + final String handle) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -401,7 +400,7 @@ public ComponentResponse readComponent( */ private ApiCall prepareReadComponentRequest( final int productFamilyId, - final String componentId) throws IOException { + final String componentId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -432,7 +431,7 @@ private ApiCall prepareReadComponentRequest( * which the component belongs * @param componentId Required parameter: Either the Advanced Billing id of the component or * the handle for the component prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -451,7 +450,7 @@ public ComponentResponse updateProductFamilyComponent( private ApiCall prepareUpdateProductFamilyComponentRequest( final int productFamilyId, final String componentId, - final UpdateComponentRequest body) throws JsonProcessingException, IOException { + final UpdateComponentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -503,7 +502,7 @@ public Component archiveComponent( */ private ApiCall prepareArchiveComponentRequest( final int productFamilyId, - final String componentId) throws IOException { + final String componentId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -545,7 +544,7 @@ public List listComponents( * Builds the ApiCall object for listComponents. */ private ApiCall, ApiException> prepareListComponentsRequest( - final ListComponentsInput input) throws IOException { + final ListComponentsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -587,7 +586,7 @@ private ApiCall, ApiException> prepareListComponentsRequ * This request will update a component. You may read the component by either the component's id * or handle. When using the handle, it must be prefixed with `handle:`. * @param componentId Required parameter: The id or handle of the component - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ComponentResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -603,7 +602,7 @@ public ComponentResponse updateComponent( */ private ApiCall prepareUpdateComponentRequest( final String componentId, - final UpdateComponentRequest body) throws JsonProcessingException, IOException { + final UpdateComponentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -647,7 +646,7 @@ public List listComponentsForProductFamily( * Builds the ApiCall object for listComponentsForProductFamily. */ private ApiCall, ApiException> prepareListComponentsForProductFamilyRequest( - final ListComponentsForProductFamilyInput input) throws IOException { + final ListComponentsForProductFamilyInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java index 5f963c26..d1085bb7 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CouponsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -58,7 +57,7 @@ public CouponsController(GlobalConfiguration globalConfig) { * objects in the format: `{ "<product_id/component_id>": boolean_value }`. * @param productFamilyId Required parameter: The Advanced Billing id of the product family to * which the coupon belongs - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CouponResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -74,7 +73,7 @@ public CouponResponse createCoupon( */ private ApiCall prepareCreateCouponRequest( final int productFamilyId, - final CouponRequest body) throws JsonProcessingException, IOException { + final CouponRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -120,7 +119,7 @@ public List listCouponsForProductFamily( * Builds the ApiCall object for listCouponsForProductFamily. */ private ApiCall, ApiException> prepareListCouponsForProductFamilyRequest( - final ListCouponsForProductFamilyInput input) throws IOException { + final ListCouponsForProductFamilyInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -180,7 +179,7 @@ public CouponResponse findCoupon( private ApiCall prepareFindCouponRequest( final Integer productFamilyId, final String code, - final Boolean currencyPrices) throws IOException { + final Boolean currencyPrices) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -238,7 +237,7 @@ public CouponResponse readCoupon( private ApiCall prepareReadCouponRequest( final int productFamilyId, final int couponId, - final Boolean currencyPrices) throws IOException { + final Boolean currencyPrices) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -271,7 +270,7 @@ private ApiCall prepareReadCouponRequest( * @param productFamilyId Required parameter: The Advanced Billing id of the product family to * which the coupon belongs * @param couponId Required parameter: The Advanced Billing id of the coupon - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CouponResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -289,7 +288,7 @@ public CouponResponse updateCoupon( private ApiCall prepareUpdateCouponRequest( final int productFamilyId, final int couponId, - final CouponRequest body) throws JsonProcessingException, IOException { + final CouponRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -341,7 +340,7 @@ public CouponResponse archiveCoupon( */ private ApiCall prepareArchiveCouponRequest( final int productFamilyId, - final int couponId) throws IOException { + final int couponId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -382,7 +381,7 @@ public List listCoupons( * Builds the ApiCall object for listCoupons. */ private ApiCall, ApiException> prepareListCouponsRequest( - final ListCouponsInput input) throws IOException { + final ListCouponsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -431,7 +430,7 @@ public List readCouponUsage( */ private ApiCall, ApiException> prepareReadCouponUsageRequest( final int productFamilyId, - final int couponId) throws IOException { + final int couponId) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -488,7 +487,7 @@ public CouponResponse validateCoupon( */ private ApiCall prepareValidateCouponRequest( final String code, - final Integer productFamilyId) throws IOException { + final Integer productFamilyId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -508,7 +507,7 @@ private ApiCall prepareValidateCouponRequest( response -> ApiHelper.deserialize(response, CouponResponse.class)) .nullify404(false) .localErrorCase("404", - ErrorCase.setReason("Not Found", + ErrorCase.setTemplate("Not Found: '{$response.body}'", (reason, context) -> new SingleStringErrorResponseException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) .build(); @@ -522,7 +521,7 @@ private ApiCall prepareValidateCouponRequest( * - if the primary coupon is percentage based, you will not be able to define pricing in * non-primary currencies. * @param couponId Required parameter: The Advanced Billing id of the coupon - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CouponCurrencyResponse 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. @@ -538,7 +537,7 @@ public CouponCurrencyResponse createOrUpdateCouponCurrencyPrices( */ private ApiCall prepareCreateOrUpdateCouponCurrencyPricesRequest( final int couponId, - final CouponCurrencyRequest body) throws JsonProcessingException, IOException { + final CouponCurrencyRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -586,7 +585,7 @@ private ApiCall prepareCreateOrUpdateCoupo * coupon subcode would be: * `https://<subdomain>.chargify.com/coupons/567/codes/20%25OFF.<format>`. * @param couponId Required parameter: The Advanced Billing id of the coupon - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CouponSubcodesResponse 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. @@ -602,7 +601,7 @@ public CouponSubcodesResponse createCouponSubcodes( */ private ApiCall prepareCreateCouponSubcodesRequest( final int couponId, - final CouponSubcodes body) throws JsonProcessingException, IOException { + final CouponSubcodes body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -643,7 +642,7 @@ public CouponSubcodes listCouponSubcodes( * Builds the ApiCall object for listCouponSubcodes. */ private ApiCall prepareListCouponSubcodesRequest( - final ListCouponSubcodesInput input) throws IOException { + final ListCouponSubcodesInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -675,7 +674,7 @@ private ApiCall prepareListCouponSubcodesRequest( * endpoint. The response will contain: + The created subcodes, + Subcodes that were not created * because they already exist, + Any subcodes not created because they are invalid. * @param couponId Required parameter: The Advanced Billing id of the coupon - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CouponSubcodesResponse 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. @@ -691,7 +690,7 @@ public CouponSubcodesResponse updateCouponSubcodes( */ private ApiCall prepareUpdateCouponSubcodesRequest( final int couponId, - final CouponSubcodes body) throws JsonProcessingException, IOException { + final CouponSubcodes body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -742,7 +741,7 @@ public void deleteCouponSubcode( */ private ApiCall prepareDeleteCouponSubcodeRequest( final int couponId, - final String subcode) throws IOException { + final String subcode) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java index 92ff2e9b..65a576a7 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomFieldsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; @@ -65,13 +64,13 @@ public CustomFieldsController(GlobalConfiguration globalConfig) { * is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can * have 100 Metafields for Subscription and another 100 for Customer. ### Metafields * "On-the-Fly" It is possible to create Metafields “on the fly” when you create your Metadata – - * if a non-existant name is passed when creating Metadata, a Metafield for that key will be + * if a non-existent name is passed when creating Metadata, a Metafield for that key will be * automatically created. The Metafield API, however, gives you more control over your “keys”. * ### Metafield Scope Warning If configuring metafields in the Admin UI or via the API, be * careful sending updates to metafields with the scope attribute – **if a partial update is * sent it will overwrite the current configuration**. * @param resourceType Required parameter: the resource type to which the metafields belong - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the List of Metafield 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 +86,7 @@ public List createMetafields( */ private ApiCall, ApiException> prepareCreateMetafieldsRequest( final ResourceType resourceType, - final CreateMetafieldsRequest body) throws JsonProcessingException, IOException { + final CreateMetafieldsRequest body) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -133,7 +132,7 @@ public ListMetafieldsResponse listMetafields( * Builds the ApiCall object for listMetafields. */ private ApiCall prepareListMetafieldsRequest( - final ListMetafieldsInput input) throws IOException { + final ListMetafieldsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -166,7 +165,7 @@ private ApiCall prepareListMetafieldsReque * Use the following method to update metafields for your Site. Metafields can be populated with * metadata after the fact. * @param resourceType Required parameter: the resource type to which the metafields belong - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the List of Metafield 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. @@ -182,7 +181,7 @@ public List updateMetafield( */ private ApiCall, ApiException> prepareUpdateMetafieldRequest( final ResourceType resourceType, - final UpdateMetafieldsRequest body) throws JsonProcessingException, IOException { + final UpdateMetafieldsRequest body) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -231,7 +230,7 @@ public void deleteMetafield( */ private ApiCall prepareDeleteMetafieldRequest( final ResourceType resourceType, - final String name) throws IOException { + final String name) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -277,7 +276,7 @@ private ApiCall prepareDeleteMetafieldRequest( * @param resourceType Required parameter: the resource type to which the metafields belong * @param resourceId Required parameter: The Advanced Billing id of the customer or the * subscription for which the metadata applies - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the List of Metadata 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. @@ -295,7 +294,7 @@ public List createMetadata( private ApiCall, ApiException> prepareCreateMetadataRequest( final ResourceType resourceType, final int resourceId, - final CreateMetadataRequest body) throws JsonProcessingException, IOException { + final CreateMetadataRequest body) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -344,7 +343,7 @@ public PaginatedMetadata listMetadata( * Builds the ApiCall object for listMetadata. */ private ApiCall prepareListMetadataRequest( - final ListMetadataInput input) throws IOException { + final ListMetadataInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -377,7 +376,7 @@ private ApiCall prepareListMetadataRequest( * @param resourceType Required parameter: the resource type to which the metafields belong * @param resourceId Required parameter: The Advanced Billing id of the customer or the * subscription for which the metadata applies - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the List of Metadata 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. @@ -395,7 +394,7 @@ public List updateMetadata( private ApiCall, ApiException> prepareUpdateMetadataRequest( final ResourceType resourceType, final int resourceId, - final UpdateMetadataRequest body) throws JsonProcessingException, IOException { + final UpdateMetadataRequest body) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -459,7 +458,7 @@ private ApiCall prepareDeleteMetadataRequest( final ResourceType resourceType, final int resourceId, final String name, - final List names) throws IOException { + final List names) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -507,7 +506,7 @@ public PaginatedMetadata listMetadataForResourceType( * Builds the ApiCall object for listMetadataForResourceType. */ private ApiCall prepareListMetadataForResourceTypeRequest( - final ListMetadataForResourceTypeInput input) throws IOException { + final ListMetadataForResourceTypeInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java index dc29e685..63d0fa6c 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/CustomersController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -60,7 +59,7 @@ public CustomersController(GlobalConfiguration globalConfig) { * Billing allows you to attribute a language/region to your customer to deliver invoices in any * required language. For more: [Customer * Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale). - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CustomerResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -74,7 +73,7 @@ public CustomerResponse createCustomer( * Builds the ApiCall object for createCustomer. */ private ApiCall prepareCreateCustomerRequest( - final CreateCustomerRequest body) throws JsonProcessingException, IOException { + final CreateCustomerRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -122,7 +121,7 @@ public List listCustomers( * Builds the ApiCall object for listCustomers. */ private ApiCall, ApiException> prepareListCustomersRequest( - final ListCustomersInput input) throws IOException { + final ListCustomersInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -177,7 +176,7 @@ public CustomerResponse readCustomer( * Builds the ApiCall object for readCustomer. */ private ApiCall prepareReadCustomerRequest( - final int id) throws IOException { + final int id) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -201,7 +200,7 @@ private ApiCall prepareReadCustomerRequest( /** * This method allows to update the Customer. * @param id Required parameter: The Advanced Billing id of the customer - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CustomerResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -217,7 +216,7 @@ public CustomerResponse updateCustomer( */ private ApiCall prepareUpdateCustomerRequest( final int id, - final UpdateCustomerRequest body) throws JsonProcessingException, IOException { + final UpdateCustomerRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -263,7 +262,7 @@ public void deleteCustomer( * Builds the ApiCall object for deleteCustomer. */ private ApiCall prepareDeleteCustomerRequest( - final int id) throws IOException { + final int id) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -298,7 +297,7 @@ public CustomerResponse readCustomerByReference( * Builds the ApiCall object for readCustomerByReference. */ private ApiCall prepareReadCustomerByReferenceRequest( - final String reference) throws IOException { + final String reference) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -335,7 +334,7 @@ public List listCustomerSubscriptions( * Builds the ApiCall object for listCustomerSubscriptions. */ private ApiCall, ApiException> prepareListCustomerSubscriptionsRequest( - final int customerId) throws IOException { + final int customerId) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java index f8ba23d8..77810854 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsBasedBillingSegmentsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -48,7 +47,7 @@ public EventsBasedBillingSegmentsController(GlobalConfiguration globalConfig) { * @param componentId Required parameter: ID or Handle for the Component * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the * Component - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SegmentResponse 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. @@ -66,7 +65,7 @@ public SegmentResponse createSegment( private ApiCall prepareCreateSegmentRequest( final String componentId, final String pricePointId, - final CreateSegmentRequest body) throws JsonProcessingException, IOException { + final CreateSegmentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -119,7 +118,7 @@ public ListSegmentsResponse listSegmentsForPricePoint( * Builds the ApiCall object for listSegmentsForPricePoint. */ private ApiCall prepareListSegmentsForPricePointRequest( - final ListSegmentsForPricePointInput input) throws IOException { + final ListSegmentsForPricePointInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -162,7 +161,7 @@ private ApiCall prepareListSegmentsForPriceP * @param pricePointId Required parameter: ID or Handle of the Price Point belonging to the * Component * @param id Required parameter: The ID of the Segment - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SegmentResponse 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. @@ -182,7 +181,7 @@ private ApiCall prepareUpdateSegmentRequest( final String componentId, final String pricePointId, final double id, - final UpdateSegmentRequest body) throws JsonProcessingException, IOException { + final UpdateSegmentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -240,7 +239,7 @@ public void deleteSegment( private ApiCall prepareDeleteSegmentRequest( final String componentId, final String pricePointId, - final double id) throws IOException { + final double id) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -278,7 +277,7 @@ private ApiCall prepareDeleteSegmentRequest( * @param componentId Required parameter: ID or Handle for the Component * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the * Component - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ListSegmentsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -296,7 +295,7 @@ public ListSegmentsResponse bulkCreateSegments( private ApiCall prepareBulkCreateSegmentsRequest( final String componentId, final String pricePointId, - final BulkCreateSegments body) throws JsonProcessingException, IOException { + final BulkCreateSegments body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -339,7 +338,7 @@ private ApiCall prepareBulkCreateSegmentsReq * @param componentId Required parameter: ID or Handle for the Component * @param pricePointId Required parameter: ID or Handle for the Price Point belonging to the * Component - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ListSegmentsResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -357,7 +356,7 @@ public ListSegmentsResponse bulkUpdateSegments( private ApiCall prepareBulkUpdateSegmentsRequest( final String componentId, final String pricePointId, - final BulkUpdateSegments body) throws JsonProcessingException, IOException { + final BulkUpdateSegments body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java index e9f497d1..22a718ef 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/EventsController.java @@ -76,7 +76,7 @@ public List listEvents( * Builds the ApiCall object for listEvents. */ private ApiCall, ApiException> prepareListEventsRequest( - final ListEventsInput input) throws IOException { + final ListEventsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -139,7 +139,7 @@ public List listSubscriptionEvents( * Builds the ApiCall object for listSubscriptionEvents. */ private ApiCall, ApiException> prepareListSubscriptionEventsRequest( - final ListSubscriptionEventsInput input) throws IOException { + final ListSubscriptionEventsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -189,7 +189,7 @@ public CountResponse readEventsCount( * Builds the ApiCall object for readEventsCount. */ private ApiCall prepareReadEventsCountRequest( - final ReadEventsCountInput input) throws IOException { + final ReadEventsCountInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java index 747f783e..1594a965 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InsightsController.java @@ -42,7 +42,7 @@ public InsightsController(GlobalConfiguration globalConfig) { * The Stats API is a very basic view of some Site-level stats. This API call only answers with * JSON responses. An XML version is not provided. ## Stats Documentation There currently is not * a complimentary matching set of documentation that compliments this endpoint. However, each - * Site's dashboard will reflect the summary of information provided in the Stats reposnse. ``` + * Site's dashboard will reflect the summary of information provided in the Stats response. ``` * https://subdomain.chargify.com/dashboard ```. * @return Returns the SiteSummary response from the API call * @throws ApiException Represents error response from the server. @@ -55,7 +55,7 @@ public SiteSummary readSiteStats() throws ApiException, IOException { /** * Builds the ApiCall object for readSiteStats. */ - private ApiCall prepareReadSiteStatsRequest() throws IOException { + private ApiCall prepareReadSiteStatsRequest() { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -98,7 +98,7 @@ public MRRResponse readMrr( */ private ApiCall prepareReadMrrRequest( final ZonedDateTime atTime, - final Integer subscriptionId) throws IOException { + final Integer subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -152,7 +152,7 @@ public ListMRRResponse listMrrMovements( * Builds the ApiCall object for listMrrMovements. */ private ApiCall prepareListMrrMovementsRequest( - final ListMrrMovementsInput input) throws IOException { + final ListMrrMovementsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -199,7 +199,7 @@ public SubscriptionMRRResponse listMrrPerSubscription( * Builds the ApiCall object for listMrrPerSubscription. */ private ApiCall prepareListMrrPerSubscriptionRequest( - final ListMrrPerSubscriptionInput input) throws IOException { + final ListMrrPerSubscriptionInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java index 0c4fbc87..6aa1d7ba 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/InvoicesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -62,7 +61,7 @@ public InvoicesController(GlobalConfiguration globalConfig) { * segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00 respectively). * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -78,7 +77,7 @@ public Invoice refundInvoice( */ private ApiCall prepareRefundInvoiceRequest( final String uid, - final RefundInvoiceRequest body) throws JsonProcessingException, IOException { + final RefundInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -125,7 +124,7 @@ public ListInvoicesResponse listInvoices( * Builds the ApiCall object for listInvoices. */ private ApiCall prepareListInvoicesRequest( - final ListInvoicesInput input) throws IOException { + final ListInvoicesInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -141,6 +140,8 @@ private ApiCall prepareListInvoicesRequest( .value(input.getSubscriptionId()).isRequired(false)) .queryParam(param -> param.key("subscription_group_uid") .value(input.getSubscriptionGroupUid()).isRequired(false)) + .queryParam(param -> param.key("consolidation_level") + .value(input.getConsolidationLevel()).isRequired(false)) .queryParam(param -> param.key("page") .value(input.getPage()).isRequired(false)) .queryParam(param -> param.key("per_page") @@ -210,7 +211,7 @@ public Invoice readInvoice( * Builds the ApiCall object for readInvoice. */ private ApiCall prepareReadInvoiceRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -255,7 +256,7 @@ public ListInvoiceEventsResponse listInvoiceEvents( * Builds the ApiCall object for listInvoiceEvents. */ private ApiCall prepareListInvoiceEventsRequest( - final ListInvoiceEventsInput input) throws IOException { + final ListInvoiceEventsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -289,27 +290,11 @@ private ApiCall prepareListInvoiceEvent } /** - * This API call should be used when you want to record a payment of a given type against a - * specific invoice. If you would like to apply a payment across multiple invoices, you can use - * the Bulk Payment endpoint. ## Create a Payment from the existing payment profile In order to - * apply a payment to an invoice using an existing payment profile, specify `type` as `payment`, - * the amount less than the invoice total, and the customer's `payment_profile_id`. The ID of a - * payment profile might be retrieved via the Payment Profiles API endpoint. ``` { "type": - * "payment", "payment": { "amount": 10.00, "payment_profile_id": 123 } } ``` ## Create a - * Payment from the Subscription's Prepayment Account In order apply a prepayment to an invoice, - * specify the `type` as `prepayment`, and also the `amount`. ``` { "type": "prepayment", - * "payment": { "amount": 10.00 } } ``` Note that the `amount` must be less than or equal to the - * Subscription's Prepayment account balance. ## Create a Payment from the Subscription's - * Service Credit Account In order to apply a service credit to an invoice, specify the `type` - * as `service_credit`, and also the `amount`: ``` { "type": "service_credit", "payment": { - * "amount": 10.00 } } ``` Note that Advanced Billing will attempt to fully pay the invoice's - * `due_amount` from the Subscription's Service Credit account. At this time, partial payments - * from a Service Credit Account are only allowed for consolidated invoices (subscription - * groups). Therefore, for normal invoices the Service Credit account balance must be greater - * than or equal to the invoice's `due_amount`. + * Applies a payment of a given type against a specific invoice. If you would like to apply a + * payment across multiple invoices, you can use the Bulk Payment endpoint. * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -325,7 +310,7 @@ public Invoice recordPaymentForInvoice( */ private ApiCall prepareRecordPaymentForInvoiceRequest( final String uid, - final CreateInvoicePaymentRequest body) throws JsonProcessingException, IOException { + final CreateInvoicePaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -362,7 +347,7 @@ private ApiCall prepareRecordPaymentForInvoiceRequest( * "invoice_uid": "inv_7bc6bwkct3lyt", "amount": "150.00" } ] } } ``` Note that the invoice * payment amounts must be greater than 0. Total amount must be greater or equal to invoices * payment amount sum. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the MultiInvoicePaymentResponse 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. @@ -376,7 +361,7 @@ public MultiInvoicePaymentResponse recordPaymentForMultipleInvoices( * Builds the ApiCall object for recordPaymentForMultipleInvoices. */ private ApiCall prepareRecordPaymentForMultipleInvoicesRequest( - final CreateMultiInvoicePaymentRequest body) throws JsonProcessingException, IOException { + final CreateMultiInvoicePaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -421,7 +406,7 @@ public ListCreditNotesResponse listCreditNotes( * Builds the ApiCall object for listCreditNotes. */ private ApiCall prepareListCreditNotesRequest( - final ListCreditNotesInput input) throws IOException { + final ListCreditNotesInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -472,7 +457,7 @@ public CreditNote readCreditNote( * Builds the ApiCall object for readCreditNote. */ private ApiCall prepareReadCreditNoteRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -500,7 +485,7 @@ private ApiCall prepareReadCreditNoteRequest( * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the RecordPaymentResponse 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. @@ -516,7 +501,7 @@ public RecordPaymentResponse recordPaymentForSubscription( */ private ApiCall prepareRecordPaymentForSubscriptionRequest( final int subscriptionId, - final RecordPaymentRequest body) throws JsonProcessingException, IOException { + final RecordPaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -572,7 +557,7 @@ public Invoice reopenInvoice( * Builds the ApiCall object for reopenInvoice. */ private ApiCall prepareReopenInvoiceRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -605,7 +590,7 @@ private ApiCall prepareReopenInvoiceRequest( * invoice. * @param uid Required parameter: The unique identifier for the invoice, this does not refer * to the public facing invoice number. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -621,7 +606,7 @@ public Invoice voidInvoice( */ private ApiCall prepareVoidInvoiceRequest( final String uid, - final VoidInvoiceRequest body) throws JsonProcessingException, IOException { + final VoidInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -669,7 +654,7 @@ public ConsolidatedInvoice listConsolidatedInvoiceSegments( * Builds the ApiCall object for listConsolidatedInvoiceSegments. */ private ApiCall prepareListConsolidatedInvoiceSegmentsRequest( - final ListConsolidatedInvoiceSegmentsInput input) throws IOException { + final ListConsolidatedInvoiceSegmentsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -766,7 +751,7 @@ private ApiCall prepareListConsolidatedInvoic * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the InvoiceResponse 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. @@ -782,7 +767,7 @@ public InvoiceResponse createInvoice( */ private ApiCall prepareCreateInvoiceRequest( final int subscriptionId, - final CreateInvoiceRequest body) throws JsonProcessingException, IOException { + final CreateInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -824,7 +809,7 @@ private ApiCall prepareCreateInvoiceRequest( * 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: Example: + * @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. */ @@ -839,7 +824,7 @@ public void sendInvoice( */ private ApiCall prepareSendInvoiceRequest( final String uid, - final SendInvoiceRequest body) throws JsonProcessingException, IOException { + final SendInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -885,7 +870,7 @@ public CustomerChangesPreviewResponse previewCustomerInformationChanges( * Builds the ApiCall object for previewCustomerInformationChanges. */ private ApiCall preparePreviewCustomerInformationChangesRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -933,7 +918,7 @@ public Invoice updateCustomerInformation( * Builds the ApiCall object for updateCustomerInformation. */ private ApiCall prepareUpdateCustomerInformationRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -982,7 +967,7 @@ private ApiCall prepareUpdateCustomerInformationRequest( * "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: Example: + * @param body Optional parameter: * @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. @@ -998,7 +983,7 @@ public Invoice issueInvoice( */ private ApiCall prepareIssueInvoiceRequest( final String uid, - final IssueInvoiceRequest body) throws JsonProcessingException, IOException { + final IssueInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java index fa006af7..d7414da5 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/OffersController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -46,7 +45,7 @@ public OffersController(GlobalConfiguration globalConfig) { * a Product Price Point You can optionally pass in a `product_price_point_id` that corresponds * with the `product_id` and the offer will use that price point. If a `product_price_point_id` * is not passed in, the product's default price point will be used. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the OfferResponse 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. @@ -60,7 +59,7 @@ public OfferResponse createOffer( * Builds the ApiCall object for createOffer. */ private ApiCall prepareCreateOfferRequest( - final CreateOfferRequest body) throws JsonProcessingException, IOException { + final CreateOfferRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -102,7 +101,7 @@ public ListOffersResponse listOffers( * Builds the ApiCall object for listOffers. */ private ApiCall prepareListOffersRequest( - final ListOffersInput input) throws IOException { + final ListOffersInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -147,7 +146,7 @@ public OfferResponse readOffer( * Builds the ApiCall object for readOffer. */ private ApiCall prepareReadOfferRequest( - final int offerId) throws IOException { + final int offerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -183,7 +182,7 @@ public void archiveOffer( * Builds the ApiCall object for archiveOffer. */ private ApiCall prepareArchiveOfferRequest( - final int offerId) throws IOException { + final int offerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -217,7 +216,7 @@ public void unarchiveOffer( * Builds the ApiCall object for unarchiveOffer. */ private ApiCall prepareUnarchiveOfferRequest( - final int offerId) throws IOException { + final int offerId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java index 4e7fa01c..58324178 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/PaymentProfilesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -198,7 +197,7 @@ public PaymentProfileResponse createPaymentProfile( * Builds the ApiCall object for createPaymentProfile. */ private ApiCall prepareCreatePaymentProfileRequest( - final CreatePaymentProfileRequest body) throws JsonProcessingException, IOException { + final CreatePaymentProfileRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -245,7 +244,7 @@ public List listPaymentProfiles( * Builds the ApiCall object for listPaymentProfiles. */ private ApiCall, ApiException> prepareListPaymentProfilesRequest( - final ListPaymentProfilesInput input) throws IOException { + final ListPaymentProfilesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -276,6 +275,7 @@ private ApiCall, ApiException> prepareListPaymentPr * note that a different JSON object will be returned if the card method on file is a bank * account. ### Response for Bank Account Example response for Bank Account: ``` { * "payment_profile": { "id": 10089892, "first_name": "Chester", "last_name": "Tester", + * "created_at": "2025-01-01T00:00:00-05:00", "updated_at": "2025-01-01T00:00:00-05:00", * "customer_id": 14543792, "current_vault": "bogus", "vault_token": "0011223344", * "billing_address": "456 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", * "billing_zip": "80302", "billing_country": "US", "customer_vault_token": null, @@ -297,7 +297,7 @@ public PaymentProfileResponse readPaymentProfile( * Builds the ApiCall object for readPaymentProfile. */ private ApiCall prepareReadPaymentProfileRequest( - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -345,7 +345,7 @@ private ApiCall prepareReadPaymentProfileR * Stripe, you may elect to manually trigger a retry for a past due subscription after a partial * update. * @param paymentProfileId Required parameter: The Chargify id of the payment profile - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the PaymentProfileResponse 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. @@ -361,7 +361,7 @@ public PaymentProfileResponse updatePaymentProfile( */ private ApiCall prepareUpdatePaymentProfileRequest( final int paymentProfileId, - final UpdatePaymentProfileRequest body) throws JsonProcessingException, IOException { + final UpdatePaymentProfileRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -408,7 +408,7 @@ public void deleteUnusedPaymentProfile( * Builds the ApiCall object for deleteUnusedPaymentProfile. */ private ApiCall prepareDeleteUnusedPaymentProfileRequest( - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -456,7 +456,7 @@ public void deleteSubscriptionsPaymentProfile( */ private ApiCall prepareDeleteSubscriptionsPaymentProfileRequest( final int subscriptionId, - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -480,7 +480,7 @@ private ApiCall prepareDeleteSubscriptionsPaymentProfileRequ * Submit the two small deposit amounts the customer received in their bank account in order to * verify the bank account. (Stripe only). * @param bankAccountId Required parameter: Identifier of the bank account in the system. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the BankAccountResponse 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 +496,7 @@ public BankAccountResponse verifyBankAccount( */ private ApiCall prepareVerifyBankAccountRequest( final int bankAccountId, - final BankAccountVerificationRequest body) throws JsonProcessingException, IOException { + final BankAccountVerificationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -547,7 +547,7 @@ public void deleteSubscriptionGroupPaymentProfile( */ private ApiCall prepareDeleteSubscriptionGroupPaymentProfileRequest( final String uid, - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -589,7 +589,7 @@ public PaymentProfileResponse changeSubscriptionDefaultPaymentProfile( */ private ApiCall prepareChangeSubscriptionDefaultPaymentProfileRequest( final int subscriptionId, - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -642,7 +642,7 @@ public PaymentProfileResponse changeSubscriptionGroupDefaultPaymentProfile( */ private ApiCall prepareChangeSubscriptionGroupDefaultPaymentProfileRequest( final String uid, - final int paymentProfileId) throws IOException { + final int paymentProfileId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -688,7 +688,7 @@ public GetOneTimeTokenRequest readOneTimeToken( * Builds the ApiCall object for readOneTimeToken. */ private ApiCall prepareReadOneTimeTokenRequest( - final String chargifyToken) throws IOException { + final String chargifyToken) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -737,7 +737,7 @@ public void sendRequestUpdatePaymentEmail( * Builds the ApiCall object for sendRequestUpdatePaymentEmail. */ private ApiCall prepareSendRequestUpdatePaymentEmailRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java index b9baead4..51d93b2e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductFamiliesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; @@ -54,7 +53,7 @@ public List listProductsForProductFamily( * Builds the ApiCall object for listProductsForProductFamily. */ private ApiCall, ApiException> prepareListProductsForProductFamilyRequest( - final ListProductsForProductFamilyInput input) throws IOException { + final ListProductsForProductFamilyInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -93,7 +92,7 @@ private ApiCall, ApiException> prepareListProductsForProdu ProductResponse[].class)) .nullify404(false) .localErrorCase("404", - ErrorCase.setReason("Not Found", + ErrorCase.setTemplate("Not Found:'{$response.body}'", (reason, context) -> new ApiException(reason, context))) .globalErrorCase(GLOBAL_ERROR_CASES)) .build(); @@ -104,7 +103,7 @@ private ApiCall, ApiException> prepareListProductsForProdu * Family to act as a container for your products, components and coupons. Full documentation on * how Product Families operate within the Advanced Billing UI can be located * [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families). - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ProductFamilyResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -118,7 +117,7 @@ public ProductFamilyResponse createProductFamily( * Builds the ApiCall object for createProductFamily. */ private ApiCall prepareCreateProductFamilyRequest( - final CreateProductFamilyRequest body) throws JsonProcessingException, IOException { + final CreateProductFamilyRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -160,7 +159,7 @@ public List listProductFamilies( * Builds the ApiCall object for listProductFamilies. */ private ApiCall, ApiException> prepareListProductFamiliesRequest( - final ListProductFamiliesInput input) throws IOException { + final ListProductFamiliesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -208,7 +207,7 @@ public ProductFamilyResponse readProductFamily( * Builds the ApiCall object for readProductFamily. */ private ApiCall prepareReadProductFamilyRequest( - final int id) throws IOException { + final int id) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java index 61f32f93..56ae4d0b 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductPricePointsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -58,7 +57,7 @@ public ProductPricePointsController(GlobalConfiguration globalConfig) { * Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points). * @param productId Required parameter: The id or handle of the product. When using the * handle, it must be prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ProductPricePointResponse 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. @@ -74,7 +73,7 @@ public ProductPricePointResponse createProductPricePoint( */ private ApiCall prepareCreateProductPricePointRequest( final CreateProductPricePointProductId productId, - final CreateProductPricePointRequest body) throws JsonProcessingException, IOException { + final CreateProductPricePointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -118,7 +117,7 @@ public ListProductPricePointsResponse listProductPricePoints( * Builds the ApiCall object for listProductPricePoints. */ private ApiCall prepareListProductPricePointsRequest( - final ListProductPricePointsInput input) throws IOException { + final ListProductPricePointsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -158,7 +157,7 @@ private ApiCall prepareListProduct * @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-product-price-point-handle` for a string handle. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ProductPricePointResponse 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. @@ -176,7 +175,7 @@ public ProductPricePointResponse updateProductPricePoint( private ApiCall prepareUpdateProductPricePointRequest( final UpdateProductPricePointProductId productId, final UpdateProductPricePointPricePointId pricePointId, - final UpdateProductPricePointRequest body) throws JsonProcessingException, IOException { + final UpdateProductPricePointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -236,7 +235,7 @@ public ProductPricePointResponse readProductPricePoint( private ApiCall prepareReadProductPricePointRequest( final ReadProductPricePointProductId productId, final ReadProductPricePointPricePointId pricePointId, - final Boolean currencyPrices) throws IOException { + final Boolean currencyPrices) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -284,7 +283,7 @@ public ProductPricePointResponse archiveProductPricePoint( */ private ApiCall prepareArchiveProductPricePointRequest( final ArchiveProductPricePointProductId productId, - final ArchiveProductPricePointPricePointId pricePointId) throws IOException { + final ArchiveProductPricePointPricePointId pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -330,7 +329,7 @@ public ProductPricePointResponse unarchiveProductPricePoint( */ private ApiCall prepareUnarchiveProductPricePointRequest( final int productId, - final int pricePointId) throws IOException { + final int pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -374,7 +373,7 @@ public ProductResponse promoteProductPricePointToDefault( */ private ApiCall preparePromoteProductPricePointToDefaultRequest( final int productId, - final int pricePointId) throws IOException { + final int pricePointId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -401,7 +400,7 @@ private ApiCall preparePromoteProductPricePointTo * Use this endpoint to create multiple product price points in one request. * @param productId Required parameter: The Advanced Billing id of the product to which the * price points belong - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the BulkCreateProductPricePointsResponse 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. @@ -417,7 +416,7 @@ public BulkCreateProductPricePointsResponse bulkCreateProductPricePoints( */ private ApiCall prepareBulkCreateProductPricePointsRequest( final int productId, - final BulkCreateProductPricePointsRequest body) throws JsonProcessingException, IOException { + final BulkCreateProductPricePointsRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -453,7 +452,7 @@ private ApiCall prepareBulkC * able to be created for custom product price points. * @param productPricePointId Required parameter: The Advanced Billing id of the product price * point - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CurrencyPricesResponse 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. @@ -469,7 +468,7 @@ public CurrencyPricesResponse createProductCurrencyPrices( */ private ApiCall prepareCreateProductCurrencyPricesRequest( final int productPricePointId, - final CreateProductCurrencyPricesRequest body) throws JsonProcessingException, IOException { + final CreateProductCurrencyPricesRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -505,7 +504,7 @@ private ApiCall prepareCreateProductCurren * able to be updated for custom product price points. * @param productPricePointId Required parameter: The Advanced Billing id of the product price * point - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CurrencyPricesResponse 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. @@ -521,7 +520,7 @@ public CurrencyPricesResponse updateProductCurrencyPrices( */ private ApiCall prepareUpdateProductCurrencyPricesRequest( final int productPricePointId, - final UpdateCurrencyPricesRequest body) throws JsonProcessingException, IOException { + final UpdateCurrencyPricesRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -565,7 +564,7 @@ public ListProductPricePointsResponse listAllProductPricePoints( * Builds the ApiCall object for listAllProductPricePoints. */ private ApiCall prepareListAllProductPricePointsRequest( - final ListAllProductPricePointsInput input) throws IOException { + final ListAllProductPricePointsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java index 35e67280..30f0bcc2 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProductsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; @@ -43,7 +42,7 @@ public ProductsController(GlobalConfiguration globalConfig) { * Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations). * @param productFamilyId Required parameter: Either the product family's id or its handle * prefixed with `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ProductResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -59,7 +58,7 @@ public ProductResponse createProduct( */ private ApiCall prepareCreateProductRequest( final String productFamilyId, - final CreateOrUpdateProductRequest body) throws JsonProcessingException, IOException { + final CreateOrUpdateProductRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -104,7 +103,7 @@ public ProductResponse readProduct( * Builds the ApiCall object for readProduct. */ private ApiCall prepareReadProductRequest( - final int productId) throws IOException { + final int productId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -132,7 +131,7 @@ private ApiCall prepareReadProductRequest( * create a new price point and set it as the default price point for this product. If you * should like to update an existing product price point, that must be done separately. * @param productId Required parameter: The Advanced Billing id of the product - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ProductResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -148,7 +147,7 @@ public ProductResponse updateProduct( */ private ApiCall prepareUpdateProductRequest( final int productId, - final CreateOrUpdateProductRequest body) throws JsonProcessingException, IOException { + final CreateOrUpdateProductRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -195,7 +194,7 @@ public ProductResponse archiveProduct( * Builds the ApiCall object for archiveProduct. */ private ApiCall prepareArchiveProductRequest( - final int productId) throws IOException { + final int productId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -235,7 +234,7 @@ public ProductResponse readProductByHandle( * Builds the ApiCall object for readProductByHandle. */ private ApiCall prepareReadProductByHandleRequest( - final String apiHandle) throws IOException { + final String apiHandle) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -272,7 +271,7 @@ public List listProducts( * Builds the ApiCall object for listProducts. */ private ApiCall, ApiException> prepareListProductsRequest( - final ListProductsInput input) throws IOException { + final ListProductsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java index 902285f8..650907bf 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ProformaInvoicesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -63,7 +62,7 @@ public void createConsolidatedProformaInvoice( * Builds the ApiCall object for createConsolidatedProformaInvoice. */ private ApiCall prepareCreateConsolidatedProformaInvoiceRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -103,7 +102,7 @@ public ListProformaInvoicesResponse listSubscriptionGroupProformaInvoices( * Builds the ApiCall object for listSubscriptionGroupProformaInvoices. */ private ApiCall prepareListSubscriptionGroupProformaInvoicesRequest( - final ListSubscriptionGroupProformaInvoicesInput input) throws IOException { + final ListSubscriptionGroupProformaInvoicesInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -156,7 +155,7 @@ public ProformaInvoice readProformaInvoice( * Builds the ApiCall object for readProformaInvoice. */ private ApiCall prepareReadProformaInvoiceRequest( - final String proformaInvoiceUid) throws IOException { + final String proformaInvoiceUid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -201,7 +200,7 @@ public ProformaInvoice createProformaInvoice( * Builds the ApiCall object for createProformaInvoice. */ private ApiCall prepareCreateProformaInvoiceRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -244,7 +243,7 @@ public ListProformaInvoicesResponse listProformaInvoices( * Builds the ApiCall object for listProformaInvoices. */ private ApiCall prepareListProformaInvoicesRequest( - final ListProformaInvoicesInput input) throws IOException { + final ListProformaInvoicesInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -297,7 +296,7 @@ private ApiCall prepareListProformaI * message. A reason for the void operation is required to be included in the request body. If * one is not provided, the response will have HTTP status code 422 and an error message. * @param proformaInvoiceUid Required parameter: The uid of the proforma invoice - * @param body Optional parameter: Example: + * @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. @@ -313,7 +312,7 @@ public ProformaInvoice voidProformaInvoice( */ private ApiCall prepareVoidProformaInvoiceRequest( final String proformaInvoiceUid, - final VoidInvoiceRequest body) throws JsonProcessingException, IOException { + final VoidInvoiceRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -371,7 +370,7 @@ public ProformaInvoice previewProformaInvoice( * Builds the ApiCall object for previewProformaInvoice. */ private ApiCall preparePreviewProformaInvoiceRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -409,7 +408,7 @@ private ApiCall preparePreviewProformaInvoiceRequ * name, and email are the minimum requirements. We recommend associating the proforma invoice * with a customer_id to easily find their proforma invoices, since the subscription_id will * always be blank. - * @param body Optional parameter: Example: + * @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. @@ -423,7 +422,7 @@ public ProformaInvoice createSignupProformaInvoice( * Builds the ApiCall object for createSignupProformaInvoice. */ private ApiCall prepareCreateSignupProformaInvoiceRequest( - final CreateSubscriptionRequest body) throws JsonProcessingException, IOException { + final CreateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -464,7 +463,7 @@ private ApiCall prepareCreateSignupProformaInvoic * requirements. * @param include Optional parameter: Choose to include a proforma invoice preview for the * first renewal. Use in query `include=next_proforma_invoice`. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SignupProformaPreviewResponse 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. @@ -480,7 +479,7 @@ public SignupProformaPreviewResponse previewSignupProformaInvoice( */ private ApiCall preparePreviewSignupProformaInvoiceRequest( final CreateSignupProformaPreviewInclude include, - final CreateSubscriptionRequest body) throws JsonProcessingException, IOException { + final CreateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java index da19e521..6b88d4e2 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReasonCodesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -39,15 +38,15 @@ public ReasonCodesController(GlobalConfiguration globalConfig) { /** * # Reason Codes Intro ReasonCodes are a way to gain a high level view of why your customers - * are cancelling the subcription to your product or service. Add a set of churn reason codes to - * be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel + * are cancelling the subscription to your product or service. Add a set of churn reason codes + * to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel * their subscription, learn why they decided to cancel. ## Reason Code Documentation Full * documentation on how Reason Codes operate within Advanced Billing can be located under the * following links. [Churn Reason * Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes) ## * Create Reason Code This method gives a merchant the option to create a reason codes for a * given Site. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -61,7 +60,7 @@ public ReasonCodeResponse createReasonCode( * Builds the ApiCall object for createReasonCode. */ private ApiCall prepareCreateReasonCodeRequest( - final CreateReasonCodeRequest body) throws JsonProcessingException, IOException { + final CreateReasonCodeRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -104,7 +103,7 @@ public List listReasonCodes( * Builds the ApiCall object for listReasonCodes. */ private ApiCall, ApiException> prepareListReasonCodesRequest( - final ListReasonCodesInput input) throws IOException { + final ListReasonCodesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -148,7 +147,7 @@ public ReasonCodeResponse readReasonCode( * Builds the ApiCall object for readReasonCode. */ private ApiCall prepareReadReasonCodeRequest( - final int reasonCodeId) throws IOException { + final int reasonCodeId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -175,7 +174,7 @@ private ApiCall prepareReadReasonCodeRequest( /** * This method gives a merchant the option to update an existing reason code for a given site. * @param reasonCodeId Required parameter: The Advanced Billing id of the reason code - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ReasonCodeResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -191,7 +190,7 @@ public ReasonCodeResponse updateReasonCode( */ private ApiCall prepareUpdateReasonCodeRequest( final int reasonCodeId, - final UpdateReasonCodeRequest body) throws JsonProcessingException, IOException { + final UpdateReasonCodeRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -224,7 +223,7 @@ private ApiCall prepareUpdateReasonCodeRequest /** * This method gives a merchant the option to delete one reason code from the Churn Reason - * Codes. This code will be immediately removed. This action is not reversable. + * Codes. This code will be immediately removed. This action is not reversible. * @param reasonCodeId Required parameter: The Advanced Billing id of the reason code * @return Returns the OkResponse response from the API call * @throws ApiException Represents error response from the server. @@ -239,7 +238,7 @@ public OkResponse deleteReasonCode( * Builds the ApiCall object for deleteReasonCode. */ private ApiCall prepareDeleteReasonCodeRequest( - final int reasonCodeId) throws IOException { + final int reasonCodeId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java index 8555fd59..fc31e0ac 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/ReferralCodesController.java @@ -53,7 +53,7 @@ public ReferralValidationResponse validateReferralCode( * Builds the ApiCall object for validateReferralCode. */ private ApiCall prepareValidateReferralCodeRequest( - final String code) throws IOException { + final String code) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java index 06f8bf71..09cc2951 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SalesCommissionsController.java @@ -61,7 +61,7 @@ public List listSalesCommissionSettings( * Builds the ApiCall object for listSalesCommissionSettings. */ private ApiCall, ApiException> prepareListSalesCommissionSettingsRequest( - final ListSalesCommissionSettingsInput input) throws IOException { + final ListSalesCommissionSettingsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -117,7 +117,7 @@ public List listSalesReps( * Builds the ApiCall object for listSalesReps. */ private ApiCall, ApiException> prepareListSalesRepsRequest( - final ListSalesRepsInput input) throws IOException { + final ListSalesRepsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -198,7 +198,7 @@ private ApiCall prepareReadSalesRepRequest( final String authorization, final Boolean liveMode, final Integer page, - final Integer perPage) throws IOException { + final Integer perPage) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java index 59b7a121..3e913580 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SitesController.java @@ -54,7 +54,7 @@ public SiteResponse readSite() throws ApiException, IOException { /** * Builds the ApiCall object for readSite. */ - private ApiCall prepareReadSiteRequest() throws IOException { + private ApiCall prepareReadSiteRequest() { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -95,7 +95,7 @@ public void clearSite( * Builds the ApiCall object for clearSite. */ private ApiCall prepareClearSiteRequest( - final CleanupScope cleanupScope) throws IOException { + final CleanupScope cleanupScope) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -129,7 +129,7 @@ public ListPublicKeysResponse listChargifyJsPublicKeys( * Builds the ApiCall object for listChargifyJsPublicKeys. */ private ApiCall prepareListChargifyJsPublicKeysRequest( - final ListChargifyJsPublicKeysInput input) throws IOException { + final ListChargifyJsPublicKeysInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java index 2952effe..053d403e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionComponentsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; @@ -76,7 +75,7 @@ public SubscriptionComponentResponse readSubscriptionComponent( */ private ApiCall prepareReadSubscriptionComponentRequest( final int subscriptionId, - final int componentId) throws IOException { + final int componentId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -120,7 +119,7 @@ public List listSubscriptionComponents( * Builds the ApiCall object for listSubscriptionComponents. */ private ApiCall, ApiException> prepareListSubscriptionComponentsRequest( - final ListSubscriptionComponentsInput input) throws IOException { + final ListSubscriptionComponentsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -171,7 +170,7 @@ private ApiCall, ApiException> prepareListSu * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the BulkComponentsPricePointAssignment 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. @@ -188,7 +187,7 @@ public BulkComponentsPricePointAssignment bulkUpdateSubscriptionComponentsPriceP */ private ApiCall prepareBulkUpdateSubscriptionComponentsPricePointsRequest( final int subscriptionId, - final BulkComponentsPricePointAssignment body) throws JsonProcessingException, IOException { + final BulkComponentsPricePointAssignment body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -234,7 +233,7 @@ public SubscriptionResponse bulkResetSubscriptionComponentsPricePoints( * Builds the ApiCall object for bulkResetSubscriptionComponentsPricePoints. */ private ApiCall prepareBulkResetSubscriptionComponentsPricePointsRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -300,7 +299,7 @@ private ApiCall prepareBulkResetSubscription * Changes to either may cause the prorated charge/credit to be wrong.**. * @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: Example: + * @param body Optional parameter: * @return Returns the AllocationResponse 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. @@ -318,7 +317,7 @@ public AllocationResponse allocateComponent( private ApiCall prepareAllocateComponentRequest( final int subscriptionId, final int componentId, - final CreateAllocationRequest body) throws JsonProcessingException, IOException { + final CreateAllocationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -382,7 +381,7 @@ public List listAllocations( private ApiCall, ApiException> prepareListAllocationsRequest( final int subscriptionId, final int componentId, - final Integer page) throws IOException { + final Integer page) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -422,7 +421,7 @@ private ApiCall, ApiException> prepareListAllocationsRe * `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 - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the List of AllocationResponse 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. @@ -438,7 +437,7 @@ public List allocateComponents( */ private ApiCall, ApiException> prepareAllocateComponentsRequest( final int subscriptionId, - final AllocateComponents body) throws JsonProcessingException, IOException { + final AllocateComponents body) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -481,7 +480,7 @@ private ApiCall, ApiException> prepareAllocateComponent * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the AllocationPreviewResponse 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. @@ -497,7 +496,7 @@ public AllocationPreviewResponse previewAllocations( */ private ApiCall preparePreviewAllocationsRequest( final int subscriptionId, - final PreviewAllocationsRequest body) throws JsonProcessingException, IOException { + final PreviewAllocationsRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -539,7 +538,7 @@ private ApiCall preparePreviewAllocatio * @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: Example: + * @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. */ @@ -559,7 +558,7 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio final int subscriptionId, final int componentId, final int allocationId, - final UpdateAllocationExpirationDate body) throws JsonProcessingException, IOException { + final UpdateAllocationExpirationDate body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -606,7 +605,7 @@ private ApiCall prepareUpdatePrepaidUsageAllocationExpiratio * @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: Example: + * @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. */ @@ -626,7 +625,7 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest( final int subscriptionId, final int componentId, final int allocationId, - final CreditSchemeRequest body) throws JsonProcessingException, IOException { + final CreditSchemeRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -696,7 +695,7 @@ private ApiCall prepareDeletePrepaidUsageAllocationRequest( * @param subscriptionId Required parameter: The Chargify id of the subscription * @param componentId Required parameter: Either the Advanced Billing id for the component or * the component's handle prefixed by `handle:` - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the UsageResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -714,7 +713,7 @@ public UsageResponse createUsage( private ApiCall prepareCreateUsageRequest( final int subscriptionId, final CreateUsageComponentId componentId, - final CreateUsageRequest body) throws JsonProcessingException, IOException { + final CreateUsageRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -768,7 +767,7 @@ public List listUsages( * Builds the ApiCall object for listUsages. */ private ApiCall, ApiException> prepareListUsagesRequest( - final ListUsagesInput input) throws IOException { + final ListUsagesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -816,7 +815,7 @@ private ApiCall, ApiException> prepareListUsagesRequest( * be billed for event-based component usage at renewal.*. * @param subscriptionId Required parameter: The Advanced Billing id of the subscription * @param componentId Required parameter: The Advanced Billing id of the component - * @param body Optional parameter: Example: + * @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. */ @@ -833,7 +832,7 @@ public void activateEventBasedComponent( private ApiCall prepareActivateEventBasedComponentRequest( final int subscriptionId, final int componentId, - final ActivateEventBasedComponent body) throws JsonProcessingException, IOException { + final ActivateEventBasedComponent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -877,7 +876,7 @@ public void deactivateEventBasedComponent( */ private ApiCall prepareDeactivateEventBasedComponentRequest( final int subscriptionId, - final int componentId) throws IOException { + final int componentId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -912,7 +911,7 @@ private ApiCall prepareDeactivateEventBasedComponentRequest( * published. * @param storeUid Optional parameter: If you've attached your own Keen project as an Advanced * Billing event data-store, use this parameter to indicate the data-store. - * @param body Optional parameter: Example: + * @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. */ @@ -929,7 +928,7 @@ public void recordEvent( private ApiCall prepareRecordEventRequest( final String apiHandle, final String storeUid, - final EBBEvent body) throws JsonProcessingException, IOException { + final EBBEvent body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -962,7 +961,7 @@ private ApiCall prepareRecordEventRequest( * published. * @param storeUid Optional parameter: If you've attached your own Keen project as an Advanced * Billing event data-store, use this parameter to indicate the data-store. - * @param body Optional parameter: Example: + * @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. */ @@ -979,7 +978,7 @@ public void bulkRecordEvents( private ApiCall prepareBulkRecordEventsRequest( final String apiHandle, final String storeUid, - final List body) throws JsonProcessingException, IOException { + final List body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -1019,7 +1018,7 @@ public ListSubscriptionComponentsResponse listSubscriptionComponentsForSite( * Builds the ApiCall object for listSubscriptionComponentsForSite. */ private ApiCall prepareListSubscriptionComponentsForSiteRequest( - final ListSubscriptionComponentsForSiteInput input) throws IOException { + final ListSubscriptionComponentsForSiteInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java index b61e2040..160b26b0 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupInvoiceAccountController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -44,7 +43,7 @@ public SubscriptionGroupInvoiceAccountController(GlobalConfiguration globalConfi * endpoint requires a `amount`, `details`, `method`, and `memo`. On success, the prepayment * will be added to the group's prepayment balance. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionGroupPrepaymentResponse 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. @@ -60,7 +59,7 @@ public SubscriptionGroupPrepaymentResponse createSubscriptionGroupPrepayment( */ private ApiCall prepareCreateSubscriptionGroupPrepaymentRequest( final String uid, - final SubscriptionGroupPrepaymentRequest body) throws JsonProcessingException, IOException { + final SubscriptionGroupPrepaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -104,7 +103,7 @@ public ListSubscriptionGroupPrepaymentResponse listPrepaymentsForSubscriptionGro * Builds the ApiCall object for listPrepaymentsForSubscriptionGroup. */ private ApiCall prepareListPrepaymentsForSubscriptionGroupRequest( - final ListPrepaymentsForSubscriptionGroupInput input) throws IOException { + final ListPrepaymentsForSubscriptionGroupInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -139,7 +138,7 @@ private ApiCall prepareLi * added to the group in the amount specified in the request body. The credit will be applied to * group member invoices as they are generated. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ServiceCreditResponse 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. @@ -155,7 +154,7 @@ public ServiceCreditResponse issueSubscriptionGroupServiceCredit( */ private ApiCall prepareIssueSubscriptionGroupServiceCreditRequest( final String uid, - final IssueServiceCreditRequest body) throws JsonProcessingException, IOException { + final IssueServiceCreditRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -187,7 +186,7 @@ private ApiCall prepareIssueSubscriptionGro * Credit can be deducted for a subscription group identified by the group's `uid`. Credit will * be deducted from the group in the amount specified in the request body. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ServiceCredit 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. @@ -203,7 +202,7 @@ public ServiceCredit deductSubscriptionGroupServiceCredit( */ private ApiCall prepareDeductSubscriptionGroupServiceCreditRequest( final String uid, - final DeductServiceCreditRequest body) throws JsonProcessingException, IOException { + final DeductServiceCreditRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java index 530f8d3c..374bd97f 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupStatusController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -42,7 +41,7 @@ public SubscriptionGroupStatusController(GlobalConfiguration globalConfig) { * for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` * parameter must be included in the request. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @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. */ @@ -57,7 +56,7 @@ public void cancelSubscriptionsInGroup( */ private ApiCall prepareCancelSubscriptionsInGroupRequest( final String uid, - final CancelGroupedSubscriptionsRequest body) throws JsonProcessingException, IOException { + final CancelGroupedSubscriptionsRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -100,7 +99,7 @@ public void initiateDelayedCancellationForGroup( * Builds the ApiCall object for initiateDelayedCancellationForGroup. */ private ApiCall prepareInitiateDelayedCancellationForGroupRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -138,7 +137,7 @@ public void cancelDelayedCancellationForGroup( * Builds the ApiCall object for cancelDelayedCancellationForGroup. */ private ApiCall prepareCancelDelayedCancellationForGroupRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -185,7 +184,7 @@ private ApiCall prepareCancelDelayedCancellationForGroupRequ * partial one, spanning from the date of reactivation to the next corresponding calendar * renewal date. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ReactivateSubscriptionGroupResponse 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. @@ -201,7 +200,7 @@ public ReactivateSubscriptionGroupResponse reactivateSubscriptionGroup( */ private ApiCall prepareReactivateSubscriptionGroupRequest( final String uid, - final ReactivateSubscriptionGroupRequest body) throws JsonProcessingException, IOException { + final ReactivateSubscriptionGroupRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java index f3847bf8..309128ce 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionGroupsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -56,7 +55,7 @@ public SubscriptionGroupsController(GlobalConfiguration globalConfig) { * profile attached to the group. Only one of the `subscriptions` can have `"primary": true` * attribute set. When passing product to a subscription you can use either `product_id` or * `product_handle` or `offer_id`. You can also use `custom_price` instead. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionGroupSignupResponse 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. @@ -70,7 +69,7 @@ public SubscriptionGroupSignupResponse signupWithSubscriptionGroup( * Builds the ApiCall object for signupWithSubscriptionGroup. */ private ApiCall prepareSignupWithSubscriptionGroupRequest( - final SubscriptionGroupSignupRequest body) throws JsonProcessingException, IOException { + final SubscriptionGroupSignupRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -98,7 +97,7 @@ private ApiCall prepareSignupWith /** * Creates a subscription group with given members. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionGroupResponse 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. @@ -112,7 +111,7 @@ public SubscriptionGroupResponse createSubscriptionGroup( * Builds the ApiCall object for createSubscriptionGroup. */ private ApiCall prepareCreateSubscriptionGroupRequest( - final CreateSubscriptionGroupRequest body) throws JsonProcessingException, IOException { + final CreateSubscriptionGroupRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -158,7 +157,7 @@ public ListSubscriptionGroupsResponse listSubscriptionGroups( * Builds the ApiCall object for listSubscriptionGroups. */ private ApiCall prepareListSubscriptionGroupsRequest( - final ListSubscriptionGroupsInput input) throws IOException { + final ListSubscriptionGroupsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -206,7 +205,7 @@ public FullSubscriptionGroupResponse readSubscriptionGroup( */ private ApiCall prepareReadSubscriptionGroupRequest( final String uid, - final List include) throws IOException { + final List include) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -235,7 +234,7 @@ private ApiCall prepareReadSubscrip * in the groups. Not including them will result in removing them from subscription group. To * clean up members, just leave the array empty. * @param uid Required parameter: The uid of the subscription group - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionGroupResponse 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. @@ -251,7 +250,7 @@ public SubscriptionGroupResponse updateSubscriptionGroupMembers( */ private ApiCall prepareUpdateSubscriptionGroupMembersRequest( final String uid, - final UpdateSubscriptionGroupRequest body) throws JsonProcessingException, IOException { + final UpdateSubscriptionGroupRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -295,7 +294,7 @@ public DeleteSubscriptionGroupResponse deleteSubscriptionGroup( * Builds the ApiCall object for deleteSubscriptionGroup. */ private ApiCall prepareDeleteSubscriptionGroupRequest( - final String uid) throws IOException { + final String uid) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -337,7 +336,7 @@ public FullSubscriptionGroupResponse findSubscriptionGroup( * Builds the ApiCall object for findSubscriptionGroup. */ private ApiCall prepareFindSubscriptionGroupRequest( - final String subscriptionId) throws IOException { + final String subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -385,7 +384,7 @@ private ApiCall prepareFindSubscrip * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionGroupResponse 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. @@ -401,7 +400,7 @@ public SubscriptionGroupResponse addSubscriptionToGroup( */ private ApiCall prepareAddSubscriptionToGroupRequest( final int subscriptionId, - final AddSubscriptionToAGroup body) throws JsonProcessingException, IOException { + final AddSubscriptionToAGroup body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -445,7 +444,7 @@ public void removeSubscriptionFromGroup( * Builds the ApiCall object for removeSubscriptionFromGroup. */ private ApiCall prepareRemoveSubscriptionFromGroupRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java index ea3b8ab5..043a44a8 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionInvoiceAccountController.java @@ -6,10 +6,10 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; 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.exceptions.RefundPrepaymentBaseErrorsResponseException; import com.maxio.advancedbilling.http.request.HttpMethod; import com.maxio.advancedbilling.models.AccountBalances; @@ -18,10 +18,12 @@ import com.maxio.advancedbilling.models.DeductServiceCreditRequest; import com.maxio.advancedbilling.models.IssueServiceCreditRequest; import com.maxio.advancedbilling.models.ListPrepaymentsInput; +import com.maxio.advancedbilling.models.ListServiceCreditsResponse; import com.maxio.advancedbilling.models.PrepaymentResponse; import com.maxio.advancedbilling.models.PrepaymentsResponse; import com.maxio.advancedbilling.models.RefundPrepaymentRequest; import com.maxio.advancedbilling.models.ServiceCredit; +import com.maxio.advancedbilling.models.SortingDirection; import io.apimatic.core.ApiCall; import io.apimatic.core.ErrorCase; import io.apimatic.core.GlobalConfiguration; @@ -58,7 +60,7 @@ public AccountBalances readAccountBalances( * Builds the ApiCall object for readAccountBalances. */ private ApiCall prepareReadAccountBalancesRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -86,7 +88,7 @@ private ApiCall prepareReadAccountBalancesRequest * applied to the prepayment account balance. This is especially useful for manual replenishment * of prepaid subscriptions. Please note that you **can't** pass `amount_in_cents`. * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the CreatePrepaymentResponse 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. @@ -102,7 +104,7 @@ public CreatePrepaymentResponse createPrepayment( */ private ApiCall prepareCreatePrepaymentRequest( final int subscriptionId, - final CreatePrepaymentRequest body) throws JsonProcessingException, IOException { + final CreatePrepaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -146,7 +148,7 @@ public PrepaymentsResponse listPrepayments( * Builds the ApiCall object for listPrepayments. */ private ApiCall prepareListPrepaymentsRequest( - final ListPrepaymentsInput input) throws IOException { + final ListPrepaymentsInput input) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -180,7 +182,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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ServiceCredit 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. @@ -196,7 +198,7 @@ public ServiceCredit issueServiceCredit( */ private ApiCall prepareIssueServiceCreditRequest( final int subscriptionId, - final IssueServiceCreditRequest body) throws JsonProcessingException, IOException { + final IssueServiceCreditRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -228,7 +230,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 body Optional parameter: Example: + * @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. */ @@ -243,7 +245,7 @@ public void deductServiceCredit( */ private ApiCall prepareDeductServiceCreditRequest( final int subscriptionId, - final DeductServiceCreditRequest body) throws JsonProcessingException, IOException { + final DeductServiceCreditRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -268,6 +270,72 @@ private ApiCall prepareDeductServiceCreditRequest( .build(); } + /** + * This request will list a subscription's service credits. + * @param subscriptionId Required parameter: The Chargify id of the subscription + * @param page Optional parameter: Result records are organized in pages. By default, the + * first page of results is displayed. The page parameter specifies a page number of + * results to fetch. You can start navigating through the pages to consume the results. + * You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 + * to the query string. If there are no results to return, then an empty result set will + * be returned. Use in query `page=1`. + * @param perPage Optional parameter: This parameter indicates how many records to fetch in + * each request. Default value is 20. The maximum allowed values is 200; any per_page + * value over 200 will be changed to 200. Use in query `per_page=200`. + * @param direction Optional parameter: Controls the order in which results are returned. Use + * in query `direction=asc`. + * @return Returns the ListServiceCreditsResponse 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 ListServiceCreditsResponse listServiceCredits( + final int subscriptionId, + final Integer page, + final Integer perPage, + final SortingDirection direction) throws ApiException, IOException { + return prepareListServiceCreditsRequest(subscriptionId, page, perPage, direction).execute(); + } + + /** + * Builds the ApiCall object for listServiceCredits. + */ + private ApiCall prepareListServiceCreditsRequest( + final int subscriptionId, + final Integer page, + final Integer perPage, + final SortingDirection direction) { + return new ApiCall.Builder() + .globalConfig(getGlobalConfiguration()) + .requestBuilder(requestBuilder -> requestBuilder + .server(Server.PRODUCTION.value()) + .path("/subscriptions/{subscription_id}/service_credits/list.json") + .queryParam(param -> param.key("page") + .value((page != null) ? page : 1).isRequired(false)) + .queryParam(param -> param.key("per_page") + .value((perPage != null) ? perPage : 20).isRequired(false)) + .queryParam(param -> param.key("direction") + .value((direction != null) ? direction.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, ListServiceCreditsResponse.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 refund, completely or partially, a particular prepayment applied to a * subscription. The `prepayment_id` will be the account transaction ID of the original payment. @@ -275,7 +343,7 @@ private ApiCall prepareDeductServiceCreditRequest( * 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 prepaymentId Required parameter: id of prepayment - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the PrepaymentResponse 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. @@ -293,7 +361,7 @@ public PrepaymentResponse refundPrepayment( private ApiCall prepareRefundPrepaymentRequest( final int subscriptionId, final long prepaymentId, - final RefundPrepaymentRequest body) throws JsonProcessingException, IOException { + final RefundPrepaymentRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java index 4398daaa..9d555a0e 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionNotesController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -42,7 +41,7 @@ public SubscriptionNotesController(GlobalConfiguration globalConfig) { * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -58,7 +57,7 @@ public SubscriptionNoteResponse createSubscriptionNote( */ private ApiCall prepareCreateSubscriptionNoteRequest( final int subscriptionId, - final UpdateSubscriptionNoteRequest body) throws JsonProcessingException, IOException { + final UpdateSubscriptionNoteRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -103,7 +102,7 @@ public List listSubscriptionNotes( * Builds the ApiCall object for listSubscriptionNotes. */ private ApiCall, ApiException> prepareListSubscriptionNotesRequest( - final ListSubscriptionNotesInput input) throws IOException { + final ListSubscriptionNotesInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -152,7 +151,7 @@ public SubscriptionNoteResponse readSubscriptionNote( */ private ApiCall prepareReadSubscriptionNoteRequest( final int subscriptionId, - final int noteId) throws IOException { + final int noteId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -179,7 +178,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 noteId Required parameter: The Advanced Billing id of the note - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionNoteResponse response from the API call * @throws ApiException Represents error response from the server. * @throws IOException Signals that an I/O exception of some sort has occurred. @@ -197,7 +196,7 @@ public SubscriptionNoteResponse updateSubscriptionNote( private ApiCall prepareUpdateSubscriptionNoteRequest( final int subscriptionId, final int noteId, - final UpdateSubscriptionNoteRequest body) throws JsonProcessingException, IOException { + final UpdateSubscriptionNoteRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -245,7 +244,7 @@ public void deleteSubscriptionNote( */ private ApiCall prepareDeleteSubscriptionNoteRequest( final int subscriptionId, - final int noteId) throws IOException { + final int noteId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java index d587134e..26fd45c9 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionProductsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -91,7 +90,7 @@ public SubscriptionProductsController(GlobalConfiguration globalConfig) { * 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 body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -107,7 +106,7 @@ public SubscriptionResponse migrateSubscriptionProduct( */ private ApiCall prepareMigrateSubscriptionProductRequest( final int subscriptionId, - final SubscriptionProductMigrationRequest body) throws JsonProcessingException, IOException { + final SubscriptionProductMigrationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -142,7 +141,7 @@ private ApiCall prepareMigrateSubscriptionPr * 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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionMigrationPreviewResponse 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. @@ -158,7 +157,7 @@ public SubscriptionMigrationPreviewResponse previewSubscriptionProductMigration( */ private ApiCall preparePreviewSubscriptionProductMigrationRequest( final int subscriptionId, - final SubscriptionMigrationPreviewRequest body) throws JsonProcessingException, IOException { + final SubscriptionMigrationPreviewRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java index 2837e665..59a17069 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionStatusController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -58,7 +57,7 @@ public SubscriptionResponse retrySubscription( * Builds the ApiCall object for retrySubscription. */ private ApiCall prepareRetrySubscriptionRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -86,7 +85,7 @@ 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 - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -102,7 +101,7 @@ public SubscriptionResponse cancelSubscription( */ private ApiCall prepareCancelSubscriptionRequest( final int subscriptionId, - final CancellationRequest body) throws JsonProcessingException, IOException { + final CancellationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -156,7 +155,7 @@ public SubscriptionResponse resumeSubscription( */ private ApiCall prepareResumeSubscriptionRequest( final int subscriptionId, - final ResumptionCharge calendarBillingResumptionCharge) throws IOException { + final ResumptionCharge calendarBillingResumptionCharge) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -186,7 +185,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` date is within 24 hours. * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -202,7 +201,7 @@ public SubscriptionResponse pauseSubscription( */ private ApiCall preparePauseSubscriptionRequest( final int subscriptionId, - final PauseRequest body) throws JsonProcessingException, IOException { + final PauseRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -237,7 +236,7 @@ private ApiCall preparePauseSubscriptionRequ * 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 body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -253,7 +252,7 @@ public SubscriptionResponse updateAutomaticSubscriptionResumption( */ private ApiCall prepareUpdateAutomaticSubscriptionResumptionRequest( final int subscriptionId, - final PauseRequest body) throws JsonProcessingException, IOException { + final PauseRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -353,7 +352,7 @@ private ApiCall prepareUpdateAutomaticSubscr * 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 body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -369,7 +368,7 @@ public SubscriptionResponse reactivateSubscription( */ private ApiCall prepareReactivateSubscriptionRequest( final int subscriptionId, - final ReactivateSubscriptionRequest body) throws JsonProcessingException, IOException { + final ReactivateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -404,7 +403,7 @@ private ApiCall prepareReactivateSubscriptio * that 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 body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -420,7 +419,7 @@ public DelayedCancellationResponse initiateDelayedCancellation( */ private ApiCall prepareInitiateDelayedCancellationRequest( final int subscriptionId, - final CancellationRequest body) throws JsonProcessingException, IOException { + final CancellationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -470,7 +469,7 @@ public DelayedCancellationResponse cancelDelayedCancellation( * Builds the ApiCall object for cancelDelayedCancellation. */ private ApiCall prepareCancelDelayedCancellationRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -511,7 +510,7 @@ public SubscriptionResponse cancelDunning( * Builds the ApiCall object for cancelDunning. */ private ApiCall prepareCancelDunningRequest( - final int subscriptionId) throws IOException { + final int subscriptionId) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -558,7 +557,7 @@ private ApiCall prepareCancelDunningRequest( * 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 - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the RenewalPreviewResponse 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. @@ -574,7 +573,7 @@ public RenewalPreviewResponse previewRenewal( */ private ApiCall preparePreviewRenewalRequest( final int subscriptionId, - final RenewalPreviewRequest body) throws JsonProcessingException, IOException { + final RenewalPreviewRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java index e148fdae..3e8958c6 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/SubscriptionsController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.DateTimeHelper; import com.maxio.advancedbilling.Server; @@ -150,35 +149,27 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * "last_name": "Smith", "email": "j.smith{@literal @}example.com" }, "credit_card_attributes": { * first_name: "Joe, last_name: "Smith", card_type: "visa", expiration_month: "05", * expiration_year: "2025", last_four: "1234", vault_token: "12345abc", current_vault: - * "braintree_blue" } } ``` ## Subscription with Credit Card ```json "subscription": { - * "product_handle": "basic", "customer_attributes": { "first_name": "Joe", "last_name": "Blow", - * "email": "joe{@literal @}example.com", "zip": "02120", "state": "MA", "reference": "XYZ", "phone": - * "(617) 111 - 0000", "organization": "Acme", "country": "US", "city": "Boston", "address_2": - * null, "address": "123 Mass Ave." }, "credit_card_attributes": { "last_name": "Smith", - * "first_name": "Joe", "full_number": "4111111111111111", "expiration_year": "2021", - * "expiration_month": "1", "card_type": "visa", "billing_zip": "02120", "billing_state": "MA", - * "billing_country": "US", "billing_city": "Boston", "billing_address_2": null, - * "billing_address": "123 Mass Ave." } } ``` ## Subscription with ACH as Payment Profile - * ```json { "subscription": { "product_handle": "gold-product", "customer_attributes": { - * "first_name": "Joe", "last_name": "Blow", "email": "joe{@literal @}example.com", "zip": "02120", - * "state": "MA", "reference": "XYZ", "phone": "(617) 111 - 0000", "organization": "Acme", - * "country": "US", "city": "Boston", "address_2": null, "address": "123 Mass Ave." }, - * "bank_account_attributes": { "bank_name": "Best Bank", "bank_routing_number": "021000089", - * "bank_account_number": "111111111111", "bank_account_type": "checking", - * "bank_account_holder_type": "business", "payment_type": "bank_account" } } } ``` ## - * Subscription with PayPal payment profile ### With the nonce from Braintree JS ```json { - * "subscription": { "product_handle":"test-product-b", "customer_attributes": { - * "first_name":"Amelia", "last_name":"Johnson", "email":"amelia{@literal @}example.com", - * "organization":"My Awesome Company" }, "payment_profile_attributes":{ "paypal_email": - * "amelia{@literal @}example.com", "current_vault": "braintree_blue", "payment_method_nonce":"abc123", - * "payment_type":"paypal_account" } } ``` ### With the Braintree Customer ID as the vault - * token: ```json { "subscription": { "product_handle":"test-product-b", "customer_attributes": - * { "first_name":"Amelia", "last_name":"Johnson", "email":"amelia{@literal @}example.com", - * "organization":"My Awesome Company" }, "payment_profile_attributes":{ "paypal_email": - * "amelia{@literal @}example.com", "current_vault": "braintree_blue", "vault_token":"58271347", - * "payment_type":"paypal_account" } } ``` ## Subscription using GoCardless Bank Number These - * examples creates a customer, bank account and mandate in GoCardless. For more information on - * GoCardless, please view the following two resources: + [Payment Profiles via API for + * "braintree_blue" } } ``` ## Subscription with ACH as Payment Profile ```json { + * "subscription": { "product_handle": "gold-product", "customer_attributes": { "first_name": + * "Joe", "last_name": "Blow", "email": "joe{@literal @}example.com", "zip": "02120", "state": "MA", + * "reference": "XYZ", "phone": "(617) 111 - 0000", "organization": "Acme", "country": "US", + * "city": "Boston", "address_2": null, "address": "123 Mass Ave." }, "bank_account_attributes": + * { "bank_name": "Best Bank", "bank_routing_number": "021000089", "bank_account_number": + * "111111111111", "bank_account_type": "checking", "bank_account_holder_type": "business", + * "payment_type": "bank_account" } } } ``` ## Subscription with PayPal payment profile ### With + * the nonce from Braintree JS ```json { "subscription": { "product_handle":"test-product-b", + * "customer_attributes": { "first_name":"Amelia", "last_name":"Johnson", + * "email":"amelia{@literal @}example.com", "organization":"My Awesome Company" }, + * "payment_profile_attributes":{ "paypal_email": "amelia{@literal @}example.com", "current_vault": + * "braintree_blue", "payment_method_nonce":"abc123", "payment_type":"paypal_account" } } ``` + * ### With the Braintree Customer ID as the vault token: ```json { "subscription": { + * "product_handle":"test-product-b", "customer_attributes": { "first_name":"Amelia", + * "last_name":"Johnson", "email":"amelia{@literal @}example.com", "organization":"My Awesome Company" }, + * "payment_profile_attributes":{ "paypal_email": "amelia{@literal @}example.com", "current_vault": + * "braintree_blue", "vault_token":"58271347", "payment_type":"paypal_account" } } ``` ## + * Subscription using GoCardless Bank Number These examples creates a customer, bank account and + * mandate in GoCardless. For more information on GoCardless, please view the following two + * resources: + [Payment Profiles via API for * GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless) * + [Full documentation on * GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) + [Using @@ -431,7 +422,7 @@ public SubscriptionsController(GlobalConfiguration globalConfig) { * "bank_account" }, "ach_agreement": { "agreement_terms": "ACH agreement terms", * "authorizer_first_name": "Jane", "authorizer_last_name": "Doe", "ip_address": "1.2.3.4" } } * ```. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -445,7 +436,7 @@ public SubscriptionResponse createSubscription( * Builds the ApiCall object for createSubscription. */ private ApiCall prepareCreateSubscriptionRequest( - final CreateSubscriptionRequest body) throws JsonProcessingException, IOException { + final CreateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -492,7 +483,7 @@ public List listSubscriptions( * Builds the ApiCall object for listSubscriptions. */ private ApiCall, ApiException> prepareListSubscriptionsRequest( - final ListSubscriptionsInput input) throws IOException { + final ListSubscriptionsInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -510,6 +501,8 @@ private ApiCall, ApiException> prepareListSubscriptio .value(input.getProductPricePointId()).isRequired(false)) .queryParam(param -> param.key("coupon") .value(input.getCoupon()).isRequired(false)) + .queryParam(param -> param.key("coupon_code") + .value(input.getCouponCode()).isRequired(false)) .queryParam(param -> param.key("date_field") .value((input.getDateField() != null) ? input.getDateField().value() : null).isRequired(false)) .queryParam(param -> param.key("start_date") @@ -584,7 +577,7 @@ private ApiCall, ApiException> prepareListSubscriptio * `null.` Another way of looking at this is that you willl have to wait for the next billing * cycle to arrive before the `snap_date` will reset to `null`. * @param subscriptionId Required parameter: The Chargify id of the subscription - * @param body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -600,7 +593,7 @@ public SubscriptionResponse updateSubscription( */ private ApiCall prepareUpdateSubscriptionRequest( final int subscriptionId, - final UpdateSubscriptionRequest body) throws JsonProcessingException, IOException { + final UpdateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -650,7 +643,7 @@ public SubscriptionResponse readSubscription( */ private ApiCall prepareReadSubscriptionRequest( final int subscriptionId, - final List include) throws IOException { + final List include) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -712,7 +705,7 @@ public void overrideSubscription( */ private ApiCall prepareOverrideSubscriptionRequest( final int subscriptionId, - final OverrideSubscriptionRequest body) throws JsonProcessingException, IOException { + final OverrideSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -753,7 +746,7 @@ public SubscriptionResponse findSubscription( * Builds the ApiCall object for findSubscription. */ private ApiCall prepareFindSubscriptionRequest( - final String reference) throws IOException { + final String reference) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -806,7 +799,7 @@ public SubscriptionResponse purgeSubscription( private ApiCall preparePurgeSubscriptionRequest( final int subscriptionId, final int ack, - final List cascade) throws IOException { + final List cascade) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -837,7 +830,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 body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the PrepaidConfigurationResponse 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. @@ -853,7 +846,7 @@ public PrepaidConfigurationResponse updatePrepaidSubscriptionConfiguration( */ private ApiCall prepareUpdatePrepaidSubscriptionConfigurationRequest( final int subscriptionId, - final UpsertPrepaidConfigurationRequest body) throws JsonProcessingException, IOException { + final UpsertPrepaidConfigurationRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -884,15 +877,15 @@ private ApiCall prepareUpdatePrepaid /** * The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for * a subscription creation. The "Next Billing" amount and "Next Billing" date are represented in - * each Subscriber's Summary. For more information, please see our documentation + * each Subscriber's Summary. A subscription will not be created by utilizing this endpoint; it + * is meant to serve as a prediction. For more information, please see our documentation * [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). - * ## Side effects A subscription will not be created by sending a POST to this endpoint. It is - * meant to serve as a prediction. ## Taxable Subscriptions This endpoint will preview taxes - * applicable to a purchase. In order for taxes to be previewed, the following conditions must - * be met: + Taxes must be configured on the subscription + The preview must be for the purchase - * of a taxable product or component, or combination of the two. + The subscription payload must - * contain a full billing or shipping address in order to calculate tax For more information - * about creating taxable previews, please see our documentation guide on how to create [taxable + * ## Taxable Subscriptions This endpoint will preview taxes applicable to a purchase. In order + * for taxes to be previewed, the following conditions must be met: + Taxes must be configured + * on the subscription + The preview must be for the purchase of a taxable product or component, + * or combination of the two. + The subscription payload must contain a full billing or shipping + * address in order to calculate tax For more information about creating taxable previews, + * please see our documentation guide on how to create [taxable * subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes) You do * **not** need to include a card number to generate tax information when you are previewing a * subscription. However, please note that when you actually want to create the subscription, @@ -904,7 +897,7 @@ private ApiCall prepareUpdatePrepaid * `skip_billing_manifest_taxes: true` attribute. ## Non-taxable Subscriptions If you'd like to * calculate subscriptions that do not include tax, please feel free to leave off the billing * information. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the SubscriptionPreviewResponse 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. @@ -918,7 +911,7 @@ public SubscriptionPreviewResponse previewSubscription( * Builds the ApiCall object for previewSubscription. */ private ApiCall preparePreviewSubscriptionRequest( - final CreateSubscriptionRequest body) throws JsonProcessingException, IOException { + final CreateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -955,7 +948,7 @@ private ApiCall preparePreviewSubscri * @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: Example: + * @param body Optional parameter: * @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. @@ -973,7 +966,7 @@ public SubscriptionResponse applyCouponsToSubscription( private ApiCall prepareApplyCouponsToSubscriptionRequest( final int subscriptionId, final String code, - final AddCouponsRequest body) throws JsonProcessingException, IOException { + final AddCouponsRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -1024,7 +1017,7 @@ public String removeCouponFromSubscription( */ private ApiCall prepareRemoveCouponFromSubscriptionRequest( final int subscriptionId, - final String couponCode) throws IOException { + final String couponCode) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -1077,7 +1070,7 @@ private ApiCall prepareRemoveCouponFromSubscriptionRequest * 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 body Optional parameter: Example: + * @param body Optional parameter: * @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. @@ -1093,7 +1086,7 @@ public SubscriptionResponse activateSubscription( */ private ApiCall prepareActivateSubscriptionRequest( final int subscriptionId, - final ActivateSubscriptionRequest body) throws JsonProcessingException, IOException { + final ActivateSubscriptionRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java index 1b0f4992..3d58eed5 100644 --- a/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java +++ b/src/main/java/com/maxio/advancedbilling/controllers/WebhooksController.java @@ -6,7 +6,6 @@ package com.maxio.advancedbilling.controllers; -import com.fasterxml.jackson.core.JsonProcessingException; import com.maxio.advancedbilling.ApiHelper; import com.maxio.advancedbilling.Server; import com.maxio.advancedbilling.exceptions.ApiException; @@ -72,7 +71,7 @@ public List listWebhooks( * Builds the ApiCall object for listWebhooks. */ private ApiCall, ApiException> prepareListWebhooksRequest( - final ListWebhooksInput input) throws IOException { + final ListWebhooksInput input) { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -108,7 +107,7 @@ private ApiCall, ApiException> prepareListWebhooksRequest( /** * This method allows you to enable webhooks via API for your site. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the EnableWebhooksResponse 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. @@ -122,7 +121,7 @@ public EnableWebhooksResponse enableWebhooks( * Builds the ApiCall object for enableWebhooks. */ private ApiCall prepareEnableWebhooksRequest( - final EnableWebhooksRequest body) throws JsonProcessingException, IOException { + final EnableWebhooksRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -149,7 +148,7 @@ private ApiCall prepareEnableWebhooksReque * Posting to the replay endpoint does not immediately resend the webhooks. They are added to a * queue and will be sent as soon as possible, depending on available system resources. You may * submit an array of up to 1000 webhook IDs to replay in the request. - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the ReplayWebhooksResponse 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. @@ -163,7 +162,7 @@ public ReplayWebhooksResponse replayWebhooks( * Builds the ApiCall object for replayWebhooks. */ private ApiCall prepareReplayWebhooksRequest( - final ReplayWebhooksRequest body) throws JsonProcessingException, IOException { + final ReplayWebhooksRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -190,7 +189,7 @@ private ApiCall prepareReplayWebhooksReque * The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions * (events) to it. You can check available events here. [Event * keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the EndpointResponse 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. @@ -204,7 +203,7 @@ public EndpointResponse createEndpoint( * Builds the ApiCall object for createEndpoint. */ private ApiCall prepareCreateEndpointRequest( - final CreateOrUpdateEndpointRequest body) throws JsonProcessingException, IOException { + final CreateOrUpdateEndpointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -243,7 +242,7 @@ public List listEndpoints() throws ApiException, IOException { /** * Builds the ApiCall object for listEndpoints. */ - private ApiCall, ApiException> prepareListEndpointsRequest() throws IOException { + private ApiCall, ApiException> prepareListEndpointsRequest() { return new ApiCall.Builder, ApiException>() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder @@ -274,7 +273,7 @@ private ApiCall, ApiException> prepareListEndpointsRequest() thro * `webhook_subscriptions` without the specific event key. * @param endpointId Required parameter: The Advanced Billing id for the endpoint that should * be updated - * @param body Optional parameter: Example: + * @param body Optional parameter: * @return Returns the EndpointResponse 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. @@ -290,7 +289,7 @@ public EndpointResponse updateEndpoint( */ private ApiCall prepareUpdateEndpointRequest( final int endpointId, - final CreateOrUpdateEndpointRequest body) throws JsonProcessingException, IOException { + final CreateOrUpdateEndpointRequest body) { return new ApiCall.Builder() .globalConfig(getGlobalConfiguration()) .requestBuilder(requestBuilder -> requestBuilder diff --git a/src/main/java/com/maxio/advancedbilling/models/ApplePayPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/ApplePayPaymentProfile.java index f7bbf668..d6b8aae9 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ApplePayPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/ApplePayPaymentProfile.java @@ -11,9 +11,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; 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 ApplePayPaymentProfile type. @@ -36,6 +39,8 @@ public class ApplePayPaymentProfile private PaymentType paymentType; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Default constructor. @@ -62,6 +67,8 @@ public ApplePayPaymentProfile() { * @param billingAddress2 String value for billingAddress2. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ public ApplePayPaymentProfile( PaymentType paymentType, @@ -79,7 +86,9 @@ public ApplePayPaymentProfile( String customerVaultToken, String billingAddress2, Integer siteGatewaySettingId, - String gatewayHandle) { + String gatewayHandle, + ZonedDateTime createdAt, + ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -96,6 +105,8 @@ public ApplePayPaymentProfile( this.paymentType = paymentType; this.siteGatewaySettingId = OptionalNullable.of(siteGatewaySettingId); this.gatewayHandle = OptionalNullable.of(gatewayHandle); + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -116,6 +127,8 @@ public ApplePayPaymentProfile( * @param billingAddress2 String value for billingAddress2. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ protected ApplePayPaymentProfile(PaymentType paymentType, Integer id, String firstName, @@ -124,8 +137,8 @@ protected ApplePayPaymentProfile(PaymentType paymentType, Integer id, String fir OptionalNullable billingState, OptionalNullable billingZip, OptionalNullable billingCountry, OptionalNullable customerVaultToken, OptionalNullable billingAddress2, - OptionalNullable siteGatewaySettingId, - OptionalNullable gatewayHandle) { + OptionalNullable siteGatewaySettingId, OptionalNullable gatewayHandle, + ZonedDateTime createdAt, ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -142,6 +155,8 @@ protected ApplePayPaymentProfile(PaymentType paymentType, Integer id, String fir this.paymentType = paymentType; this.siteGatewaySettingId = siteGatewaySettingId; this.gatewayHandle = gatewayHandle; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -154,7 +169,7 @@ protected ApplePayPaymentProfile( this(paymentType, null, null, null, null, null, null, OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), - OptionalNullable.of(null), OptionalNullable.of(null)); + OptionalNullable.of(null), OptionalNullable.of(null), null, null); unsetBillingAddress(); unsetBillingCity(); unsetBillingState(); @@ -649,6 +664,52 @@ public void unsetGatewayHandle() { gatewayHandle = null; } + /** + * Getter for CreatedAt. + * A timestamp indicating when this payment profile was created + * @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. + * A timestamp indicating when this payment profile was created + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for UpdatedAt. + * A timestamp indicating when this payment profile was last updated + * @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. + * A timestamp indicating when this payment profile was last updated + * @param updatedAt Value for ZonedDateTime + */ + @JsonSetter("updated_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setUpdatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + } + /** * Converts this ApplePayPaymentProfile into string format. * @return String representation of this class @@ -663,7 +724,8 @@ public String toString() { + ", billingCountry=" + billingCountry + ", customerVaultToken=" + customerVaultToken + ", billingAddress2=" + billingAddress2 + ", siteGatewaySettingId=" + siteGatewaySettingId + ", gatewayHandle=" - + gatewayHandle + ", additionalProperties=" + getAdditionalProperties() + "]"; + + gatewayHandle + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -678,7 +740,9 @@ public Builder toBuilder() { .lastName(getLastName()) .customerId(getCustomerId()) .currentVault(getCurrentVault()) - .vaultToken(getVaultToken()); + .vaultToken(getVaultToken()) + .createdAt(getCreatedAt()) + .updatedAt(getUpdatedAt()); builder.billingAddress = internalGetBillingAddress(); builder.billingCity = internalGetBillingCity(); builder.billingState = internalGetBillingState(); @@ -711,6 +775,8 @@ public static class Builder { private OptionalNullable billingAddress2; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Initialization constructor. @@ -967,6 +1033,26 @@ public Builder unsetGatewayHandle() { 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; + } + /** * Builds a new {@link ApplePayPaymentProfile} object using the set fields. * @return {@link ApplePayPaymentProfile} @@ -975,7 +1061,7 @@ public ApplePayPaymentProfile build() { return new ApplePayPaymentProfile(paymentType, id, firstName, lastName, customerId, currentVault, vaultToken, billingAddress, billingCity, billingState, billingZip, billingCountry, customerVaultToken, billingAddress2, siteGatewaySettingId, - gatewayHandle); + gatewayHandle, createdAt, updatedAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java index 720799c5..358346ba 100644 --- a/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/BankAccountPaymentProfile.java @@ -11,9 +11,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; 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 BankAccountPaymentProfile type. @@ -42,6 +45,8 @@ public class BankAccountPaymentProfile private Boolean verified; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Default constructor. @@ -75,6 +80,8 @@ public BankAccountPaymentProfile() { * @param verified Boolean value for verified. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ public BankAccountPaymentProfile( String maskedBankAccountNumber, @@ -98,7 +105,9 @@ public BankAccountPaymentProfile( BankAccountHolderType bankAccountHolderType, Boolean verified, Integer siteGatewaySettingId, - String gatewayHandle) { + String gatewayHandle, + ZonedDateTime createdAt, + ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -121,6 +130,8 @@ public BankAccountPaymentProfile( this.verified = verified; this.siteGatewaySettingId = OptionalNullable.of(siteGatewaySettingId); this.gatewayHandle = OptionalNullable.of(gatewayHandle); + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -147,6 +158,8 @@ public BankAccountPaymentProfile( * @param verified Boolean value for verified. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ protected BankAccountPaymentProfile(String maskedBankAccountNumber, PaymentType paymentType, @@ -158,8 +171,8 @@ protected BankAccountPaymentProfile(String maskedBankAccountNumber, PaymentType OptionalNullable billingAddress2, String bankName, String maskedBankRoutingNumber, BankAccountType bankAccountType, BankAccountHolderType bankAccountHolderType, Boolean verified, - OptionalNullable siteGatewaySettingId, - OptionalNullable gatewayHandle) { + OptionalNullable siteGatewaySettingId, OptionalNullable gatewayHandle, + ZonedDateTime createdAt, ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -182,6 +195,8 @@ protected BankAccountPaymentProfile(String maskedBankAccountNumber, PaymentType this.verified = verified; this.siteGatewaySettingId = siteGatewaySettingId; this.gatewayHandle = gatewayHandle; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -197,7 +212,7 @@ protected BankAccountPaymentProfile( OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), null, null, null, null, null, OptionalNullable.of(null), - OptionalNullable.of(null)); + OptionalNullable.of(null), null, null); unsetBillingAddress(); unsetBillingCity(); unsetBillingState(); @@ -837,6 +852,52 @@ public void unsetGatewayHandle() { gatewayHandle = null; } + /** + * Getter for CreatedAt. + * A timestamp indicating when this payment profile was created + * @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. + * A timestamp indicating when this payment profile was created + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for UpdatedAt. + * A timestamp indicating when this payment profile was last updated + * @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. + * A timestamp indicating when this payment profile was last updated + * @param updatedAt Value for ZonedDateTime + */ + @JsonSetter("updated_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setUpdatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + } + /** * Converts this BankAccountPaymentProfile into string format. * @return String representation of this class @@ -854,7 +915,8 @@ public String toString() { + maskedBankRoutingNumber + ", bankAccountType=" + bankAccountType + ", bankAccountHolderType=" + bankAccountHolderType + ", verified=" + verified + ", siteGatewaySettingId=" + siteGatewaySettingId + ", gatewayHandle=" - + gatewayHandle + ", additionalProperties=" + getAdditionalProperties() + "]"; + + gatewayHandle + ", createdAt=" + createdAt + ", updatedAt=" + updatedAt + + ", additionalProperties=" + getAdditionalProperties() + "]"; } /** @@ -874,7 +936,9 @@ public Builder toBuilder() { .maskedBankRoutingNumber(getMaskedBankRoutingNumber()) .bankAccountType(getBankAccountType()) .bankAccountHolderType(getBankAccountHolderType()) - .verified(getVerified()); + .verified(getVerified()) + .createdAt(getCreatedAt()) + .updatedAt(getUpdatedAt()); builder.billingAddress = internalGetBillingAddress(); builder.billingCity = internalGetBillingCity(); builder.billingState = internalGetBillingState(); @@ -913,6 +977,8 @@ public static class Builder { private Boolean verified = false; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Initialization constructor. @@ -1231,6 +1297,26 @@ public Builder unsetGatewayHandle() { 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; + } + /** * Builds a new {@link BankAccountPaymentProfile} object using the set fields. * @return {@link BankAccountPaymentProfile} @@ -1240,7 +1326,8 @@ public BankAccountPaymentProfile build() { firstName, lastName, customerId, currentVault, vaultToken, billingAddress, billingCity, billingState, billingZip, billingCountry, customerVaultToken, billingAddress2, bankName, maskedBankRoutingNumber, bankAccountType, - bankAccountHolderType, verified, siteGatewaySettingId, gatewayHandle); + bankAccountHolderType, verified, siteGatewaySettingId, gatewayHandle, createdAt, + updatedAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/Component.java b/src/main/java/com/maxio/advancedbilling/models/Component.java index aafc33b6..72105b64 100644 --- a/src/main/java/com/maxio/advancedbilling/models/Component.java +++ b/src/main/java/com/maxio/advancedbilling/models/Component.java @@ -30,6 +30,7 @@ public class Component private OptionalNullable unitPrice; private Integer productFamilyId; private String productFamilyName; + private String productFamilyHandle; private OptionalNullable pricePerUnitInCents; private ComponentKind kind; private Boolean archived; @@ -73,6 +74,7 @@ public Component() { * @param unitPrice String value for unitPrice. * @param productFamilyId Integer value for productFamilyId. * @param productFamilyName String value for productFamilyName. + * @param productFamilyHandle String value for productFamilyHandle. * @param pricePerUnitInCents Long value for pricePerUnitInCents. * @param kind ComponentKind value for kind. * @param archived Boolean value for archived. @@ -109,6 +111,7 @@ public Component( String unitPrice, Integer productFamilyId, String productFamilyName, + String productFamilyHandle, Long pricePerUnitInCents, ComponentKind kind, Boolean archived, @@ -143,6 +146,7 @@ public Component( this.unitPrice = OptionalNullable.of(unitPrice); this.productFamilyId = productFamilyId; this.productFamilyName = productFamilyName; + this.productFamilyHandle = productFamilyHandle; this.pricePerUnitInCents = OptionalNullable.of(pricePerUnitInCents); this.kind = kind; this.archived = archived; @@ -181,6 +185,7 @@ public Component( * @param unitPrice String value for unitPrice. * @param productFamilyId Integer value for productFamilyId. * @param productFamilyName String value for productFamilyName. + * @param productFamilyHandle String value for productFamilyHandle. * @param pricePerUnitInCents Long value for pricePerUnitInCents. * @param kind ComponentKind value for kind. * @param archived Boolean value for archived. @@ -212,9 +217,9 @@ public Component( protected Component(Integer id, String name, OptionalNullable handle, OptionalNullable pricingScheme, String unitName, OptionalNullable unitPrice, Integer productFamilyId, String productFamilyName, - OptionalNullable pricePerUnitInCents, ComponentKind kind, Boolean archived, - Boolean taxable, OptionalNullable description, - OptionalNullable defaultPricePointId, + String productFamilyHandle, OptionalNullable pricePerUnitInCents, + ComponentKind kind, Boolean archived, Boolean taxable, + OptionalNullable description, OptionalNullable defaultPricePointId, OptionalNullable> overagePrices, OptionalNullable> prices, Integer pricePointCount, OptionalNullable pricePointsUrl, String defaultPricePointName, @@ -235,6 +240,7 @@ protected Component(Integer id, String name, OptionalNullable handle, this.unitPrice = unitPrice; this.productFamilyId = productFamilyId; this.productFamilyName = productFamilyName; + this.productFamilyHandle = productFamilyHandle; this.pricePerUnitInCents = pricePerUnitInCents; this.kind = kind; this.archived = archived; @@ -487,6 +493,27 @@ public void setProductFamilyName(String productFamilyName) { this.productFamilyName = productFamilyName; } + /** + * Getter for ProductFamilyHandle. + * The handle of the Product Family to which the Component belongs + * @return Returns the String + */ + @JsonGetter("product_family_handle") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getProductFamilyHandle() { + return productFamilyHandle; + } + + /** + * Setter for ProductFamilyHandle. + * The handle of the Product Family to which the Component belongs + * @param productFamilyHandle Value for String + */ + @JsonSetter("product_family_handle") + public void setProductFamilyHandle(String productFamilyHandle) { + this.productFamilyHandle = productFamilyHandle; + } + /** * Internal Getter for PricePerUnitInCents. * deprecated - use unit_price instead @@ -1321,9 +1348,10 @@ public String toString() { return "Component [" + "id=" + id + ", name=" + name + ", handle=" + handle + ", pricingScheme=" + pricingScheme + ", unitName=" + unitName + ", unitPrice=" + unitPrice + ", productFamilyId=" + productFamilyId + ", productFamilyName=" - + productFamilyName + ", pricePerUnitInCents=" + pricePerUnitInCents + ", kind=" - + kind + ", archived=" + archived + ", taxable=" + taxable + ", description=" - + description + ", defaultPricePointId=" + defaultPricePointId + ", overagePrices=" + + productFamilyName + ", productFamilyHandle=" + productFamilyHandle + + ", pricePerUnitInCents=" + pricePerUnitInCents + ", kind=" + kind + ", archived=" + + archived + ", taxable=" + taxable + ", description=" + description + + ", defaultPricePointId=" + defaultPricePointId + ", overagePrices=" + overagePrices + ", prices=" + prices + ", pricePointCount=" + pricePointCount + ", pricePointsUrl=" + pricePointsUrl + ", defaultPricePointName=" + defaultPricePointName + ", taxCode=" + taxCode + ", recurring=" + recurring @@ -1349,6 +1377,7 @@ public Builder toBuilder() { .unitName(getUnitName()) .productFamilyId(getProductFamilyId()) .productFamilyName(getProductFamilyName()) + .productFamilyHandle(getProductFamilyHandle()) .kind(getKind()) .archived(getArchived()) .taxable(getTaxable()) @@ -1393,6 +1422,7 @@ public static class Builder { private OptionalNullable unitPrice; private Integer productFamilyId; private String productFamilyName; + private String productFamilyHandle; private OptionalNullable pricePerUnitInCents; private ComponentKind kind; private Boolean archived; @@ -1529,6 +1559,16 @@ public Builder productFamilyName(String productFamilyName) { return this; } + /** + * Setter for productFamilyHandle. + * @param productFamilyHandle String value for productFamilyHandle. + * @return Builder + */ + public Builder productFamilyHandle(String productFamilyHandle) { + this.productFamilyHandle = productFamilyHandle; + return this; + } + /** * Setter for pricePerUnitInCents. * @param pricePerUnitInCents Long value for pricePerUnitInCents. @@ -1921,10 +1961,10 @@ public Builder unsetIntervalUnit() { */ public Component build() { return new Component(id, name, handle, pricingScheme, unitName, unitPrice, - productFamilyId, productFamilyName, pricePerUnitInCents, kind, archived, - taxable, description, defaultPricePointId, overagePrices, prices, - pricePointCount, pricePointsUrl, defaultPricePointName, taxCode, recurring, - upgradeCharge, downgradeCredit, createdAt, updatedAt, archivedAt, + productFamilyId, productFamilyName, productFamilyHandle, pricePerUnitInCents, + kind, archived, taxable, description, defaultPricePointId, overagePrices, + prices, pricePointCount, pricePointsUrl, defaultPricePointName, taxCode, + recurring, upgradeCharge, downgradeCredit, createdAt, updatedAt, archivedAt, hideDateRangeOnInvoice, allowFractionalQuantities, itemCategory, useSiteExchangeRate, accountingCode, eventBasedBillingMetricId, interval, intervalUnit); diff --git a/src/main/java/com/maxio/advancedbilling/models/CouponRequest.java b/src/main/java/com/maxio/advancedbilling/models/CouponRequest.java index 4ca01ff6..8b59ca7f 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CouponRequest.java +++ b/src/main/java/com/maxio/advancedbilling/models/CouponRequest.java @@ -63,8 +63,8 @@ public void setCoupon(CouponPayload coupon) { /** * Getter for RestrictedProducts. - * An object where the keys are product_ids and the values are booleans indicating if the coupon - * should be applicable to the product + * An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values + * are booleans indicating if the coupon should be applicable to the product * @return Returns the Map of String, Boolean */ @JsonGetter("restricted_products") @@ -75,8 +75,8 @@ public Map getRestrictedProducts() { /** * Setter for RestrictedProducts. - * An object where the keys are product_ids and the values are booleans indicating if the coupon - * should be applicable to the product + * An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values + * are booleans indicating if the coupon should be applicable to the product * @param restrictedProducts Value for Map of String, Boolean */ @JsonSetter("restricted_products") @@ -86,8 +86,8 @@ public void setRestrictedProducts(Map restrictedProducts) { /** * Getter for RestrictedComponents. - * An object where the keys are component_ids and the values are booleans indicating if the - * coupon should be applicable to the component + * An object where the keys are component IDs or handles (prefixed with 'handle:'), and the + * values are booleans indicating if the coupon should be applicable to the component * @return Returns the Map of String, Boolean */ @JsonGetter("restricted_components") @@ -98,8 +98,8 @@ public Map getRestrictedComponents() { /** * Setter for RestrictedComponents. - * An object where the keys are component_ids and the values are booleans indicating if the - * coupon should be applicable to the component + * An object where the keys are component IDs or handles (prefixed with 'handle:'), and the + * values are booleans indicating if the coupon should be applicable to the component * @param restrictedComponents Value for Map of String, Boolean */ @JsonSetter("restricted_components") diff --git a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java index 6b32563a..b0c86d22 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreateSubscription.java @@ -37,6 +37,7 @@ public class CreateSubscription private Integer customerId; private ZonedDateTime nextBillingAt; private ZonedDateTime initialBillingAt; + private Boolean deferSignup; private Integer storedCredentialTransactionId; private Integer salesRepId; private Integer paymentProfileId; @@ -78,6 +79,7 @@ public class CreateSubscription * Default constructor. */ public CreateSubscription() { + deferSignup = false; dunningCommunicationDelayEnabled = false; skipBillingManifestTaxes = false; } @@ -97,6 +99,7 @@ public CreateSubscription() { * @param customerId Integer value for customerId. * @param nextBillingAt ZonedDateTime value for nextBillingAt. * @param initialBillingAt ZonedDateTime value for initialBillingAt. + * @param deferSignup Boolean value for deferSignup. * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. * @param salesRepId Integer value for salesRepId. * @param paymentProfileId Integer value for paymentProfileId. @@ -151,6 +154,7 @@ public CreateSubscription( Integer customerId, ZonedDateTime nextBillingAt, ZonedDateTime initialBillingAt, + Boolean deferSignup, Integer storedCredentialTransactionId, Integer salesRepId, Integer paymentProfileId, @@ -200,6 +204,7 @@ public CreateSubscription( this.customerId = customerId; this.nextBillingAt = nextBillingAt; this.initialBillingAt = initialBillingAt; + this.deferSignup = deferSignup; this.storedCredentialTransactionId = storedCredentialTransactionId; this.salesRepId = salesRepId; this.paymentProfileId = paymentProfileId; @@ -254,6 +259,7 @@ public CreateSubscription( * @param customerId Integer value for customerId. * @param nextBillingAt ZonedDateTime value for nextBillingAt. * @param initialBillingAt ZonedDateTime value for initialBillingAt. + * @param deferSignup Boolean value for deferSignup. * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. * @param salesRepId Integer value for salesRepId. * @param paymentProfileId Integer value for paymentProfileId. @@ -300,8 +306,8 @@ protected CreateSubscription(String productHandle, Integer productId, SubscriptionCustomPrice customPrice, String couponCode, List couponCodes, CollectionMethod paymentCollectionMethod, String receivesInvoiceEmails, String netTerms, Integer customerId, ZonedDateTime nextBillingAt, ZonedDateTime initialBillingAt, - Integer storedCredentialTransactionId, Integer salesRepId, Integer paymentProfileId, - String reference, CustomerAttributes customerAttributes, + Boolean deferSignup, Integer storedCredentialTransactionId, Integer salesRepId, + Integer paymentProfileId, String reference, CustomerAttributes customerAttributes, PaymentProfileAttributes paymentProfileAttributes, PaymentProfileAttributes creditCardAttributes, BankAccountAttributes bankAccountAttributes, @@ -330,6 +336,7 @@ protected CreateSubscription(String productHandle, Integer productId, this.customerId = customerId; this.nextBillingAt = nextBillingAt; this.initialBillingAt = initialBillingAt; + this.deferSignup = deferSignup; this.storedCredentialTransactionId = storedCredentialTransactionId; this.salesRepId = salesRepId; this.paymentProfileId = paymentProfileId; @@ -660,17 +667,17 @@ public void setNextBillingAt(ZonedDateTime nextBillingAt) { /** * Getter for InitialBillingAt. - * (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting - * Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our - * [subscription import - * documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). - * In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, - * allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the - * subscription will transition to the expected state. If the product has a trial, the - * subscription will enter a trial, otherwise it will go active. Setup fees will be respected - * either before or after the trial, as configured on the price point. If the payment is due at - * the initial_billing_at and it fails the subscription will be immediately canceled. See - * further notes in the section on Delayed Signups. + * (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting + * Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to + * activate the subscription immediately. In the Awaiting Signup state, a subscription behaves + * like any other. It can be canceled, allocated to, or have its billing date changed. etc. When + * the initial_billing_at date hits, the subscription will transition to the expected state. If + * the product has a trial, the subscription will enter a trial, otherwise it will go active. + * Setup fees will be respected either before or after the trial, as configured on the price + * point. If the payment is due at the initial_billing_at and it fails the subscription will be + * immediately canceled. See the [subscription + * import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) + * documentation for more information about Date/Time Formats. * @return Returns the ZonedDateTime */ @JsonGetter("initial_billing_at") @@ -682,17 +689,17 @@ public ZonedDateTime getInitialBillingAt() { /** * Setter for InitialBillingAt. - * (Optional) Set this attribute to a future date/time to create a subscription in the "Awaiting - * Signup" state, rather than "Active" or "Trialing". See the notes on “Date/Time Format” in our - * [subscription import - * documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). - * In the "Awaiting Signup" state, a subscription behaves like any other. It can be canceled, - * allocated to, had its billing date changed. etc. When the initial_billing_at date hits, the - * subscription will transition to the expected state. If the product has a trial, the - * subscription will enter a trial, otherwise it will go active. Setup fees will be respected - * either before or after the trial, as configured on the price point. If the payment is due at - * the initial_billing_at and it fails the subscription will be immediately canceled. See - * further notes in the section on Delayed Signups. + * (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting + * Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to + * activate the subscription immediately. In the Awaiting Signup state, a subscription behaves + * like any other. It can be canceled, allocated to, or have its billing date changed. etc. When + * the initial_billing_at date hits, the subscription will transition to the expected state. If + * the product has a trial, the subscription will enter a trial, otherwise it will go active. + * Setup fees will be respected either before or after the trial, as configured on the price + * point. If the payment is due at the initial_billing_at and it fails the subscription will be + * immediately canceled. See the [subscription + * import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) + * documentation for more information about Date/Time Formats. * @param initialBillingAt Value for ZonedDateTime */ @JsonSetter("initial_billing_at") @@ -701,6 +708,41 @@ public void setInitialBillingAt(ZonedDateTime initialBillingAt) { this.initialBillingAt = initialBillingAt; } + /** + * Getter for DeferSignup. + * (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date + * state. Use this when you want to create a subscription that has an unknown first billing + * date. When the first billing date is known, update a subscription and set the + * `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a + * scheduled initial billing date. You can omit the initial_billing_at date to activate the + * subscription immediately. See [Subscription + * States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) + * for more information. + * @return Returns the Boolean + */ + @JsonGetter("defer_signup") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDeferSignup() { + return deferSignup; + } + + /** + * Setter for DeferSignup. + * (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date + * state. Use this when you want to create a subscription that has an unknown first billing + * date. When the first billing date is known, update a subscription and set the + * `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a + * scheduled initial billing date. You can omit the initial_billing_at date to activate the + * subscription immediately. See [Subscription + * States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) + * for more information. + * @param deferSignup Value for Boolean + */ + @JsonSetter("defer_signup") + public void setDeferSignup(Boolean deferSignup) { + this.deferSignup = deferSignup; + } + /** * Getter for StoredCredentialTransactionId. * For European sites subject to PSD2 and using 3D Secure, this can be used to reference a @@ -778,7 +820,7 @@ public void setPaymentProfileId(Integer paymentProfileId) { /** * Getter for Reference. - * The reference value (provided by your app) for the subscription itelf. + * The reference value (provided by your app) for the subscription itself. * @return Returns the String */ @JsonGetter("reference") @@ -789,7 +831,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 itself. * @param reference Value for String */ @JsonSetter("reference") @@ -1251,7 +1293,7 @@ public void setReasonCode(String reasonCode) { /** * Getter for ProductChangeDelayed. - * (Optional, used only for Delayed Product Change When set to true, indicates that a changed + * (Optional) used only for Delayed Product Change When set to true, indicates that a changed * value for product_handle should schedule the product change to the next subscription renewal. * @return Returns the Boolean */ @@ -1263,7 +1305,7 @@ public Boolean getProductChangeDelayed() { /** * Setter for ProductChangeDelayed. - * (Optional, used only for Delayed Product Change When set to true, indicates that a changed + * (Optional) used only for Delayed Product Change When set to true, indicates that a changed * value for product_handle should schedule the product change to the next subscription renewal. * @param productChangeDelayed Value for Boolean */ @@ -1556,22 +1598,22 @@ public String toString() { + ", paymentCollectionMethod=" + paymentCollectionMethod + ", receivesInvoiceEmails=" + receivesInvoiceEmails + ", netTerms=" + netTerms + ", customerId=" + customerId + ", nextBillingAt=" + nextBillingAt - + ", initialBillingAt=" + initialBillingAt + ", storedCredentialTransactionId=" - + storedCredentialTransactionId + ", salesRepId=" + salesRepId - + ", paymentProfileId=" + paymentProfileId + ", reference=" + reference - + ", customerAttributes=" + customerAttributes + ", paymentProfileAttributes=" - + paymentProfileAttributes + ", creditCardAttributes=" + creditCardAttributes - + ", bankAccountAttributes=" + bankAccountAttributes + ", components=" + components - + ", calendarBilling=" + calendarBilling + ", metafields=" + metafields - + ", customerReference=" + customerReference + ", group=" + group + ", ref=" + ref - + ", cancellationMessage=" + cancellationMessage + ", cancellationMethod=" - + cancellationMethod + ", currency=" + currency + ", expiresAt=" + expiresAt - + ", expirationTracksNextBillingChange=" + expirationTracksNextBillingChange - + ", agreementTerms=" + agreementTerms + ", authorizerFirstName=" - + authorizerFirstName + ", authorizerLastName=" + authorizerLastName - + ", calendarBillingFirstCharge=" + calendarBillingFirstCharge + ", reasonCode=" - + reasonCode + ", productChangeDelayed=" + productChangeDelayed + ", offerId=" - + offerId + ", prepaidConfiguration=" + prepaidConfiguration + + ", initialBillingAt=" + initialBillingAt + ", deferSignup=" + deferSignup + + ", storedCredentialTransactionId=" + storedCredentialTransactionId + + ", salesRepId=" + salesRepId + ", paymentProfileId=" + paymentProfileId + + ", reference=" + reference + ", customerAttributes=" + customerAttributes + + ", paymentProfileAttributes=" + paymentProfileAttributes + + ", creditCardAttributes=" + creditCardAttributes + ", bankAccountAttributes=" + + bankAccountAttributes + ", components=" + components + ", calendarBilling=" + + calendarBilling + ", metafields=" + metafields + ", customerReference=" + + customerReference + ", group=" + group + ", ref=" + ref + ", cancellationMessage=" + + cancellationMessage + ", cancellationMethod=" + cancellationMethod + ", currency=" + + currency + ", expiresAt=" + expiresAt + ", expirationTracksNextBillingChange=" + + expirationTracksNextBillingChange + ", agreementTerms=" + agreementTerms + + ", authorizerFirstName=" + authorizerFirstName + ", authorizerLastName=" + + authorizerLastName + ", calendarBillingFirstCharge=" + calendarBillingFirstCharge + + ", reasonCode=" + reasonCode + ", productChangeDelayed=" + productChangeDelayed + + ", offerId=" + offerId + ", prepaidConfiguration=" + prepaidConfiguration + ", previousBillingAt=" + previousBillingAt + ", importMrr=" + importMrr + ", canceledAt=" + canceledAt + ", activatedAt=" + activatedAt + ", agreementAcceptance=" + agreementAcceptance + ", achAgreement=" + achAgreement @@ -1601,6 +1643,7 @@ public Builder toBuilder() { .customerId(getCustomerId()) .nextBillingAt(getNextBillingAt()) .initialBillingAt(getInitialBillingAt()) + .deferSignup(getDeferSignup()) .storedCredentialTransactionId(getStoredCredentialTransactionId()) .salesRepId(getSalesRepId()) .paymentProfileId(getPaymentProfileId()) @@ -1657,6 +1700,7 @@ public static class Builder { private Integer customerId; private ZonedDateTime nextBillingAt; private ZonedDateTime initialBillingAt; + private Boolean deferSignup = false; private Integer storedCredentialTransactionId; private Integer salesRepId; private Integer paymentProfileId; @@ -1826,6 +1870,16 @@ public Builder initialBillingAt(ZonedDateTime initialBillingAt) { return this; } + /** + * Setter for deferSignup. + * @param deferSignup Boolean value for deferSignup. + * @return Builder + */ + public Builder deferSignup(Boolean deferSignup) { + this.deferSignup = deferSignup; + return this; + } + /** * Setter for storedCredentialTransactionId. * @param storedCredentialTransactionId Integer value for storedCredentialTransactionId. @@ -2212,16 +2266,17 @@ public CreateSubscription build() { return new CreateSubscription(productHandle, productId, productPricePointHandle, productPricePointId, customPrice, couponCode, couponCodes, paymentCollectionMethod, receivesInvoiceEmails, netTerms, customerId, - nextBillingAt, initialBillingAt, storedCredentialTransactionId, salesRepId, - paymentProfileId, reference, customerAttributes, paymentProfileAttributes, - creditCardAttributes, bankAccountAttributes, components, calendarBilling, - metafields, customerReference, group, ref, cancellationMessage, - cancellationMethod, currency, expiresAt, expirationTracksNextBillingChange, - agreementTerms, authorizerFirstName, authorizerLastName, - calendarBillingFirstCharge, reasonCode, productChangeDelayed, offerId, - prepaidConfiguration, previousBillingAt, importMrr, canceledAt, activatedAt, - agreementAcceptance, achAgreement, dunningCommunicationDelayEnabled, - dunningCommunicationDelayTimeZone, skipBillingManifestTaxes); + nextBillingAt, initialBillingAt, deferSignup, storedCredentialTransactionId, + salesRepId, paymentProfileId, reference, customerAttributes, + paymentProfileAttributes, creditCardAttributes, bankAccountAttributes, + components, calendarBilling, metafields, customerReference, group, ref, + cancellationMessage, cancellationMethod, currency, expiresAt, + expirationTracksNextBillingChange, agreementTerms, authorizerFirstName, + authorizerLastName, calendarBillingFirstCharge, reasonCode, + productChangeDelayed, offerId, prepaidConfiguration, previousBillingAt, + importMrr, canceledAt, activatedAt, agreementAcceptance, achAgreement, + dunningCommunicationDelayEnabled, dunningCommunicationDelayTimeZone, + skipBillingManifestTaxes); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java index 967e866e..d2106e14 100644 --- a/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/CreditCardPaymentProfile.java @@ -11,9 +11,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; 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 CreditCardPaymentProfile type. @@ -42,6 +45,8 @@ public class CreditCardPaymentProfile private String chargifyToken; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Default constructor. @@ -74,6 +79,8 @@ public CreditCardPaymentProfile() { * @param chargifyToken String value for chargifyToken. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ public CreditCardPaymentProfile( PaymentType paymentType, @@ -97,7 +104,9 @@ public CreditCardPaymentProfile( Boolean disabled, String chargifyToken, Integer siteGatewaySettingId, - String gatewayHandle) { + String gatewayHandle, + ZonedDateTime createdAt, + ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -120,6 +129,8 @@ public CreditCardPaymentProfile( this.chargifyToken = chargifyToken; this.siteGatewaySettingId = OptionalNullable.of(siteGatewaySettingId); this.gatewayHandle = OptionalNullable.of(gatewayHandle); + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -146,6 +157,8 @@ public CreditCardPaymentProfile( * @param chargifyToken String value for chargifyToken. * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ protected CreditCardPaymentProfile(PaymentType paymentType, Integer id, String firstName, @@ -156,7 +169,8 @@ protected CreditCardPaymentProfile(PaymentType paymentType, Integer id, String f OptionalNullable billingZip, OptionalNullable billingCountry, OptionalNullable customerVaultToken, OptionalNullable billingAddress2, Boolean disabled, String chargifyToken, OptionalNullable siteGatewaySettingId, - OptionalNullable gatewayHandle) { + OptionalNullable gatewayHandle, ZonedDateTime createdAt, + ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -179,6 +193,8 @@ protected CreditCardPaymentProfile(PaymentType paymentType, Integer id, String f this.chargifyToken = chargifyToken; this.siteGatewaySettingId = siteGatewaySettingId; this.gatewayHandle = gatewayHandle; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -192,7 +208,7 @@ protected CreditCardPaymentProfile( OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), null, null, - OptionalNullable.of(null), OptionalNullable.of(null)); + OptionalNullable.of(null), OptionalNullable.of(null), null, null); unsetVaultToken(); unsetBillingAddress(); unsetBillingCity(); @@ -854,6 +870,52 @@ public void unsetGatewayHandle() { gatewayHandle = null; } + /** + * Getter for CreatedAt. + * A timestamp indicating when this payment profile was created + * @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. + * A timestamp indicating when this payment profile was created + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for UpdatedAt. + * A timestamp indicating when this payment profile was last updated + * @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. + * A timestamp indicating when this payment profile was last updated + * @param updatedAt Value for ZonedDateTime + */ + @JsonSetter("updated_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setUpdatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + } + /** * Converts this CreditCardPaymentProfile into string format. * @return String representation of this class @@ -870,8 +932,9 @@ public String toString() { + ", billingCountry=" + billingCountry + ", customerVaultToken=" + customerVaultToken + ", billingAddress2=" + billingAddress2 + ", disabled=" + disabled + ", chargifyToken=" + chargifyToken + ", siteGatewaySettingId=" - + siteGatewaySettingId + ", gatewayHandle=" + gatewayHandle - + ", additionalProperties=" + getAdditionalProperties() + "]"; + + siteGatewaySettingId + ", gatewayHandle=" + gatewayHandle + ", createdAt=" + + createdAt + ", updatedAt=" + updatedAt + ", additionalProperties=" + + getAdditionalProperties() + "]"; } /** @@ -891,7 +954,9 @@ public Builder toBuilder() { .customerId(getCustomerId()) .currentVault(getCurrentVault()) .disabled(getDisabled()) - .chargifyToken(getChargifyToken()); + .chargifyToken(getChargifyToken()) + .createdAt(getCreatedAt()) + .updatedAt(getUpdatedAt()); builder.vaultToken = internalGetVaultToken(); builder.billingAddress = internalGetBillingAddress(); builder.billingCity = internalGetBillingCity(); @@ -931,6 +996,8 @@ public static class Builder { private String chargifyToken; private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Initialization constructor. @@ -1256,6 +1323,26 @@ public Builder unsetGatewayHandle() { 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; + } + /** * Builds a new {@link CreditCardPaymentProfile} object using the set fields. * @return {@link CreditCardPaymentProfile} @@ -1265,7 +1352,7 @@ public CreditCardPaymentProfile build() { maskedCardNumber, cardType, expirationMonth, expirationYear, customerId, currentVault, vaultToken, billingAddress, billingCity, billingState, billingZip, billingCountry, customerVaultToken, billingAddress2, disabled, chargifyToken, - siteGatewaySettingId, gatewayHandle); + siteGatewaySettingId, gatewayHandle, createdAt, updatedAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java b/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java index b970f206..c0ec0d43 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListInvoicesInput.java @@ -20,6 +20,7 @@ public class ListInvoicesInput { private InvoiceStatus status; private Integer subscriptionId; private String subscriptionGroupUid; + private String consolidationLevel; private Integer page; private Integer perPage; private Direction direction; @@ -63,6 +64,7 @@ public ListInvoicesInput() { * @param status InvoiceStatus value for status. * @param subscriptionId Integer value for subscriptionId. * @param subscriptionGroupUid String value for subscriptionGroupUid. + * @param consolidationLevel String value for consolidationLevel. * @param page Integer value for page. * @param perPage Integer value for perPage. * @param direction Direction value for direction. @@ -87,6 +89,7 @@ public ListInvoicesInput( InvoiceStatus status, Integer subscriptionId, String subscriptionGroupUid, + String consolidationLevel, Integer page, Integer perPage, Direction direction, @@ -109,6 +112,7 @@ public ListInvoicesInput( this.status = status; this.subscriptionId = subscriptionId; this.subscriptionGroupUid = subscriptionGroupUid; + this.consolidationLevel = consolidationLevel; this.page = page; this.perPage = perPage; this.direction = direction; @@ -241,6 +245,29 @@ public void setSubscriptionGroupUid(String subscriptionGroupUid) { this.subscriptionGroupUid = subscriptionGroupUid; } + /** + * Getter for ConsolidationLevel. + * The consolidation level of the invoice. Allowed Values: none, parent, child or + * comma-separated lists of thereof, e.g. none,parent. + * @return Returns the String + */ + @JsonGetter("consolidation_level") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getConsolidationLevel() { + return consolidationLevel; + } + + /** + * Setter for ConsolidationLevel. + * The consolidation level of the invoice. Allowed Values: none, parent, child or + * comma-separated lists of thereof, e.g. none,parent. + * @param consolidationLevel Value for String + */ + @JsonSetter("consolidation_level") + public void setConsolidationLevel(String consolidationLevel) { + this.consolidationLevel = consolidationLevel; + } + /** * Getter for Page. * Result records are organized in pages. By default, the first page of results is displayed. @@ -642,11 +669,12 @@ public void setSort(InvoiceSortField sort) { public String toString() { return "ListInvoicesInput [" + "startDate=" + startDate + ", endDate=" + endDate + ", status=" + status + ", subscriptionId=" + subscriptionId - + ", subscriptionGroupUid=" + subscriptionGroupUid + ", page=" + page + ", perPage=" - + perPage + ", direction=" + direction + ", lineItems=" + lineItems + ", discounts=" - + discounts + ", taxes=" + taxes + ", credits=" + credits + ", payments=" + payments - + ", customFields=" + customFields + ", refunds=" + refunds + ", dateField=" - + dateField + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + + ", subscriptionGroupUid=" + subscriptionGroupUid + ", consolidationLevel=" + + consolidationLevel + ", page=" + page + ", perPage=" + perPage + ", direction=" + + direction + ", lineItems=" + lineItems + ", discounts=" + discounts + ", taxes=" + + taxes + ", credits=" + credits + ", payments=" + payments + ", customFields=" + + customFields + ", refunds=" + refunds + ", dateField=" + dateField + + ", startDatetime=" + startDatetime + ", endDatetime=" + endDatetime + ", customerIds=" + customerIds + ", number=" + number + ", productIds=" + productIds + ", sort=" + sort + "]"; } @@ -663,6 +691,7 @@ public Builder toBuilder() { .status(getStatus()) .subscriptionId(getSubscriptionId()) .subscriptionGroupUid(getSubscriptionGroupUid()) + .consolidationLevel(getConsolidationLevel()) .page(getPage()) .perPage(getPerPage()) .direction(getDirection()) @@ -692,6 +721,7 @@ public static class Builder { private InvoiceStatus status; private Integer subscriptionId; private String subscriptionGroupUid; + private String consolidationLevel; private Integer page = 1; private Integer perPage = 20; private Direction direction = Direction.DESC; @@ -762,6 +792,16 @@ public Builder subscriptionGroupUid(String subscriptionGroupUid) { return this; } + /** + * Setter for consolidationLevel. + * @param consolidationLevel String value for consolidationLevel. + * @return Builder + */ + public Builder consolidationLevel(String consolidationLevel) { + this.consolidationLevel = consolidationLevel; + return this; + } + /** * Setter for page. * @param page Integer value for page. @@ -938,9 +978,9 @@ public Builder sort(InvoiceSortField sort) { */ public ListInvoicesInput build() { return new ListInvoicesInput(startDate, endDate, status, subscriptionId, - subscriptionGroupUid, page, perPage, direction, lineItems, discounts, taxes, - credits, payments, customFields, refunds, dateField, startDatetime, endDatetime, - customerIds, number, productIds, sort); + subscriptionGroupUid, consolidationLevel, page, perPage, direction, lineItems, + discounts, taxes, credits, payments, customFields, refunds, dateField, + startDatetime, endDatetime, customerIds, number, productIds, sort); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ListServiceCreditsResponse.java b/src/main/java/com/maxio/advancedbilling/models/ListServiceCreditsResponse.java new file mode 100644 index 00000000..1d81d0ec --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ListServiceCreditsResponse.java @@ -0,0 +1,103 @@ +/* + * 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 ListServiceCreditsResponse type. + */ +public class ListServiceCreditsResponse + extends BaseModel { + private List serviceCredits; + + /** + * Default constructor. + */ + public ListServiceCreditsResponse() { + } + + /** + * Initialization constructor. + * @param serviceCredits List of ServiceCredit1 value for serviceCredits. + */ + public ListServiceCreditsResponse( + List serviceCredits) { + this.serviceCredits = serviceCredits; + } + + /** + * Getter for ServiceCredits. + * @return Returns the List of ServiceCredit1 + */ + @JsonGetter("service_credits") + @JsonInclude(JsonInclude.Include.NON_NULL) + public List getServiceCredits() { + return serviceCredits; + } + + /** + * Setter for ServiceCredits. + * @param serviceCredits Value for List of ServiceCredit1 + */ + @JsonSetter("service_credits") + public void setServiceCredits(List serviceCredits) { + this.serviceCredits = serviceCredits; + } + + /** + * Converts this ListServiceCreditsResponse into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ListServiceCreditsResponse [" + "serviceCredits=" + serviceCredits + + ", additionalProperties=" + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ListServiceCreditsResponse.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ListServiceCreditsResponse.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .serviceCredits(getServiceCredits()); + return builder; + } + + /** + * Class to build instances of {@link ListServiceCreditsResponse}. + */ + public static class Builder { + private List serviceCredits; + + + + /** + * Setter for serviceCredits. + * @param serviceCredits List of ServiceCredit1 value for serviceCredits. + * @return Builder + */ + public Builder serviceCredits(List serviceCredits) { + this.serviceCredits = serviceCredits; + return this; + } + + /** + * Builds a new {@link ListServiceCreditsResponse} object using the set fields. + * @return {@link ListServiceCreditsResponse} + */ + public ListServiceCreditsResponse build() { + return new ListServiceCreditsResponse(serviceCredits); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java index b1ccaa6f..0daa0999 100644 --- a/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java +++ b/src/main/java/com/maxio/advancedbilling/models/ListSubscriptionsInput.java @@ -27,6 +27,7 @@ public class ListSubscriptionsInput { private Integer product; private Integer productPricePointId; private Integer coupon; + private String couponCode; private SubscriptionDateField dateField; private LocalDate startDate; private LocalDate endDate; @@ -54,6 +55,7 @@ public ListSubscriptionsInput() { * @param product Integer value for product. * @param productPricePointId Integer value for productPricePointId. * @param coupon Integer value for coupon. + * @param couponCode String value for couponCode. * @param dateField SubscriptionDateField value for dateField. * @param startDate LocalDate value for startDate. * @param endDate LocalDate value for endDate. @@ -71,6 +73,7 @@ public ListSubscriptionsInput( Integer product, Integer productPricePointId, Integer coupon, + String couponCode, SubscriptionDateField dateField, LocalDate startDate, LocalDate endDate, @@ -86,6 +89,7 @@ public ListSubscriptionsInput( this.product = product; this.productPricePointId = productPricePointId; this.coupon = coupon; + this.couponCode = couponCode; this.dateField = dateField; this.startDate = startDate; this.endDate = endDate; @@ -237,6 +241,27 @@ public void setCoupon(Integer coupon) { this.coupon = coupon; } + /** + * Getter for CouponCode. + * The coupon code currently applied to the subscription + * @return Returns the String + */ + @JsonGetter("coupon_code") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getCouponCode() { + return couponCode; + } + + /** + * Setter for CouponCode. + * The coupon code currently applied to the subscription + * @param couponCode Value for String + */ + @JsonSetter("coupon_code") + public void setCouponCode(String couponCode) { + this.couponCode = couponCode; + } + /** * Getter for DateField. * The type of filter you'd like to apply to your search. Allowed Values: , @@ -472,10 +497,10 @@ public void setInclude(List include) { public String toString() { return "ListSubscriptionsInput [" + "page=" + page + ", perPage=" + perPage + ", state=" + state + ", product=" + product + ", productPricePointId=" + productPricePointId - + ", coupon=" + coupon + ", dateField=" + dateField + ", startDate=" + startDate - + ", endDate=" + endDate + ", startDatetime=" + startDatetime + ", endDatetime=" - + endDatetime + ", metadata=" + metadata + ", direction=" + direction + ", sort=" - + sort + ", include=" + include + "]"; + + ", coupon=" + coupon + ", couponCode=" + couponCode + ", dateField=" + dateField + + ", startDate=" + startDate + ", endDate=" + endDate + ", startDatetime=" + + startDatetime + ", endDatetime=" + endDatetime + ", metadata=" + metadata + + ", direction=" + direction + ", sort=" + sort + ", include=" + include + "]"; } /** @@ -491,6 +516,7 @@ public Builder toBuilder() { .product(getProduct()) .productPricePointId(getProductPricePointId()) .coupon(getCoupon()) + .couponCode(getCouponCode()) .dateField(getDateField()) .startDate(getStartDate()) .endDate(getEndDate()) @@ -513,6 +539,7 @@ public static class Builder { private Integer product; private Integer productPricePointId; private Integer coupon; + private String couponCode; private SubscriptionDateField dateField; private LocalDate startDate; private LocalDate endDate; @@ -585,6 +612,16 @@ public Builder coupon(Integer coupon) { return this; } + /** + * Setter for couponCode. + * @param couponCode String value for couponCode. + * @return Builder + */ + public Builder couponCode(String couponCode) { + this.couponCode = couponCode; + return this; + } + /** * Setter for dateField. * @param dateField SubscriptionDateField value for dateField. @@ -681,8 +718,8 @@ public Builder include(List include) { */ public ListSubscriptionsInput build() { return new ListSubscriptionsInput(page, perPage, state, product, productPricePointId, - coupon, dateField, startDate, endDate, startDatetime, endDatetime, metadata, - direction, sort, include); + coupon, couponCode, dateField, startDate, endDate, startDatetime, endDatetime, + metadata, direction, sort, include); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/OverrideSubscription.java b/src/main/java/com/maxio/advancedbilling/models/OverrideSubscription.java index 1b0563d5..658eaccc 100644 --- a/src/main/java/com/maxio/advancedbilling/models/OverrideSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/OverrideSubscription.java @@ -132,7 +132,8 @@ public void setCancellationMessage(String cancellationMessage) { * Getter for ExpiresAt. * Can be used to record an external expiration date. Chargify sets this field automatically * when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 - * format is supported. + * format is supported. This field is not supported when Multi-frequency is enabled for the + * Site. To change the Term End of a Subscription, use the Update Subscription endpoint. * @return Returns the ZonedDateTime */ @JsonGetter("expires_at") @@ -146,7 +147,8 @@ public ZonedDateTime getExpiresAt() { * Setter for ExpiresAt. * Can be used to record an external expiration date. Chargify sets this field automatically * when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 - * format is supported. + * format is supported. This field is not supported when Multi-frequency is enabled for the + * Site. To change the Term End of a Subscription, use the Update Subscription endpoint. * @param expiresAt Value for ZonedDateTime */ @JsonSetter("expires_at") diff --git a/src/main/java/com/maxio/advancedbilling/models/PaypalPaymentProfile.java b/src/main/java/com/maxio/advancedbilling/models/PaypalPaymentProfile.java index 5f62e1f5..4d531abb 100644 --- a/src/main/java/com/maxio/advancedbilling/models/PaypalPaymentProfile.java +++ b/src/main/java/com/maxio/advancedbilling/models/PaypalPaymentProfile.java @@ -11,9 +11,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; 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 PaypalPaymentProfile type. @@ -37,6 +40,8 @@ public class PaypalPaymentProfile private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; private String paypalEmail; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Default constructor. @@ -64,6 +69,8 @@ public PaypalPaymentProfile() { * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. * @param paypalEmail String value for paypalEmail. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ public PaypalPaymentProfile( PaymentType paymentType, @@ -82,7 +89,9 @@ public PaypalPaymentProfile( String billingAddress2, Integer siteGatewaySettingId, String gatewayHandle, - String paypalEmail) { + String paypalEmail, + ZonedDateTime createdAt, + ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -100,6 +109,8 @@ public PaypalPaymentProfile( this.siteGatewaySettingId = OptionalNullable.of(siteGatewaySettingId); this.gatewayHandle = OptionalNullable.of(gatewayHandle); this.paypalEmail = paypalEmail; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -121,6 +132,8 @@ public PaypalPaymentProfile( * @param siteGatewaySettingId Integer value for siteGatewaySettingId. * @param gatewayHandle String value for gatewayHandle. * @param paypalEmail String value for paypalEmail. + * @param createdAt ZonedDateTime value for createdAt. + * @param updatedAt ZonedDateTime value for updatedAt. */ protected PaypalPaymentProfile(PaymentType paymentType, Integer id, String firstName, @@ -130,7 +143,7 @@ protected PaypalPaymentProfile(PaymentType paymentType, Integer id, String first OptionalNullable billingCountry, OptionalNullable customerVaultToken, OptionalNullable billingAddress2, OptionalNullable siteGatewaySettingId, OptionalNullable gatewayHandle, - String paypalEmail) { + String paypalEmail, ZonedDateTime createdAt, ZonedDateTime updatedAt) { this.id = id; this.firstName = firstName; this.lastName = lastName; @@ -148,6 +161,8 @@ protected PaypalPaymentProfile(PaymentType paymentType, Integer id, String first this.siteGatewaySettingId = siteGatewaySettingId; this.gatewayHandle = gatewayHandle; this.paypalEmail = paypalEmail; + this.createdAt = createdAt; + this.updatedAt = updatedAt; } /** @@ -160,7 +175,7 @@ protected PaypalPaymentProfile( this(paymentType, null, null, null, null, null, null, OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), OptionalNullable.of(null), - OptionalNullable.of(null), OptionalNullable.of(null), null); + OptionalNullable.of(null), OptionalNullable.of(null), null, null, null); unsetBillingAddress(); unsetBillingCity(); unsetBillingState(); @@ -674,6 +689,52 @@ public void setPaypalEmail(String paypalEmail) { this.paypalEmail = paypalEmail; } + /** + * Getter for CreatedAt. + * A timestamp indicating when this payment profile was created + * @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. + * A timestamp indicating when this payment profile was created + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Getter for UpdatedAt. + * A timestamp indicating when this payment profile was last updated + * @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. + * A timestamp indicating when this payment profile was last updated + * @param updatedAt Value for ZonedDateTime + */ + @JsonSetter("updated_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setUpdatedAt(ZonedDateTime updatedAt) { + this.updatedAt = updatedAt; + } + /** * Converts this PaypalPaymentProfile into string format. * @return String representation of this class @@ -688,8 +749,9 @@ public String toString() { + ", billingCountry=" + billingCountry + ", customerVaultToken=" + customerVaultToken + ", billingAddress2=" + billingAddress2 + ", siteGatewaySettingId=" + siteGatewaySettingId + ", gatewayHandle=" - + gatewayHandle + ", paypalEmail=" + paypalEmail + ", additionalProperties=" - + getAdditionalProperties() + "]"; + + gatewayHandle + ", paypalEmail=" + paypalEmail + ", createdAt=" + createdAt + + ", updatedAt=" + updatedAt + ", additionalProperties=" + getAdditionalProperties() + + "]"; } /** @@ -705,7 +767,9 @@ public Builder toBuilder() { .customerId(getCustomerId()) .currentVault(getCurrentVault()) .vaultToken(getVaultToken()) - .paypalEmail(getPaypalEmail()); + .paypalEmail(getPaypalEmail()) + .createdAt(getCreatedAt()) + .updatedAt(getUpdatedAt()); builder.billingAddress = internalGetBillingAddress(); builder.billingCity = internalGetBillingCity(); builder.billingState = internalGetBillingState(); @@ -739,6 +803,8 @@ public static class Builder { private OptionalNullable siteGatewaySettingId; private OptionalNullable gatewayHandle; private String paypalEmail; + private ZonedDateTime createdAt; + private ZonedDateTime updatedAt; /** * Initialization constructor. @@ -1005,6 +1071,26 @@ public Builder paypalEmail(String paypalEmail) { 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; + } + /** * Builds a new {@link PaypalPaymentProfile} object using the set fields. * @return {@link PaypalPaymentProfile} @@ -1013,7 +1099,7 @@ public PaypalPaymentProfile build() { return new PaypalPaymentProfile(paymentType, id, firstName, lastName, customerId, currentVault, vaultToken, billingAddress, billingCity, billingState, billingZip, billingCountry, customerVaultToken, billingAddress2, siteGatewaySettingId, - gatewayHandle, paypalEmail); + gatewayHandle, paypalEmail, createdAt, updatedAt); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/ServiceCredit1.java b/src/main/java/com/maxio/advancedbilling/models/ServiceCredit1.java new file mode 100644 index 00000000..b6d7db41 --- /dev/null +++ b/src/main/java/com/maxio/advancedbilling/models/ServiceCredit1.java @@ -0,0 +1,424 @@ +/* + * 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; + +/** + * This is a model class for ServiceCredit1 type. + */ +public class ServiceCredit1 + extends BaseModel { + private Integer id; + private Long amountInCents; + private Long endingBalanceInCents; + private ServiceCreditType entryType; + private String memo; + private OptionalNullable invoiceUid; + private Long remainingBalanceInCents; + private ZonedDateTime createdAt; + + /** + * Default constructor. + */ + public ServiceCredit1() { + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param amountInCents Long value for amountInCents. + * @param endingBalanceInCents Long value for endingBalanceInCents. + * @param entryType ServiceCreditType value for entryType. + * @param memo String value for memo. + * @param invoiceUid String value for invoiceUid. + * @param remainingBalanceInCents Long value for remainingBalanceInCents. + * @param createdAt ZonedDateTime value for createdAt. + */ + public ServiceCredit1( + Integer id, + Long amountInCents, + Long endingBalanceInCents, + ServiceCreditType entryType, + String memo, + String invoiceUid, + Long remainingBalanceInCents, + ZonedDateTime createdAt) { + this.id = id; + this.amountInCents = amountInCents; + this.endingBalanceInCents = endingBalanceInCents; + this.entryType = entryType; + this.memo = memo; + this.invoiceUid = OptionalNullable.of(invoiceUid); + this.remainingBalanceInCents = remainingBalanceInCents; + this.createdAt = createdAt; + } + + /** + * Initialization constructor. + * @param id Integer value for id. + * @param amountInCents Long value for amountInCents. + * @param endingBalanceInCents Long value for endingBalanceInCents. + * @param entryType ServiceCreditType value for entryType. + * @param memo String value for memo. + * @param invoiceUid String value for invoiceUid. + * @param remainingBalanceInCents Long value for remainingBalanceInCents. + * @param createdAt ZonedDateTime value for createdAt. + */ + + protected ServiceCredit1(Integer id, Long amountInCents, Long endingBalanceInCents, + ServiceCreditType entryType, String memo, OptionalNullable invoiceUid, + Long remainingBalanceInCents, ZonedDateTime createdAt) { + this.id = id; + this.amountInCents = amountInCents; + this.endingBalanceInCents = endingBalanceInCents; + this.entryType = entryType; + this.memo = memo; + this.invoiceUid = invoiceUid; + this.remainingBalanceInCents = remainingBalanceInCents; + 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 AmountInCents. + * The amount in cents of the entry + * @return Returns the Long + */ + @JsonGetter("amount_in_cents") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Long getAmountInCents() { + return amountInCents; + } + + /** + * Setter for AmountInCents. + * The amount in cents of the entry + * @param amountInCents Value for Long + */ + @JsonSetter("amount_in_cents") + public void setAmountInCents(Long amountInCents) { + this.amountInCents = amountInCents; + } + + /** + * Getter for EndingBalanceInCents. + * The new balance for the credit account + * @return Returns the Long + */ + @JsonGetter("ending_balance_in_cents") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Long getEndingBalanceInCents() { + return endingBalanceInCents; + } + + /** + * Setter for EndingBalanceInCents. + * The new balance for the credit account + * @param endingBalanceInCents Value for Long + */ + @JsonSetter("ending_balance_in_cents") + public void setEndingBalanceInCents(Long endingBalanceInCents) { + this.endingBalanceInCents = endingBalanceInCents; + } + + /** + * Getter for EntryType. + * The type of entry + * @return Returns the ServiceCreditType + */ + @JsonGetter("entry_type") + @JsonInclude(JsonInclude.Include.NON_NULL) + public ServiceCreditType getEntryType() { + return entryType; + } + + /** + * Setter for EntryType. + * The type of entry + * @param entryType Value for ServiceCreditType + */ + @JsonSetter("entry_type") + public void setEntryType(ServiceCreditType entryType) { + this.entryType = entryType; + } + + /** + * Getter for Memo. + * The memo attached to the entry + * @return Returns the String + */ + @JsonGetter("memo") + @JsonInclude(JsonInclude.Include.NON_NULL) + public String getMemo() { + return memo; + } + + /** + * Setter for Memo. + * The memo attached to the entry + * @param memo Value for String + */ + @JsonSetter("memo") + public void setMemo(String memo) { + this.memo = memo; + } + + /** + * Internal Getter for InvoiceUid. + * The invoice uid associated with the entry. Only present for debit entries + * @return Returns the Internal String + */ + @JsonGetter("invoice_uid") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetInvoiceUid() { + return this.invoiceUid; + } + + /** + * Getter for InvoiceUid. + * The invoice uid associated with the entry. Only present for debit entries + * @return Returns the String + */ + public String getInvoiceUid() { + return OptionalNullable.getFrom(invoiceUid); + } + + /** + * Setter for InvoiceUid. + * The invoice uid associated with the entry. Only present for debit entries + * @param invoiceUid Value for String + */ + @JsonSetter("invoice_uid") + public void setInvoiceUid(String invoiceUid) { + this.invoiceUid = OptionalNullable.of(invoiceUid); + } + + /** + * UnSetter for InvoiceUid. + * The invoice uid associated with the entry. Only present for debit entries + */ + public void unsetInvoiceUid() { + invoiceUid = null; + } + + /** + * Getter for RemainingBalanceInCents. + * The remaining balance for the entry + * @return Returns the Long + */ + @JsonGetter("remaining_balance_in_cents") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Long getRemainingBalanceInCents() { + return remainingBalanceInCents; + } + + /** + * Setter for RemainingBalanceInCents. + * The remaining balance for the entry + * @param remainingBalanceInCents Value for Long + */ + @JsonSetter("remaining_balance_in_cents") + public void setRemainingBalanceInCents(Long remainingBalanceInCents) { + this.remainingBalanceInCents = remainingBalanceInCents; + } + + /** + * Getter for CreatedAt. + * The date and time the entry was created + * @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. + * The date and time the entry was created + * @param createdAt Value for ZonedDateTime + */ + @JsonSetter("created_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setCreatedAt(ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + /** + * Converts this ServiceCredit1 into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ServiceCredit1 [" + "id=" + id + ", amountInCents=" + amountInCents + + ", endingBalanceInCents=" + endingBalanceInCents + ", entryType=" + entryType + + ", memo=" + memo + ", invoiceUid=" + invoiceUid + ", remainingBalanceInCents=" + + remainingBalanceInCents + ", createdAt=" + createdAt + ", additionalProperties=" + + getAdditionalProperties() + "]"; + } + + /** + * Builds a new {@link ServiceCredit1.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ServiceCredit1.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .amountInCents(getAmountInCents()) + .endingBalanceInCents(getEndingBalanceInCents()) + .entryType(getEntryType()) + .memo(getMemo()) + .remainingBalanceInCents(getRemainingBalanceInCents()) + .createdAt(getCreatedAt()); + builder.invoiceUid = internalGetInvoiceUid(); + return builder; + } + + /** + * Class to build instances of {@link ServiceCredit1}. + */ + public static class Builder { + private Integer id; + private Long amountInCents; + private Long endingBalanceInCents; + private ServiceCreditType entryType; + private String memo; + private OptionalNullable invoiceUid; + private Long remainingBalanceInCents; + 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 amountInCents. + * @param amountInCents Long value for amountInCents. + * @return Builder + */ + public Builder amountInCents(Long amountInCents) { + this.amountInCents = amountInCents; + return this; + } + + /** + * Setter for endingBalanceInCents. + * @param endingBalanceInCents Long value for endingBalanceInCents. + * @return Builder + */ + public Builder endingBalanceInCents(Long endingBalanceInCents) { + this.endingBalanceInCents = endingBalanceInCents; + return this; + } + + /** + * Setter for entryType. + * @param entryType ServiceCreditType value for entryType. + * @return Builder + */ + public Builder entryType(ServiceCreditType entryType) { + this.entryType = entryType; + return this; + } + + /** + * Setter for memo. + * @param memo String value for memo. + * @return Builder + */ + public Builder memo(String memo) { + this.memo = memo; + return this; + } + + /** + * Setter for invoiceUid. + * @param invoiceUid String value for invoiceUid. + * @return Builder + */ + public Builder invoiceUid(String invoiceUid) { + this.invoiceUid = OptionalNullable.of(invoiceUid); + return this; + } + + /** + * UnSetter for invoiceUid. + * @return Builder + */ + public Builder unsetInvoiceUid() { + invoiceUid = null; + return this; + } + + /** + * Setter for remainingBalanceInCents. + * @param remainingBalanceInCents Long value for remainingBalanceInCents. + * @return Builder + */ + public Builder remainingBalanceInCents(Long remainingBalanceInCents) { + this.remainingBalanceInCents = remainingBalanceInCents; + 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 ServiceCredit1} object using the set fields. + * @return {@link ServiceCredit1} + */ + public ServiceCredit1 build() { + return new ServiceCredit1(id, amountInCents, endingBalanceInCents, entryType, memo, + invoiceUid, remainingBalanceInCents, createdAt); + } + } +} diff --git a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupCreditCard.java b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupCreditCard.java index 0985ec54..cb50b49d 100644 --- a/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupCreditCard.java +++ b/src/main/java/com/maxio/advancedbilling/models/SubscriptionGroupCreditCard.java @@ -19,9 +19,6 @@ */ public class SubscriptionGroupCreditCard extends BaseModel { - private SubscriptionGroupCreditCardFullNumber fullNumber; - private SubscriptionGroupCreditCardExpirationMonth expirationMonth; - private SubscriptionGroupCreditCardExpirationYear expirationYear; private String chargifyToken; private String vaultToken; private CreditCardVault currentVault; @@ -34,6 +31,9 @@ public class SubscriptionGroupCreditCard private String billingState; private String billingZip; private String billingCountry; + private SubscriptionGroupCreditCardFullNumber fullNumber; + private SubscriptionGroupCreditCardExpirationMonth expirationMonth; + private SubscriptionGroupCreditCardExpirationYear expirationYear; private String lastFour; private CardType cardType; private String customerVaultToken; @@ -48,10 +48,6 @@ public SubscriptionGroupCreditCard() { /** * Initialization constructor. - * @param fullNumber SubscriptionGroupCreditCardFullNumber value for fullNumber. - * @param expirationMonth SubscriptionGroupCreditCardExpirationMonth value for - * expirationMonth. - * @param expirationYear SubscriptionGroupCreditCardExpirationYear value for expirationYear. * @param chargifyToken String value for chargifyToken. * @param vaultToken String value for vaultToken. * @param currentVault CreditCardVault value for currentVault. @@ -64,6 +60,10 @@ public SubscriptionGroupCreditCard() { * @param billingState String value for billingState. * @param billingZip String value for billingZip. * @param billingCountry String value for billingCountry. + * @param fullNumber SubscriptionGroupCreditCardFullNumber value for fullNumber. + * @param expirationMonth SubscriptionGroupCreditCardExpirationMonth value for + * expirationMonth. + * @param expirationYear SubscriptionGroupCreditCardExpirationYear value for expirationYear. * @param lastFour String value for lastFour. * @param cardType CardType value for cardType. * @param customerVaultToken String value for customerVaultToken. @@ -71,9 +71,6 @@ public SubscriptionGroupCreditCard() { * @param paymentType String value for paymentType. */ public SubscriptionGroupCreditCard( - SubscriptionGroupCreditCardFullNumber fullNumber, - SubscriptionGroupCreditCardExpirationMonth expirationMonth, - SubscriptionGroupCreditCardExpirationYear expirationYear, String chargifyToken, String vaultToken, CreditCardVault currentVault, @@ -86,14 +83,14 @@ public SubscriptionGroupCreditCard( String billingState, String billingZip, String billingCountry, + SubscriptionGroupCreditCardFullNumber fullNumber, + SubscriptionGroupCreditCardExpirationMonth expirationMonth, + SubscriptionGroupCreditCardExpirationYear expirationYear, String lastFour, CardType cardType, String customerVaultToken, String cvv, String paymentType) { - this.fullNumber = fullNumber; - this.expirationMonth = expirationMonth; - this.expirationYear = expirationYear; this.chargifyToken = chargifyToken; this.vaultToken = vaultToken; this.currentVault = currentVault; @@ -106,6 +103,9 @@ public SubscriptionGroupCreditCard( this.billingState = billingState; this.billingZip = billingZip; this.billingCountry = billingCountry; + this.fullNumber = fullNumber; + this.expirationMonth = expirationMonth; + this.expirationYear = expirationYear; this.lastFour = lastFour; this.cardType = cardType; this.customerVaultToken = customerVaultToken; @@ -113,63 +113,6 @@ public SubscriptionGroupCreditCard( this.paymentType = paymentType; } - /** - * Getter for FullNumber. - * @return Returns the SubscriptionGroupCreditCardFullNumber - */ - @JsonGetter("full_number") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SubscriptionGroupCreditCardFullNumber getFullNumber() { - return fullNumber; - } - - /** - * Setter for FullNumber. - * @param fullNumber Value for SubscriptionGroupCreditCardFullNumber - */ - @JsonSetter("full_number") - public void setFullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) { - this.fullNumber = fullNumber; - } - - /** - * Getter for ExpirationMonth. - * @return Returns the SubscriptionGroupCreditCardExpirationMonth - */ - @JsonGetter("expiration_month") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SubscriptionGroupCreditCardExpirationMonth getExpirationMonth() { - return expirationMonth; - } - - /** - * Setter for ExpirationMonth. - * @param expirationMonth Value for SubscriptionGroupCreditCardExpirationMonth - */ - @JsonSetter("expiration_month") - public void setExpirationMonth(SubscriptionGroupCreditCardExpirationMonth expirationMonth) { - this.expirationMonth = expirationMonth; - } - - /** - * Getter for ExpirationYear. - * @return Returns the SubscriptionGroupCreditCardExpirationYear - */ - @JsonGetter("expiration_year") - @JsonInclude(JsonInclude.Include.NON_NULL) - public SubscriptionGroupCreditCardExpirationYear getExpirationYear() { - return expirationYear; - } - - /** - * Setter for ExpirationYear. - * @param expirationYear Value for SubscriptionGroupCreditCardExpirationYear - */ - @JsonSetter("expiration_year") - public void setExpirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) { - this.expirationYear = expirationYear; - } - /** * Getter for ChargifyToken. * @return Returns the String @@ -402,6 +345,63 @@ public void setBillingCountry(String billingCountry) { this.billingCountry = billingCountry; } + /** + * Getter for FullNumber. + * @return Returns the SubscriptionGroupCreditCardFullNumber + */ + @JsonGetter("full_number") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SubscriptionGroupCreditCardFullNumber getFullNumber() { + return fullNumber; + } + + /** + * Setter for FullNumber. + * @param fullNumber Value for SubscriptionGroupCreditCardFullNumber + */ + @JsonSetter("full_number") + public void setFullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) { + this.fullNumber = fullNumber; + } + + /** + * Getter for ExpirationMonth. + * @return Returns the SubscriptionGroupCreditCardExpirationMonth + */ + @JsonGetter("expiration_month") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SubscriptionGroupCreditCardExpirationMonth getExpirationMonth() { + return expirationMonth; + } + + /** + * Setter for ExpirationMonth. + * @param expirationMonth Value for SubscriptionGroupCreditCardExpirationMonth + */ + @JsonSetter("expiration_month") + public void setExpirationMonth(SubscriptionGroupCreditCardExpirationMonth expirationMonth) { + this.expirationMonth = expirationMonth; + } + + /** + * Getter for ExpirationYear. + * @return Returns the SubscriptionGroupCreditCardExpirationYear + */ + @JsonGetter("expiration_year") + @JsonInclude(JsonInclude.Include.NON_NULL) + public SubscriptionGroupCreditCardExpirationYear getExpirationYear() { + return expirationYear; + } + + /** + * Setter for ExpirationYear. + * @param expirationYear Value for SubscriptionGroupCreditCardExpirationYear + */ + @JsonSetter("expiration_year") + public void setExpirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) { + this.expirationYear = expirationYear; + } + /** * Getter for LastFour. * @return Returns the String @@ -505,13 +505,13 @@ public void setPaymentType(String paymentType) { */ @Override public String toString() { - return "SubscriptionGroupCreditCard [" + "fullNumber=" + fullNumber + ", expirationMonth=" - + expirationMonth + ", expirationYear=" + expirationYear + ", chargifyToken=" - + chargifyToken + ", vaultToken=" + vaultToken + ", currentVault=" + currentVault - + ", gatewayHandle=" + gatewayHandle + ", firstName=" + firstName + ", lastName=" - + lastName + ", billingAddress=" + billingAddress + ", billingAddress2=" - + billingAddress2 + ", billingCity=" + billingCity + ", billingState=" - + billingState + ", billingZip=" + billingZip + ", billingCountry=" + billingCountry + return "SubscriptionGroupCreditCard [" + "chargifyToken=" + chargifyToken + ", vaultToken=" + + vaultToken + ", currentVault=" + currentVault + ", gatewayHandle=" + gatewayHandle + + ", firstName=" + firstName + ", lastName=" + lastName + ", billingAddress=" + + billingAddress + ", billingAddress2=" + billingAddress2 + ", billingCity=" + + billingCity + ", billingState=" + billingState + ", billingZip=" + billingZip + + ", billingCountry=" + billingCountry + ", fullNumber=" + fullNumber + + ", expirationMonth=" + expirationMonth + ", expirationYear=" + expirationYear + ", lastFour=" + lastFour + ", cardType=" + cardType + ", customerVaultToken=" + customerVaultToken + ", cvv=" + cvv + ", paymentType=" + paymentType + ", additionalProperties=" + getAdditionalProperties() + "]"; @@ -524,9 +524,6 @@ public String toString() { */ public Builder toBuilder() { Builder builder = new Builder() - .fullNumber(getFullNumber()) - .expirationMonth(getExpirationMonth()) - .expirationYear(getExpirationYear()) .chargifyToken(getChargifyToken()) .vaultToken(getVaultToken()) .currentVault(getCurrentVault()) @@ -539,6 +536,9 @@ public Builder toBuilder() { .billingState(getBillingState()) .billingZip(getBillingZip()) .billingCountry(getBillingCountry()) + .fullNumber(getFullNumber()) + .expirationMonth(getExpirationMonth()) + .expirationYear(getExpirationYear()) .lastFour(getLastFour()) .cardType(getCardType()) .customerVaultToken(getCustomerVaultToken()) @@ -551,9 +551,6 @@ public Builder toBuilder() { * Class to build instances of {@link SubscriptionGroupCreditCard}. */ public static class Builder { - private SubscriptionGroupCreditCardFullNumber fullNumber; - private SubscriptionGroupCreditCardExpirationMonth expirationMonth; - private SubscriptionGroupCreditCardExpirationYear expirationYear; private String chargifyToken; private String vaultToken; private CreditCardVault currentVault; @@ -566,6 +563,9 @@ public static class Builder { private String billingState; private String billingZip; private String billingCountry; + private SubscriptionGroupCreditCardFullNumber fullNumber; + private SubscriptionGroupCreditCardExpirationMonth expirationMonth; + private SubscriptionGroupCreditCardExpirationYear expirationYear; private String lastFour; private CardType cardType; private String customerVaultToken; @@ -574,39 +574,6 @@ public static class Builder { - /** - * Setter for fullNumber. - * @param fullNumber SubscriptionGroupCreditCardFullNumber value for fullNumber. - * @return Builder - */ - public Builder fullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) { - this.fullNumber = fullNumber; - return this; - } - - /** - * Setter for expirationMonth. - * @param expirationMonth SubscriptionGroupCreditCardExpirationMonth value for - * expirationMonth. - * @return Builder - */ - public Builder expirationMonth( - SubscriptionGroupCreditCardExpirationMonth expirationMonth) { - this.expirationMonth = expirationMonth; - return this; - } - - /** - * Setter for expirationYear. - * @param expirationYear SubscriptionGroupCreditCardExpirationYear value for - * expirationYear. - * @return Builder - */ - public Builder expirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) { - this.expirationYear = expirationYear; - return this; - } - /** * Setter for chargifyToken. * @param chargifyToken String value for chargifyToken. @@ -727,6 +694,39 @@ public Builder billingCountry(String billingCountry) { return this; } + /** + * Setter for fullNumber. + * @param fullNumber SubscriptionGroupCreditCardFullNumber value for fullNumber. + * @return Builder + */ + public Builder fullNumber(SubscriptionGroupCreditCardFullNumber fullNumber) { + this.fullNumber = fullNumber; + return this; + } + + /** + * Setter for expirationMonth. + * @param expirationMonth SubscriptionGroupCreditCardExpirationMonth value for + * expirationMonth. + * @return Builder + */ + public Builder expirationMonth( + SubscriptionGroupCreditCardExpirationMonth expirationMonth) { + this.expirationMonth = expirationMonth; + return this; + } + + /** + * Setter for expirationYear. + * @param expirationYear SubscriptionGroupCreditCardExpirationYear value for + * expirationYear. + * @return Builder + */ + public Builder expirationYear(SubscriptionGroupCreditCardExpirationYear expirationYear) { + this.expirationYear = expirationYear; + return this; + } + /** * Setter for lastFour. * @param lastFour String value for lastFour. @@ -782,10 +782,11 @@ public Builder paymentType(String paymentType) { * @return {@link SubscriptionGroupCreditCard} */ public SubscriptionGroupCreditCard build() { - return new SubscriptionGroupCreditCard(fullNumber, expirationMonth, expirationYear, - chargifyToken, vaultToken, currentVault, gatewayHandle, firstName, lastName, - billingAddress, billingAddress2, billingCity, billingState, billingZip, - billingCountry, lastFour, cardType, customerVaultToken, cvv, paymentType); + return new SubscriptionGroupCreditCard(chargifyToken, vaultToken, currentVault, + gatewayHandle, firstName, lastName, billingAddress, billingAddress2, + billingCity, billingState, billingZip, billingCountry, fullNumber, + expirationMonth, expirationYear, lastFour, cardType, customerVaultToken, cvv, + paymentType); } } } diff --git a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java index 6e436c4d..96d337e1 100644 --- a/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java +++ b/src/main/java/com/maxio/advancedbilling/models/UpdateSubscription.java @@ -31,7 +31,10 @@ public class UpdateSubscription private String nextProductId; private String nextProductPricePointId; private UpdateSubscriptionSnapDay snapDay; + private ZonedDateTime initialBillingAt; + private Boolean deferSignup; private ZonedDateTime nextBillingAt; + private ZonedDateTime expiresAt; private String paymentCollectionMethod; private Boolean receivesInvoiceEmails; private UpdateSubscriptionNetTerms netTerms; @@ -48,6 +51,7 @@ public class UpdateSubscription * Default constructor. */ public UpdateSubscription() { + deferSignup = false; } /** @@ -59,7 +63,10 @@ public UpdateSubscription() { * @param nextProductId String value for nextProductId. * @param nextProductPricePointId String value for nextProductPricePointId. * @param snapDay UpdateSubscriptionSnapDay value for snapDay. + * @param initialBillingAt ZonedDateTime value for initialBillingAt. + * @param deferSignup Boolean value for deferSignup. * @param nextBillingAt ZonedDateTime value for nextBillingAt. + * @param expiresAt ZonedDateTime value for expiresAt. * @param paymentCollectionMethod String value for paymentCollectionMethod. * @param receivesInvoiceEmails Boolean value for receivesInvoiceEmails. * @param netTerms UpdateSubscriptionNetTerms value for netTerms. @@ -81,7 +88,10 @@ public UpdateSubscription( String nextProductId, String nextProductPricePointId, UpdateSubscriptionSnapDay snapDay, + ZonedDateTime initialBillingAt, + Boolean deferSignup, ZonedDateTime nextBillingAt, + ZonedDateTime expiresAt, String paymentCollectionMethod, Boolean receivesInvoiceEmails, UpdateSubscriptionNetTerms netTerms, @@ -100,7 +110,10 @@ public UpdateSubscription( this.nextProductId = nextProductId; this.nextProductPricePointId = nextProductPricePointId; this.snapDay = snapDay; + this.initialBillingAt = initialBillingAt; + this.deferSignup = deferSignup; this.nextBillingAt = nextBillingAt; + this.expiresAt = expiresAt; this.paymentCollectionMethod = paymentCollectionMethod; this.receivesInvoiceEmails = receivesInvoiceEmails; this.netTerms = netTerms; @@ -124,7 +137,10 @@ public UpdateSubscription( * @param nextProductId String value for nextProductId. * @param nextProductPricePointId String value for nextProductPricePointId. * @param snapDay UpdateSubscriptionSnapDay value for snapDay. + * @param initialBillingAt ZonedDateTime value for initialBillingAt. + * @param deferSignup Boolean value for deferSignup. * @param nextBillingAt ZonedDateTime value for nextBillingAt. + * @param expiresAt ZonedDateTime value for expiresAt. * @param paymentCollectionMethod String value for paymentCollectionMethod. * @param receivesInvoiceEmails Boolean value for receivesInvoiceEmails. * @param netTerms UpdateSubscriptionNetTerms value for netTerms. @@ -142,11 +158,11 @@ public UpdateSubscription( protected UpdateSubscription(CreditCardAttributes creditCardAttributes, String productHandle, Integer productId, Boolean productChangeDelayed, String nextProductId, String nextProductPricePointId, UpdateSubscriptionSnapDay snapDay, - ZonedDateTime nextBillingAt, String paymentCollectionMethod, - Boolean receivesInvoiceEmails, UpdateSubscriptionNetTerms netTerms, - Integer storedCredentialTransactionId, String reference, - SubscriptionCustomPrice customPrice, List components, - Boolean dunningCommunicationDelayEnabled, + ZonedDateTime initialBillingAt, Boolean deferSignup, ZonedDateTime nextBillingAt, + ZonedDateTime expiresAt, String paymentCollectionMethod, Boolean receivesInvoiceEmails, + UpdateSubscriptionNetTerms netTerms, Integer storedCredentialTransactionId, + String reference, SubscriptionCustomPrice customPrice, + List components, Boolean dunningCommunicationDelayEnabled, OptionalNullable dunningCommunicationDelayTimeZone, Integer productPricePointId, String productPricePointHandle) { this.creditCardAttributes = creditCardAttributes; @@ -156,7 +172,10 @@ protected UpdateSubscription(CreditCardAttributes creditCardAttributes, String p this.nextProductId = nextProductId; this.nextProductPricePointId = nextProductPricePointId; this.snapDay = snapDay; + this.initialBillingAt = initialBillingAt; + this.deferSignup = deferSignup; this.nextBillingAt = nextBillingAt; + this.expiresAt = expiresAt; this.paymentCollectionMethod = paymentCollectionMethod; this.receivesInvoiceEmails = receivesInvoiceEmails; this.netTerms = netTerms; @@ -313,6 +332,84 @@ public void setSnapDay(UpdateSubscriptionSnapDay snapDay) { this.snapDay = snapDay; } + /** + * Getter for InitialBillingAt. + * (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting + * Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves + * like any other. It can be canceled, allocated to, or have its billing date changed. etc. When + * the `initial_billing_at` date hits, the subscription will transition to the expected state. + * If the product has a trial, the subscription will enter a trial, otherwise it will go active. + * Setup fees will be respected either before or after the trial, as configured on the price + * point. If the payment is due at the initial_billing_at and it fails the subscription will be + * immediately canceled. You can omit the initial_billing_at date to activate the subscription + * immediately. See the [subscription + * import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) + * documentation for more information about Date/Time formats. + * @return Returns the ZonedDateTime + */ + @JsonGetter("initial_billing_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getInitialBillingAt() { + return initialBillingAt; + } + + /** + * Setter for InitialBillingAt. + * (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting + * Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves + * like any other. It can be canceled, allocated to, or have its billing date changed. etc. When + * the `initial_billing_at` date hits, the subscription will transition to the expected state. + * If the product has a trial, the subscription will enter a trial, otherwise it will go active. + * Setup fees will be respected either before or after the trial, as configured on the price + * point. If the payment is due at the initial_billing_at and it fails the subscription will be + * immediately canceled. You can omit the initial_billing_at date to activate the subscription + * immediately. See the [subscription + * import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) + * documentation for more information about Date/Time formats. + * @param initialBillingAt Value for ZonedDateTime + */ + @JsonSetter("initial_billing_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setInitialBillingAt(ZonedDateTime initialBillingAt) { + this.initialBillingAt = initialBillingAt; + } + + /** + * Getter for DeferSignup. + * (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to + * Awaiting Signup Date. Use this when you want to update a subscription that has an unknown + * initial billing date. When the first billing date is known, update a subscription to set the + * `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled + * initial billing date. You can omit the initial_billing_at date to activate the subscription + * immediately. See [Subscription + * States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) + * for more information. + * @return Returns the Boolean + */ + @JsonGetter("defer_signup") + @JsonInclude(JsonInclude.Include.NON_NULL) + public Boolean getDeferSignup() { + return deferSignup; + } + + /** + * Setter for DeferSignup. + * (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to + * Awaiting Signup Date. Use this when you want to update a subscription that has an unknown + * initial billing date. When the first billing date is known, update a subscription to set the + * `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled + * initial billing date. You can omit the initial_billing_at date to activate the subscription + * immediately. See [Subscription + * States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) + * for more information. + * @param deferSignup Value for Boolean + */ + @JsonSetter("defer_signup") + public void setDeferSignup(Boolean deferSignup) { + this.deferSignup = deferSignup; + } + /** * Getter for NextBillingAt. * @return Returns the ZonedDateTime @@ -334,6 +431,31 @@ public void setNextBillingAt(ZonedDateTime nextBillingAt) { this.nextBillingAt = nextBillingAt; } + /** + * Getter for ExpiresAt. + * Timestamp giving the expiration date of this subscription (if any). You may manually change + * the expiration date at any point during a subscription period. + * @return Returns the ZonedDateTime + */ + @JsonGetter("expires_at") + @JsonInclude(JsonInclude.Include.NON_NULL) + @JsonSerialize(using = DateTimeHelper.Rfc8601DateTimeSerializer.class) + public ZonedDateTime getExpiresAt() { + return expiresAt; + } + + /** + * Setter for ExpiresAt. + * Timestamp giving the expiration date of this subscription (if any). You may manually change + * the expiration date at any point during a subscription period. + * @param expiresAt Value for ZonedDateTime + */ + @JsonSetter("expires_at") + @JsonDeserialize(using = DateTimeHelper.Rfc8601DateTimeDeserializer.class) + public void setExpiresAt(ZonedDateTime expiresAt) { + this.expiresAt = expiresAt; + } + /** * Getter for PaymentCollectionMethod. * @return Returns the String @@ -589,12 +711,13 @@ public String toString() { + ", productHandle=" + productHandle + ", productId=" + productId + ", productChangeDelayed=" + productChangeDelayed + ", nextProductId=" + nextProductId + ", nextProductPricePointId=" + nextProductPricePointId - + ", snapDay=" + snapDay + ", nextBillingAt=" + nextBillingAt - + ", paymentCollectionMethod=" + paymentCollectionMethod - + ", receivesInvoiceEmails=" + receivesInvoiceEmails + ", netTerms=" + netTerms - + ", storedCredentialTransactionId=" + storedCredentialTransactionId - + ", reference=" + reference + ", customPrice=" + customPrice + ", components=" - + components + ", dunningCommunicationDelayEnabled=" + + ", snapDay=" + snapDay + ", initialBillingAt=" + initialBillingAt + + ", deferSignup=" + deferSignup + ", nextBillingAt=" + nextBillingAt + + ", expiresAt=" + expiresAt + ", paymentCollectionMethod=" + + paymentCollectionMethod + ", receivesInvoiceEmails=" + receivesInvoiceEmails + + ", netTerms=" + netTerms + ", storedCredentialTransactionId=" + + storedCredentialTransactionId + ", reference=" + reference + ", customPrice=" + + customPrice + ", components=" + components + ", dunningCommunicationDelayEnabled=" + dunningCommunicationDelayEnabled + ", dunningCommunicationDelayTimeZone=" + dunningCommunicationDelayTimeZone + ", productPricePointId=" + productPricePointId + ", productPricePointHandle=" + productPricePointHandle + ", additionalProperties=" @@ -615,7 +738,10 @@ public Builder toBuilder() { .nextProductId(getNextProductId()) .nextProductPricePointId(getNextProductPricePointId()) .snapDay(getSnapDay()) + .initialBillingAt(getInitialBillingAt()) + .deferSignup(getDeferSignup()) .nextBillingAt(getNextBillingAt()) + .expiresAt(getExpiresAt()) .paymentCollectionMethod(getPaymentCollectionMethod()) .receivesInvoiceEmails(getReceivesInvoiceEmails()) .netTerms(getNetTerms()) @@ -641,7 +767,10 @@ public static class Builder { private String nextProductId; private String nextProductPricePointId; private UpdateSubscriptionSnapDay snapDay; + private ZonedDateTime initialBillingAt; + private Boolean deferSignup = false; private ZonedDateTime nextBillingAt; + private ZonedDateTime expiresAt; private String paymentCollectionMethod; private Boolean receivesInvoiceEmails; private UpdateSubscriptionNetTerms netTerms; @@ -726,6 +855,26 @@ public Builder snapDay(UpdateSubscriptionSnapDay snapDay) { return this; } + /** + * Setter for initialBillingAt. + * @param initialBillingAt ZonedDateTime value for initialBillingAt. + * @return Builder + */ + public Builder initialBillingAt(ZonedDateTime initialBillingAt) { + this.initialBillingAt = initialBillingAt; + return this; + } + + /** + * Setter for deferSignup. + * @param deferSignup Boolean value for deferSignup. + * @return Builder + */ + public Builder deferSignup(Boolean deferSignup) { + this.deferSignup = deferSignup; + return this; + } + /** * Setter for nextBillingAt. * @param nextBillingAt ZonedDateTime value for nextBillingAt. @@ -736,6 +885,16 @@ public Builder nextBillingAt(ZonedDateTime nextBillingAt) { return this; } + /** + * Setter for expiresAt. + * @param expiresAt ZonedDateTime value for expiresAt. + * @return Builder + */ + public Builder expiresAt(ZonedDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + /** * Setter for paymentCollectionMethod. * @param paymentCollectionMethod String value for paymentCollectionMethod. @@ -867,7 +1026,8 @@ public Builder productPricePointHandle(String productPricePointHandle) { public UpdateSubscription build() { return new UpdateSubscription(creditCardAttributes, productHandle, productId, productChangeDelayed, nextProductId, nextProductPricePointId, snapDay, - nextBillingAt, paymentCollectionMethod, receivesInvoiceEmails, netTerms, + initialBillingAt, deferSignup, nextBillingAt, expiresAt, + paymentCollectionMethod, receivesInvoiceEmails, netTerms, storedCredentialTransactionId, reference, customPrice, components, dunningCommunicationDelayEnabled, dunningCommunicationDelayTimeZone, productPricePointId, productPricePointHandle); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerIssueTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerIssueTest.java index 7aeebd5b..7efdb636 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerIssueTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerIssueTest.java @@ -103,7 +103,7 @@ void shouldReturn201onIssueAdvanceInvoice() throws IOException, ApiException { assertThat(invoice.getRole()).isEqualTo(InvoiceRole.RENEWAL); assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(TestFixtures.INVOICE_SELLER); assertThat(invoice.getMemo()).isEqualTo("Thanks for your business! If you have any questions, please contact your account manager."); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerReadTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerReadTest.java index 8d79aa89..5b348551 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerReadTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerReadTest.java @@ -102,7 +102,7 @@ void shouldReturn200onReadAdvanceInvoice() throws IOException, ApiException { assertThat(invoice.getRole()).isEqualTo(InvoiceRole.RENEWAL); assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(TestFixtures.INVOICE_SELLER); assertThat(invoice.getMemo()).isEqualTo("Thanks for your business! If you have any questions, please contact your account manager."); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerVoidTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerVoidTest.java index 6bc9bbac..66a7e48d 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerVoidTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/advanceinvoice/AdvanceInvoiceControllerVoidTest.java @@ -110,7 +110,7 @@ void shouldReturn201onVoidAdvanceInvoice() throws IOException, ApiException { assertThat(invoice.getRole()).isEqualTo(InvoiceRole.RENEWAL); assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(TestFixtures.INVOICE_SELLER); assertThat(invoice.getMemo()).isEqualTo("Thanks for your business! If you have any questions, please contact your account manager."); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/coupons/CouponsControllerValidateCouponTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/coupons/CouponsControllerValidateCouponTest.java index 3319d80d..eb6debef 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/coupons/CouponsControllerValidateCouponTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/coupons/CouponsControllerValidateCouponTest.java @@ -33,7 +33,7 @@ void shouldReturn404WhenCouponDoesNotExist() { assertThatSingleStringErrorResponse(() -> COUPONS_CONTROLLER.validateCoupon("123", productFamilyId)) .hasErrorCode(404) .hasErrorMessage("Coupon code could not be found.") - .hasMessage("Not Found"); + .hasMessage("Not Found: '{errors:Coupon code could not be found.}'"); } @Test @@ -44,7 +44,7 @@ void shouldReturn404WhenCouponIsArchived() throws IOException, ApiException { assertThatSingleStringErrorResponse(() -> COUPONS_CONTROLLER.validateCoupon(coupon2.getCode(), productFamilyId)) .hasErrorCode(404) .hasErrorMessage("That coupon is no longer active.") - .hasMessage("Not Found"); + .hasMessage("Not Found: '{errors:That coupon is no longer active.}'"); } @Test diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java index 5d0218c4..640e9965 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerCreateTest.java @@ -148,7 +148,7 @@ void shouldCreateInvoice() throws IOException, ApiException { InvoiceSeller invoiceSeller = invoice.getSeller(); assertThat(invoiceSeller) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); InvoiceCustomer invoiceCustomer = invoice.getCustomer(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java index 439b9ca2..81f94200 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerIssueTest.java @@ -158,7 +158,7 @@ void shouldIssuePendingInvoice() throws IOException, ApiException { InvoiceSeller invoiceSeller = issuedInvoice.getSeller(); assertThat(invoiceSeller) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); InvoiceCustomer invoiceCustomer = issuedInvoice.getCustomer(); 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 59ae0237..cfee53f3 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 @@ -430,7 +430,7 @@ void assertInvoiceInEvent(Invoice eventInvoice, Invoice invoice) { "dueAmount", "id", "lineItems", "netTerms", "paidAmount", "paidDate", "payer", "payments", "previousBalanceData", "publicUrl", "recipientEmails", "refundAmount", "refunds", "status", "transactionTime", "updatedAt", "publicUrlExpiresOn", "additionalProperties", - "billingAddress.additionalProperties") + "billingAddress.additionalProperties", "customer.additionalProperties") .isEqualTo(invoice); assertThat(eventInvoice.getCreatedAt()).isNotNull(); assertThat(eventInvoice.getUpdatedAt()).isNotNull(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoicesTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoicesTest.java index 4555b8af..69ab1985 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoicesTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerListInvoicesTest.java @@ -242,7 +242,7 @@ void shouldListInvoicesUsingSubscriptionId() throws IOException, ApiException { assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); InvoiceCustomer invoiceCustomer = invoice.getCustomer(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java index dceb178b..d64572a3 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadCreditNoteTest.java @@ -126,7 +126,7 @@ void shouldReadCreditNotes() throws IOException, ApiException, InterruptedExcept .isEqualTo(new OriginInvoice(paidInvoice.getUid(), paidInvoice.getNumber())); assertThat(creditNote.getMemo()).isEqualTo("Special refund"); assertThat(creditNote.getSeller()).usingRecursiveComparison() - .ignoringFields("address.additionalProperties").isEqualTo(INVOICE_SELLER); + .ignoringFields("address.additionalProperties", "additionalProperties").isEqualTo(INVOICE_SELLER); InvoiceCustomer creditNoteCustomer = creditNote.getCustomer(); assertThat(creditNoteCustomer.getChargifyId()).isEqualTo(customer.getId()); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadInvoiceTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadInvoiceTest.java index f1c2e6cc..7a73ee51 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadInvoiceTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerReadInvoiceTest.java @@ -147,7 +147,7 @@ void shouldReadInvoice() throws IOException, ApiException { assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); InvoiceCustomer invoiceCustomer = invoice.getCustomer(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerRecordPaymentForInvoiceTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerRecordPaymentForInvoiceTest.java index 1b8e78ba..986ae62c 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerRecordPaymentForInvoiceTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/invoices/InvoicesControllerRecordPaymentForInvoiceTest.java @@ -140,7 +140,7 @@ void shouldRecordPaymentUsingExistingPaymentProfile() throws IOException, ApiExc assertThat(invoice.getSeller()) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); InvoiceCustomer invoiceCustomer = invoice.getCustomer(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/offers/OffersControllerCreateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/offers/OffersControllerCreateTest.java index fc4ad0e2..95d6600e 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/offers/OffersControllerCreateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/offers/OffersControllerCreateTest.java @@ -146,7 +146,7 @@ void shouldCreateOfferWithDefaults() throws ApiException, IOException { CurrencyPrice meteredPrice = meteredItem.getCurrencyPrices().get(0); assertThat(meteredPrice.getId()).isNull(); assertThat(meteredPrice.getCurrency()).isEqualTo("EUR"); - assertThat(meteredPrice.getPrice()).isCloseTo(10, Percentage.withPercentage(10)); + assertThat(meteredPrice.getPrice()).isCloseTo(8, Percentage.withPercentage(10)); assertThat(meteredPrice.getFormattedPrice()) .isNotBlank() .startsWith("€"); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/paymentprofiles/PaymentProfilesControllerReadTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/paymentprofiles/PaymentProfilesControllerReadTest.java index b04496a3..19901808 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/paymentprofiles/PaymentProfilesControllerReadTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/paymentprofiles/PaymentProfilesControllerReadTest.java @@ -82,7 +82,7 @@ void shouldReadCreditCardPaymentProfile() throws IOException, ApiException { .match(new PaymentProfileResponsePaymentProfileGetter()) ) .usingRecursiveComparison() - .ignoringFields("additionalProperties") + .ignoringFields("additionalProperties", "createdAt", "updatedAt") .isEqualTo(new CreditCardPaymentProfile.Builder() .maskedCardNumber("XXXX-XXXX-XXXX-1111") .id(creditCardPaymentProfile.getId()) @@ -118,7 +118,7 @@ void shouldReadBankAccountPaymentProfile() throws IOException, ApiException { .match(new PaymentProfileResponsePaymentProfileGetter()) ) .usingRecursiveComparison() - .ignoringFields("additionalProperties") + .ignoringFields("additionalProperties", "createdAt", "updatedAt") .isEqualTo(new BankAccountPaymentProfile.Builder() .id(bankAccountPaymentProfile.getId()) .firstName(customer.getFirstName()) diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java index a71063ae..6a49fadb 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesControllerSubscriptionGroupsTest.java @@ -141,10 +141,9 @@ void shouldListSubscriptionGroupProformaInvoices() throws IOException, ApiExcept assertThat(proformaInvoice.getPublicUrl()).isNotNull().isNotBlank(); assertThat(proformaInvoice.getRole()).isEqualTo(ProformaInvoiceRole.PROFORMA_ADHOC); InvoiceSeller invoiceSeller = proformaInvoice.getSeller(); - assertThat(invoiceSeller.getAdditionalProperties()).isEmpty(); assertThat(invoiceSeller) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); assertThat(proformaInvoice.getSequenceNumber()).isNotNull(); assertThat(proformaInvoice.getSiteId()).isNotNull(); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java index 642544ba..b0e257dd 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/proformainvoices/ProformaInvoicesTestBase.java @@ -239,10 +239,9 @@ void assertProformaInvoice(Customer customer, assertThat(proformaInvoice.getRole()).isEqualTo(ProformaInvoiceRole.PROFORMA_ADHOC); InvoiceSeller invoiceSeller = proformaInvoice.getSeller(); - assertThat(invoiceSeller.getAdditionalProperties()).isEmpty(); assertThat(invoiceSeller) .usingRecursiveComparison() - .ignoringFields("address.additionalProperties") + .ignoringFields("address.additionalProperties", "additionalProperties") .isEqualTo(INVOICE_SELLER); assertThat(proformaInvoice.getSiteId()).isNotNull(); assertThat(proformaInvoice.getStatus()).isEqualTo(DRAFT); diff --git a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerActivateTest.java b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerActivateTest.java index 0c6be92e..768e9b25 100644 --- a/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerActivateTest.java +++ b/tests/src/test/java/com/maxio/advancedbilling/controllers/subscriptions/SubscriptionsControllerActivateTest.java @@ -72,7 +72,7 @@ void shouldReturn400WhenSubscriptionIsAlreadyActive() throws IOException, ApiExc .activateSubscription(activeSubscription.getId(), new ActivateSubscriptionRequest()) ) .isBadRequest() - .hasErrorMap(Map.of("base", List.of("Only trialing or awaiting signup subscriptions can be activated immediately."))); + .hasErrorMap(Map.of("base", List.of("Only trialing, awaiting signup or awaiting signup date subscriptions can be activated immediately."))); } @ParameterizedTest