diff --git a/src/main/java/com/xero/api/client/AccountDataApi.java b/src/main/java/com/xero/api/client/AccountDataApi.java
new file mode 100644
index 00000000..61d4e41e
--- /dev/null
+++ b/src/main/java/com/xero/api/client/AccountDataApi.java
@@ -0,0 +1,1422 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * The version of the OpenAPI document: 20.0.1
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.api.client;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.google.api.client.auth.oauth2.BearerToken;
+import com.google.api.client.auth.oauth2.Credential;
+import com.google.api.client.http.GenericUrl;
+import com.google.api.client.http.HttpContent;
+import com.google.api.client.http.HttpHeaders;
+import com.google.api.client.http.HttpMethods;
+import com.google.api.client.http.HttpRequestFactory;
+import com.google.api.client.http.HttpResponse;
+import com.google.api.client.http.HttpResponseException;
+import com.google.api.client.http.HttpTransport;
+import com.xero.api.ApiClient;
+import com.xero.api.XeroApiExceptionHandler;
+import com.xero.models.accountdata.AccountBalancesResponse;
+import com.xero.models.accountdata.AccountMovementsResponse;
+import com.xero.models.accountdata.AccountTransactionsResponse;
+import jakarta.ws.rs.core.UriBuilder;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.threeten.bp.LocalDate;
+
+/** AccountDataApi has methods for interacting with all endpoints in the API set */
+public class AccountDataApi {
+ private ApiClient apiClient;
+ private static AccountDataApi instance = null;
+ private String userAgent = "Default";
+ private String version = "18.4.0";
+ static final Logger logger = LoggerFactory.getLogger(AccountDataApi.class);
+
+ /** AccountDataApi */
+ public AccountDataApi() {
+ this(new ApiClient());
+ }
+
+ /**
+ * AccountDataApi getInstance
+ *
+ * @param apiClient ApiClient pass into the new instance of this class
+ * @return instance of this class
+ */
+ public static AccountDataApi getInstance(ApiClient apiClient) {
+ if (instance == null) {
+ instance = new AccountDataApi(apiClient);
+ }
+ return instance;
+ }
+
+ /**
+ * AccountDataApi
+ *
+ * @param apiClient ApiClient pass into the new instance of this class
+ */
+ public AccountDataApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * get ApiClient
+ *
+ * @return apiClient the current ApiClient
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * set ApiClient
+ *
+ * @param apiClient ApiClient pass into the new instance of this class
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * set user agent
+ *
+ * @param userAgent string to override the user agent
+ */
+ public void setUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ }
+
+ /**
+ * get user agent
+ *
+ * @return String of user agent
+ */
+ public String getUserAgent() {
+ return this.userAgent + " [Xero-Java-" + this.version + "]";
+ }
+
+ /**
+ * Get the balance of each general ledger account as at a given date Retrieves account balances as
+ * at `date`, optionally including balances for one or more prior comparison periods,
+ * and optionally filtered by account class, type, account IDs, system account code, or tracking
+ * item. ### Filtering - Filter by `class`, `type`, `accountIds`,
+ * and/or `systemAccountCodes`. These can be combined freely — when more than one is
+ * supplied, the server returns only accounts that match **all** of the supplied filters (an
+ * intersection, not a union). - `type` values are matched case-sensitively, so use
+ * uppercase (for example `BANK`). Inventory asset accounts are reported as, and can
+ * only be filtered by, `INVENTORY`; filtering by their underlying account type does not
+ * match them. - `trackingItemIds` and `unassignedToTrackingCategoryIds` can
+ * be used independently of the filters above to further narrow which accounts are returned. ###
+ * Comparison periods - Supplying `comparisonPeriodCount` together with
+ * `comparisonPeriodSize` returns additional balances at prior points in time, in
+ * addition to the balance at `date`. - The n-th comparison date is `date`
+ * shifted back n times `comparisonPeriodSize`. For `MONTH`,
+ * `QUARTER`, and `YEAR` sizes, a `date` that falls on the last day
+ * of its month keeps landing on the last day of the shifted month (so comparisons across February
+ * behave correctly). - `comparisonPeriodCount` and `comparisonPeriodSize`
+ * must be supplied together. ### Bank accounts Bank account data is only available to users with
+ * bank account view permission for the organisation. - If the request would include bank accounts
+ * and the user lacks this permission, it is rejected with `403 Forbidden`. A request is
+ * treated as including bank accounts when it has no account filters, filters by all five
+ * `class` values and nothing else, includes `BANK` in `type`, or
+ * lists a bank account in `accountIds`. - For other requests (for example
+ * `class=ASSET`), bank accounts are silently excluded from the response for users
+ * without this permission, instead of the request being rejected. ### Results Only accounts with
+ * a non-zero balance at a given date are returned; accounts and comparison dates with a net-zero
+ * balance are omitted, so the response can be empty. ### Pagination This endpoint does not
+ * paginate — all matching account balances are returned in a single response.
+ *
+ * 200 - Success - returns account balances as at `date`.
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required parameter (`accountingBasis`, `date`) is missing, or a value is
+ * not a valid date or enum value - `comparisonPeriodCount` supplied without
+ * `comparisonPeriodSize` (or vice versa) - `comparisonPeriodCount` outside
+ * the 1-100 range - More than 50 `accountIds` specified - An empty value in
+ * `type` or `systemAccountCodes` - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account balances, or when the request would include bank accounts and
+ * the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` or
+ * `systemAccountCodes` do not exist for this organisation, or the organisation was not
+ * found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param accountingBasis Accounting basis for the balance calculation.
+ * @param date The date to calculate account balances as at, in ISO 8601 format (YYYY-MM-DD).
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param comparisonPeriodCount Number of additional comparison balances to return, each one
+ * further back in time than the last. Must be supplied together with
+ * `comparisonPeriodSize`. - **Minimum**: 1 - **Maximum**: 100
+ * @param comparisonPeriodSize The unit of time each comparison period steps back by. Must be
+ * supplied together with `comparisonPeriodCount`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. - **Maximum**: 50 account IDs - **Validation**: Returns 404 if any ID does not
+ * exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Can be combined with other filters.
+ * @param trackingItemIds Filter to accounts assigned to any of the given tracking item IDs.
+ * @param unassignedToTrackingCategoryIds Filter to accounts that are not assigned to any tracking
+ * option within the given tracking category IDs.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return AccountBalancesResponse
+ * @throws IOException if an error occurs while attempting to invoke the API *
+ */
+ public AccountBalancesResponse getAccountBalances(
+ String accessToken,
+ String accountingBasis,
+ LocalDate date,
+ UUID xeroTenantId,
+ Integer comparisonPeriodCount,
+ String comparisonPeriodSize,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List trackingItemIds,
+ List unassignedToTrackingCategoryIds)
+ throws IOException {
+ try {
+ TypeReference typeRef =
+ new TypeReference() {};
+ HttpResponse response =
+ getAccountBalancesForHttpResponse(
+ accessToken,
+ accountingBasis,
+ date,
+ xeroTenantId,
+ comparisonPeriodCount,
+ comparisonPeriodSize,
+ accountIds,
+ propertyClass,
+ type,
+ systemAccountCodes,
+ trackingItemIds,
+ unassignedToTrackingCategoryIds);
+ return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
+ } catch (HttpResponseException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "------------------ HttpResponseException "
+ + e.getStatusCode()
+ + " : getAccountBalances -------------------");
+ logger.debug(e.toString());
+ }
+ XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
+ handler.execute(e);
+ } catch (IOException ioe) {
+ throw ioe;
+ }
+ return null;
+ }
+
+ /**
+ * Get the balance of each general ledger account as at a given date Retrieves account balances as
+ * at `date`, optionally including balances for one or more prior comparison periods,
+ * and optionally filtered by account class, type, account IDs, system account code, or tracking
+ * item. ### Filtering - Filter by `class`, `type`, `accountIds`,
+ * and/or `systemAccountCodes`. These can be combined freely — when more than one is
+ * supplied, the server returns only accounts that match **all** of the supplied filters (an
+ * intersection, not a union). - `type` values are matched case-sensitively, so use
+ * uppercase (for example `BANK`). Inventory asset accounts are reported as, and can
+ * only be filtered by, `INVENTORY`; filtering by their underlying account type does not
+ * match them. - `trackingItemIds` and `unassignedToTrackingCategoryIds` can
+ * be used independently of the filters above to further narrow which accounts are returned. ###
+ * Comparison periods - Supplying `comparisonPeriodCount` together with
+ * `comparisonPeriodSize` returns additional balances at prior points in time, in
+ * addition to the balance at `date`. - The n-th comparison date is `date`
+ * shifted back n times `comparisonPeriodSize`. For `MONTH`,
+ * `QUARTER`, and `YEAR` sizes, a `date` that falls on the last day
+ * of its month keeps landing on the last day of the shifted month (so comparisons across February
+ * behave correctly). - `comparisonPeriodCount` and `comparisonPeriodSize`
+ * must be supplied together. ### Bank accounts Bank account data is only available to users with
+ * bank account view permission for the organisation. - If the request would include bank accounts
+ * and the user lacks this permission, it is rejected with `403 Forbidden`. A request is
+ * treated as including bank accounts when it has no account filters, filters by all five
+ * `class` values and nothing else, includes `BANK` in `type`, or
+ * lists a bank account in `accountIds`. - For other requests (for example
+ * `class=ASSET`), bank accounts are silently excluded from the response for users
+ * without this permission, instead of the request being rejected. ### Results Only accounts with
+ * a non-zero balance at a given date are returned; accounts and comparison dates with a net-zero
+ * balance are omitted, so the response can be empty. ### Pagination This endpoint does not
+ * paginate — all matching account balances are returned in a single response.
+ *
+ * 200 - Success - returns account balances as at `date`.
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required parameter (`accountingBasis`, `date`) is missing, or a value is
+ * not a valid date or enum value - `comparisonPeriodCount` supplied without
+ * `comparisonPeriodSize` (or vice versa) - `comparisonPeriodCount` outside
+ * the 1-100 range - More than 50 `accountIds` specified - An empty value in
+ * `type` or `systemAccountCodes` - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account balances, or when the request would include bank accounts and
+ * the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` or
+ * `systemAccountCodes` do not exist for this organisation, or the organisation was not
+ * found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param accountingBasis Accounting basis for the balance calculation.
+ * @param date The date to calculate account balances as at, in ISO 8601 format (YYYY-MM-DD).
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param comparisonPeriodCount Number of additional comparison balances to return, each one
+ * further back in time than the last. Must be supplied together with
+ * `comparisonPeriodSize`. - **Minimum**: 1 - **Maximum**: 100
+ * @param comparisonPeriodSize The unit of time each comparison period steps back by. Must be
+ * supplied together with `comparisonPeriodCount`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. - **Maximum**: 50 account IDs - **Validation**: Returns 404 if any ID does not
+ * exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Can be combined with other filters.
+ * @param trackingItemIds Filter to accounts assigned to any of the given tracking item IDs.
+ * @param unassignedToTrackingCategoryIds Filter to accounts that are not assigned to any tracking
+ * option within the given tracking category IDs.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return HttpResponse
+ * @throws IOException if an error occurs while attempting to invoke the API
+ */
+ public HttpResponse getAccountBalancesForHttpResponse(
+ String accessToken,
+ String accountingBasis,
+ LocalDate date,
+ UUID xeroTenantId,
+ Integer comparisonPeriodCount,
+ String comparisonPeriodSize,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List trackingItemIds,
+ List unassignedToTrackingCategoryIds)
+ throws IOException {
+ // verify the required parameter 'accountingBasis' is set
+ if (accountingBasis == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accountingBasis' when calling getAccountBalances");
+ } // verify the required parameter 'date' is set
+ if (date == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'date' when calling getAccountBalances");
+ } // verify the required parameter 'xeroTenantId' is set
+ if (xeroTenantId == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'xeroTenantId' when calling getAccountBalances");
+ }
+ if (accessToken == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accessToken' when calling getAccountBalances");
+ }
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Xero-Tenant-Id", xeroTenantId);
+ headers.setAccept("application/json;application/problem+json");
+ headers.setUserAgent(this.getUserAgent());
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/account-balances");
+ if (accountingBasis != null) {
+ String key = "accountingBasis";
+ Object value = accountingBasis;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (date != null) {
+ String key = "date";
+ Object value = date;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (comparisonPeriodCount != null) {
+ String key = "comparisonPeriodCount";
+ Object value = comparisonPeriodCount;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (comparisonPeriodSize != null) {
+ String key = "comparisonPeriodSize";
+ Object value = comparisonPeriodSize;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (accountIds != null) {
+ String key = "accountIds";
+ Object value = accountIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (propertyClass != null) {
+ String key = "class";
+ Object value = propertyClass;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (type != null) {
+ String key = "type";
+ Object value = type;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (systemAccountCodes != null) {
+ String key = "systemAccountCodes";
+ Object value = systemAccountCodes;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (trackingItemIds != null) {
+ String key = "trackingItemIds";
+ Object value = trackingItemIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (unassignedToTrackingCategoryIds != null) {
+ String key = "unassignedToTrackingCategoryIds";
+ Object value = unassignedToTrackingCategoryIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+ if (logger.isDebugEnabled()) {
+ logger.debug("GET " + genericUrl.toString());
+ }
+
+ HttpContent content = null;
+ Credential credential =
+ new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
+ HttpTransport transport = apiClient.getHttpTransport();
+ HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
+ return requestFactory
+ .buildRequest(HttpMethods.GET, genericUrl, content)
+ .setHeaders(headers)
+ .setConnectTimeout(apiClient.getConnectionTimeout())
+ .setReadTimeout(apiClient.getReadTimeout())
+ .execute();
+ }
+
+ /**
+ * Get the net movement of each general ledger account over a date range Retrieves account
+ * movements between `startDate` and `endDate`, optionally including movements
+ * for one or more prior comparison periods of the same length, and optionally filtered by account
+ * class, type, account IDs, system account code, or tracking item. ### Filtering - Filter by
+ * `class`, `type`, `accountIds`, and/or
+ * `systemAccountCodes`. These can be combined freely — when more than one is supplied,
+ * the server returns only accounts that match **all** of the supplied filters (an intersection,
+ * not a union). - `type` values are matched case-sensitively, so use uppercase (for
+ * example `BANK`). Inventory asset accounts are reported as, and can only be filtered
+ * by, `INVENTORY`; filtering by their underlying account type does not match them. -
+ * `trackingItemIds` and `unassignedToTrackingCategoryIds` can be used
+ * independently of the filters above to further narrow which accounts are returned. ###
+ * Comparison periods - Supplying `comparisonPeriodCount` together with
+ * `comparisonPeriodSize` returns additional movements for prior date ranges of the same
+ * length, in addition to the movement between `startDate` and `endDate`. -
+ * Each comparison range is calculated by moving the primary range back by
+ * `comparisonPeriodSize`, `comparisonPeriodCount` times. For
+ * `MONTH`, `QUARTER`, and `YEAR` sizes, range boundaries that fall
+ * on the last day of a month keep landing on the last day of the shifted month. -
+ * `comparisonPeriodCount` and `comparisonPeriodSize` must be supplied
+ * together. - The primary range and every comparison range must not overlap each other. A request
+ * whose periods would overlap is rejected with `400 Bad Request`. Ranges that share a
+ * single boundary day count as overlapping, which month-end adjustment can cause when shifting by
+ * `MONTH`, `QUARTER`, or `YEAR`. ### Bank accounts Bank account
+ * data is only available to users with bank account view permission for the organisation. - If
+ * the request would include bank accounts and the user lacks this permission, it is rejected with
+ * `403 Forbidden`. A request is treated as including bank accounts when it has no
+ * account filters, filters by all five `class` values and nothing else, includes
+ * `BANK` in `type`, or lists a bank account in `accountIds`. - For
+ * other requests (for example `class=ASSET`), bank accounts are silently excluded
+ * from the response for users without this permission, instead of the request being rejected. ###
+ * Pagination This endpoint does not paginate — the full set of matching account movements is
+ * returned in a single response. ### Results Only combinations of account and date range with
+ * non-zero movement are returned; comparison ranges are not zero-filled. The response is a flat
+ * list with no guaranteed ordering.
+ *
+ * 200 - Success - returns account movements for the requested range(s).
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required parameter (`accountingBasis`, `startDate`, `endDate`)
+ * is missing, or a value is not a valid date or enum value - `comparisonPeriodCount`
+ * supplied without `comparisonPeriodSize` (or vice versa) -
+ * `comparisonPeriodCount` outside the 1-100 range - The primary range and one or more
+ * comparison ranges overlap - `startDate` after `endDate` - More than 50
+ * `accountIds` specified - An empty value in `type` or
+ * `systemAccountCodes` - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account movements, or when the request would include bank accounts and
+ * the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` or
+ * `systemAccountCodes` do not exist for this organisation, or the organisation was not
+ * found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param accountingBasis Accounting basis for the movement calculation.
+ * @param startDate Start date of the movement range, in ISO 8601 format (YYYY-MM-DD).
+ * @param endDate End date of the movement range, in ISO 8601 format (YYYY-MM-DD).
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param comparisonPeriodCount Number of additional comparison movements to return, each covering
+ * a range further back in time than the last. Must be supplied together with
+ * `comparisonPeriodSize`. - **Minimum**: 1 - **Maximum**: 100
+ * @param comparisonPeriodSize The unit of time each comparison range steps back by. Must be
+ * supplied together with `comparisonPeriodCount`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. - **Maximum**: 50 account IDs - **Validation**: Returns 404 if any ID does not
+ * exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Can be combined with other filters.
+ * @param trackingItemIds Filter to accounts assigned to any of the given tracking item IDs.
+ * @param unassignedToTrackingCategoryIds Filter to accounts that are not assigned to any tracking
+ * option within the given tracking category IDs.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return AccountMovementsResponse
+ * @throws IOException if an error occurs while attempting to invoke the API *
+ */
+ public AccountMovementsResponse getAccountMovements(
+ String accessToken,
+ String accountingBasis,
+ LocalDate startDate,
+ LocalDate endDate,
+ UUID xeroTenantId,
+ Integer comparisonPeriodCount,
+ String comparisonPeriodSize,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List trackingItemIds,
+ List unassignedToTrackingCategoryIds)
+ throws IOException {
+ try {
+ TypeReference typeRef =
+ new TypeReference() {};
+ HttpResponse response =
+ getAccountMovementsForHttpResponse(
+ accessToken,
+ accountingBasis,
+ startDate,
+ endDate,
+ xeroTenantId,
+ comparisonPeriodCount,
+ comparisonPeriodSize,
+ accountIds,
+ propertyClass,
+ type,
+ systemAccountCodes,
+ trackingItemIds,
+ unassignedToTrackingCategoryIds);
+ return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
+ } catch (HttpResponseException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "------------------ HttpResponseException "
+ + e.getStatusCode()
+ + " : getAccountMovements -------------------");
+ logger.debug(e.toString());
+ }
+ XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
+ handler.execute(e);
+ } catch (IOException ioe) {
+ throw ioe;
+ }
+ return null;
+ }
+
+ /**
+ * Get the net movement of each general ledger account over a date range Retrieves account
+ * movements between `startDate` and `endDate`, optionally including movements
+ * for one or more prior comparison periods of the same length, and optionally filtered by account
+ * class, type, account IDs, system account code, or tracking item. ### Filtering - Filter by
+ * `class`, `type`, `accountIds`, and/or
+ * `systemAccountCodes`. These can be combined freely — when more than one is supplied,
+ * the server returns only accounts that match **all** of the supplied filters (an intersection,
+ * not a union). - `type` values are matched case-sensitively, so use uppercase (for
+ * example `BANK`). Inventory asset accounts are reported as, and can only be filtered
+ * by, `INVENTORY`; filtering by their underlying account type does not match them. -
+ * `trackingItemIds` and `unassignedToTrackingCategoryIds` can be used
+ * independently of the filters above to further narrow which accounts are returned. ###
+ * Comparison periods - Supplying `comparisonPeriodCount` together with
+ * `comparisonPeriodSize` returns additional movements for prior date ranges of the same
+ * length, in addition to the movement between `startDate` and `endDate`. -
+ * Each comparison range is calculated by moving the primary range back by
+ * `comparisonPeriodSize`, `comparisonPeriodCount` times. For
+ * `MONTH`, `QUARTER`, and `YEAR` sizes, range boundaries that fall
+ * on the last day of a month keep landing on the last day of the shifted month. -
+ * `comparisonPeriodCount` and `comparisonPeriodSize` must be supplied
+ * together. - The primary range and every comparison range must not overlap each other. A request
+ * whose periods would overlap is rejected with `400 Bad Request`. Ranges that share a
+ * single boundary day count as overlapping, which month-end adjustment can cause when shifting by
+ * `MONTH`, `QUARTER`, or `YEAR`. ### Bank accounts Bank account
+ * data is only available to users with bank account view permission for the organisation. - If
+ * the request would include bank accounts and the user lacks this permission, it is rejected with
+ * `403 Forbidden`. A request is treated as including bank accounts when it has no
+ * account filters, filters by all five `class` values and nothing else, includes
+ * `BANK` in `type`, or lists a bank account in `accountIds`. - For
+ * other requests (for example `class=ASSET`), bank accounts are silently excluded
+ * from the response for users without this permission, instead of the request being rejected. ###
+ * Pagination This endpoint does not paginate — the full set of matching account movements is
+ * returned in a single response. ### Results Only combinations of account and date range with
+ * non-zero movement are returned; comparison ranges are not zero-filled. The response is a flat
+ * list with no guaranteed ordering.
+ *
+ * 200 - Success - returns account movements for the requested range(s).
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required parameter (`accountingBasis`, `startDate`, `endDate`)
+ * is missing, or a value is not a valid date or enum value - `comparisonPeriodCount`
+ * supplied without `comparisonPeriodSize` (or vice versa) -
+ * `comparisonPeriodCount` outside the 1-100 range - The primary range and one or more
+ * comparison ranges overlap - `startDate` after `endDate` - More than 50
+ * `accountIds` specified - An empty value in `type` or
+ * `systemAccountCodes` - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account movements, or when the request would include bank accounts and
+ * the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` or
+ * `systemAccountCodes` do not exist for this organisation, or the organisation was not
+ * found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param accountingBasis Accounting basis for the movement calculation.
+ * @param startDate Start date of the movement range, in ISO 8601 format (YYYY-MM-DD).
+ * @param endDate End date of the movement range, in ISO 8601 format (YYYY-MM-DD).
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param comparisonPeriodCount Number of additional comparison movements to return, each covering
+ * a range further back in time than the last. Must be supplied together with
+ * `comparisonPeriodSize`. - **Minimum**: 1 - **Maximum**: 100
+ * @param comparisonPeriodSize The unit of time each comparison range steps back by. Must be
+ * supplied together with `comparisonPeriodCount`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. - **Maximum**: 50 account IDs - **Validation**: Returns 404 if any ID does not
+ * exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Can be combined with other filters.
+ * @param trackingItemIds Filter to accounts assigned to any of the given tracking item IDs.
+ * @param unassignedToTrackingCategoryIds Filter to accounts that are not assigned to any tracking
+ * option within the given tracking category IDs.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return HttpResponse
+ * @throws IOException if an error occurs while attempting to invoke the API
+ */
+ public HttpResponse getAccountMovementsForHttpResponse(
+ String accessToken,
+ String accountingBasis,
+ LocalDate startDate,
+ LocalDate endDate,
+ UUID xeroTenantId,
+ Integer comparisonPeriodCount,
+ String comparisonPeriodSize,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List trackingItemIds,
+ List unassignedToTrackingCategoryIds)
+ throws IOException {
+ // verify the required parameter 'accountingBasis' is set
+ if (accountingBasis == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accountingBasis' when calling getAccountMovements");
+ } // verify the required parameter 'startDate' is set
+ if (startDate == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'startDate' when calling getAccountMovements");
+ } // verify the required parameter 'endDate' is set
+ if (endDate == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'endDate' when calling getAccountMovements");
+ } // verify the required parameter 'xeroTenantId' is set
+ if (xeroTenantId == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'xeroTenantId' when calling getAccountMovements");
+ }
+ if (accessToken == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accessToken' when calling getAccountMovements");
+ }
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Xero-Tenant-Id", xeroTenantId);
+ headers.setAccept("application/json;application/problem+json");
+ headers.setUserAgent(this.getUserAgent());
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/account-movements");
+ if (accountingBasis != null) {
+ String key = "accountingBasis";
+ Object value = accountingBasis;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (startDate != null) {
+ String key = "startDate";
+ Object value = startDate;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (endDate != null) {
+ String key = "endDate";
+ Object value = endDate;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (comparisonPeriodCount != null) {
+ String key = "comparisonPeriodCount";
+ Object value = comparisonPeriodCount;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (comparisonPeriodSize != null) {
+ String key = "comparisonPeriodSize";
+ Object value = comparisonPeriodSize;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (accountIds != null) {
+ String key = "accountIds";
+ Object value = accountIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (propertyClass != null) {
+ String key = "class";
+ Object value = propertyClass;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (type != null) {
+ String key = "type";
+ Object value = type;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (systemAccountCodes != null) {
+ String key = "systemAccountCodes";
+ Object value = systemAccountCodes;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (trackingItemIds != null) {
+ String key = "trackingItemIds";
+ Object value = trackingItemIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (unassignedToTrackingCategoryIds != null) {
+ String key = "unassignedToTrackingCategoryIds";
+ Object value = unassignedToTrackingCategoryIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+ if (logger.isDebugEnabled()) {
+ logger.debug("GET " + genericUrl.toString());
+ }
+
+ HttpContent content = null;
+ Credential credential =
+ new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
+ HttpTransport transport = apiClient.getHttpTransport();
+ HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
+ return requestFactory
+ .buildRequest(HttpMethods.GET, genericUrl, content)
+ .setHeaders(headers)
+ .setConnectTimeout(apiClient.getConnectionTimeout())
+ .setReadTimeout(apiClient.getReadTimeout())
+ .execute();
+ }
+
+ /**
+ * Get general ledger account transactions between two dates, with pagination and filtering
+ * Retrieves transactions posted between `startDate` and `endDate`
+ * (inclusive), optionally filtered by account IDs, class, type, or system account code, with
+ * cursor-based pagination for large result sets. **First call:** omit `token`. Supply
+ * `accountingBasis`, `startDate`, and `endDate` (all required),
+ * plus any optional filters. **Continuation calls:** supply only `token`, taken from
+ * the previous response's `pagination.nextToken`. Do not send any other query
+ * parameters — they are ignored if present, since the original request is captured by the token.
+ * ### Pagination - Results are returned in pages of 200 lines. - Use
+ * `pagination.nextToken` from the response as the `token` query parameter to
+ * fetch the next page. Send only the `token` query parameter on continuation requests —
+ * all other query parameters are ignored on a continuation call, since the original request's
+ * parameters are already captured by the token. - The `token` value is an opaque
+ * string. Treat it as an opaque string only — do not parse, modify, or construct it yourself.
+ * Tokens may expire. - When `pagination` is `null`, you've reached the
+ * last page. - The API captures a consistent snapshot at the time of the first request (via
+ * `maxJournalNumber`), so transactions added while you are paginating through a result
+ * set won't appear partway through, and won't cause duplicates or gaps. ### Filtering -
+ * Filter by `accountIds`, `class`, `type`, and/or
+ * `systemAccountCodes`. These can be combined freely — when more than one is supplied,
+ * the server returns only transactions for accounts that match **all** of the supplied filters
+ * (an intersection, not a union). - `type` values are matched case-sensitively, so use
+ * uppercase (for example `BANK`). Inventory asset accounts are reported as, and can
+ * only be filtered by, `INVENTORY`; filtering by their underlying account type does not
+ * match them. - Use `systemAccountCodes=NONE` to match accounts that have no
+ * system account code. - Filters are only read from the first request in a pagination sequence —
+ * see Pagination above. ### Bank accounts Bank account transactions are only available to users
+ * with bank account view permission for the organisation. - If the user lacks this permission and
+ * the request includes `BANK` in `type`, or lists a bank account in
+ * `accountIds`, it is rejected with `403 Forbidden`. - For all other
+ * requests, including unfiltered requests, bank account transactions are silently excluded from
+ * the results for users without this permission.
+ *
+ * 200 - Success - returns account transactions with pagination. - `lines`:
+ * transaction lines for this page (max 200) - `pagination.nextToken`: token for the
+ * next page (`pagination` is `null` on the last page) -
+ * `currencyCode`: organisation's base currency - `maxJournalNumber`: the
+ * snapshot boundary used for pagination consistency
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required first-call parameter (`accountingBasis`, `startDate`,
+ * `endDate`) is missing, or a value is not a valid date or enum value -
+ * `endDate` before `startDate` - More than 20, or no, `accountIds`
+ * specified - An empty value in `type` or `systemAccountCodes` -
+ * `include` has a value other than `trackingCategories` -
+ * `maxJournalNumber` is negative - Invalid `token`, or a `token`
+ * that is no longer valid - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account transactions, or when the request would include bank accounts
+ * and the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` do not exist for
+ * this organisation, or the organisation was not found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param accountingBasis Accounting basis for the transaction query. Required on the first call;
+ * not used (and ignored) on continuation calls made with `token`.
+ * @param startDate Start date in ISO 8601 format (YYYY-MM-DD). Required on the first call; not
+ * used (and ignored) on continuation calls made with `token`.
+ * @param endDate End date in ISO 8601 format (YYYY-MM-DD). Required on the first call; not used
+ * (and ignored) on continuation calls made with `token`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. Only used on the first call. - **Maximum**: 20 account IDs - **Validation**:
+ * Returns 404 if any ID does not exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters. Only
+ * used on the first call.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters. Only used on the first call.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Use `NONE` to match accounts with no system account
+ * code. Can be combined with other filters. Only used on the first call.
+ * @param include Additional data to include in the response. Only used on the first call.
+ * @param maxJournalNumber Maximum journal number to include in results, for point-in-time
+ * queries. If omitted, the server captures the current maximum journal number at the time of
+ * the first request and reuses it for every subsequent page, so the whole paginated result
+ * set is consistent as at the moment you started. Only used on the first call.
+ * @param token Continuation token from a previous response's
+ * `pagination.nextToken`. When present, all other query parameters are ignored.
+ * Opaque — do not parse, modify, or construct it.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return AccountTransactionsResponse
+ * @throws IOException if an error occurs while attempting to invoke the API *
+ */
+ public AccountTransactionsResponse getAccountTransactions(
+ String accessToken,
+ UUID xeroTenantId,
+ String accountingBasis,
+ LocalDate startDate,
+ LocalDate endDate,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List include,
+ Long maxJournalNumber,
+ String token)
+ throws IOException {
+ try {
+ TypeReference typeRef =
+ new TypeReference() {};
+ HttpResponse response =
+ getAccountTransactionsForHttpResponse(
+ accessToken,
+ xeroTenantId,
+ accountingBasis,
+ startDate,
+ endDate,
+ accountIds,
+ propertyClass,
+ type,
+ systemAccountCodes,
+ include,
+ maxJournalNumber,
+ token);
+ return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
+ } catch (HttpResponseException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "------------------ HttpResponseException "
+ + e.getStatusCode()
+ + " : getAccountTransactions -------------------");
+ logger.debug(e.toString());
+ }
+ XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
+ handler.execute(e);
+ } catch (IOException ioe) {
+ throw ioe;
+ }
+ return null;
+ }
+
+ /**
+ * Get general ledger account transactions between two dates, with pagination and filtering
+ * Retrieves transactions posted between `startDate` and `endDate`
+ * (inclusive), optionally filtered by account IDs, class, type, or system account code, with
+ * cursor-based pagination for large result sets. **First call:** omit `token`. Supply
+ * `accountingBasis`, `startDate`, and `endDate` (all required),
+ * plus any optional filters. **Continuation calls:** supply only `token`, taken from
+ * the previous response's `pagination.nextToken`. Do not send any other query
+ * parameters — they are ignored if present, since the original request is captured by the token.
+ * ### Pagination - Results are returned in pages of 200 lines. - Use
+ * `pagination.nextToken` from the response as the `token` query parameter to
+ * fetch the next page. Send only the `token` query parameter on continuation requests —
+ * all other query parameters are ignored on a continuation call, since the original request's
+ * parameters are already captured by the token. - The `token` value is an opaque
+ * string. Treat it as an opaque string only — do not parse, modify, or construct it yourself.
+ * Tokens may expire. - When `pagination` is `null`, you've reached the
+ * last page. - The API captures a consistent snapshot at the time of the first request (via
+ * `maxJournalNumber`), so transactions added while you are paginating through a result
+ * set won't appear partway through, and won't cause duplicates or gaps. ### Filtering -
+ * Filter by `accountIds`, `class`, `type`, and/or
+ * `systemAccountCodes`. These can be combined freely — when more than one is supplied,
+ * the server returns only transactions for accounts that match **all** of the supplied filters
+ * (an intersection, not a union). - `type` values are matched case-sensitively, so use
+ * uppercase (for example `BANK`). Inventory asset accounts are reported as, and can
+ * only be filtered by, `INVENTORY`; filtering by their underlying account type does not
+ * match them. - Use `systemAccountCodes=NONE` to match accounts that have no
+ * system account code. - Filters are only read from the first request in a pagination sequence —
+ * see Pagination above. ### Bank accounts Bank account transactions are only available to users
+ * with bank account view permission for the organisation. - If the user lacks this permission and
+ * the request includes `BANK` in `type`, or lists a bank account in
+ * `accountIds`, it is rejected with `403 Forbidden`. - For all other
+ * requests, including unfiltered requests, bank account transactions are silently excluded from
+ * the results for users without this permission.
+ *
+ * 200 - Success - returns account transactions with pagination. - `lines`:
+ * transaction lines for this page (max 200) - `pagination.nextToken`: token for the
+ * next page (`pagination` is `null` on the last page) -
+ * `currencyCode`: organisation's base currency - `maxJournalNumber`: the
+ * snapshot boundary used for pagination consistency
+ *
+ *
400 - **Bad Request** - The request failed validation. The body is a
+ * `ValidationProblem` with a `fieldValidationErrors` array. Common causes: -
+ * A required first-call parameter (`accountingBasis`, `startDate`,
+ * `endDate`) is missing, or a value is not a valid date or enum value -
+ * `endDate` before `startDate` - More than 20, or no, `accountIds`
+ * specified - An empty value in `type` or `systemAccountCodes` -
+ * `include` has a value other than `trackingCategories` -
+ * `maxJournalNumber` is negative - Invalid `token`, or a `token`
+ * that is no longer valid - The organisation is not active
+ *
+ *
401 - **Unauthorized** - Returned by the gateway when the access token is missing,
+ * invalid or expired (`Detail` is `AuthenticationUnsuccessful`), or does not
+ * include the scope this endpoint requires (`Detail` is
+ * `AuthorizationUnsuccessful` and `WWW-Authenticate` is
+ * `insufficient_scope`).
+ *
+ *
403 - **Forbidden** - Returned by the gateway when `Xero-Tenant-Id` is
+ * missing, or the token is not authorised for that organisation (a `GatewayProblem`
+ * body). The service also returns `403` with no response body when the user's role
+ * does not allow reading account transactions, or when the request would include bank accounts
+ * and the user lacks bank account view permission (see Bank accounts above).
+ *
+ *
404 - **Not Found** - One or more requested `accountIds` do not exist for
+ * this organisation, or the organisation was not found.
+ *
+ *
429 - **Too Many Requests** - Returned by the gateway when the app has exceeded a
+ * rate limit. The response has no body. Wait the number of seconds in `Retry-After`
+ * before retrying; `X-Rate-Limit-Problem` says which limit was exceeded (for example
+ * `day` for the daily limit).
+ *
+ *
500 - **Internal Server Error** - An unexpected error occurred. The request can be
+ * retried. The response body is not guaranteed to follow a particular format.
+ *
+ * @param xeroTenantId The ID of the Xero organisation to query.
+ * @param accountingBasis Accounting basis for the transaction query. Required on the first call;
+ * not used (and ignored) on continuation calls made with `token`.
+ * @param startDate Start date in ISO 8601 format (YYYY-MM-DD). Required on the first call; not
+ * used (and ignored) on continuation calls made with `token`.
+ * @param endDate End date in ISO 8601 format (YYYY-MM-DD). Required on the first call; not used
+ * (and ignored) on continuation calls made with `token`.
+ * @param accountIds Filter to specific account IDs (GUIDs). Repeat the parameter for multiple
+ * accounts. Only used on the first call. - **Maximum**: 20 account IDs - **Validation**:
+ * Returns 404 if any ID does not exist for the organisation
+ * @param propertyClass Account classes to filter by. Can be combined with other filters. Only
+ * used on the first call.
+ * @param type Account types to filter by (e.g. `BANK`, `CURRENT`, etc). Use
+ * `INVENTORY` to match inventory asset accounts, regardless of their underlying
+ * account type. Can be combined with other filters. Only used on the first call.
+ * @param systemAccountCodes System account codes to filter by (e.g. `RETAINEDEARNINGS`,
+ * `UNREALISEDGAINS`). Use `NONE` to match accounts with no system account
+ * code. Can be combined with other filters. Only used on the first call.
+ * @param include Additional data to include in the response. Only used on the first call.
+ * @param maxJournalNumber Maximum journal number to include in results, for point-in-time
+ * queries. If omitted, the server captures the current maximum journal number at the time of
+ * the first request and reuses it for every subsequent page, so the whole paginated result
+ * set is consistent as at the moment you started. Only used on the first call.
+ * @param token Continuation token from a previous response's
+ * `pagination.nextToken`. When present, all other query parameters are ignored.
+ * Opaque — do not parse, modify, or construct it.
+ * @param accessToken Authorization token for user set in header of each request
+ * @return HttpResponse
+ * @throws IOException if an error occurs while attempting to invoke the API
+ */
+ public HttpResponse getAccountTransactionsForHttpResponse(
+ String accessToken,
+ UUID xeroTenantId,
+ String accountingBasis,
+ LocalDate startDate,
+ LocalDate endDate,
+ List accountIds,
+ List propertyClass,
+ List type,
+ List systemAccountCodes,
+ List include,
+ Long maxJournalNumber,
+ String token)
+ throws IOException {
+ // verify the required parameter 'xeroTenantId' is set
+ if (xeroTenantId == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'xeroTenantId' when calling getAccountTransactions");
+ }
+ if (accessToken == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accessToken' when calling getAccountTransactions");
+ }
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("Xero-Tenant-Id", xeroTenantId);
+ headers.setAccept("application/json;application/problem+json");
+ headers.setUserAgent(this.getUserAgent());
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/account-transactions");
+ if (accountingBasis != null) {
+ String key = "accountingBasis";
+ Object value = accountingBasis;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (startDate != null) {
+ String key = "startDate";
+ Object value = startDate;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (endDate != null) {
+ String key = "endDate";
+ Object value = endDate;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (accountIds != null) {
+ String key = "accountIds";
+ Object value = accountIds;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (propertyClass != null) {
+ String key = "class";
+ Object value = propertyClass;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (type != null) {
+ String key = "type";
+ Object value = type;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (systemAccountCodes != null) {
+ String key = "systemAccountCodes";
+ Object value = systemAccountCodes;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (include != null) {
+ String key = "include";
+ Object value = include;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (maxJournalNumber != null) {
+ String key = "maxJournalNumber";
+ Object value = maxJournalNumber;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ if (token != null) {
+ String key = "token";
+ Object value = token;
+ if (value instanceof Collection) {
+ for (Object item : (Collection>) value) {
+ uriBuilder = uriBuilder.queryParam(key, item.toString());
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
+ String url = uriBuilder.build().toString();
+ GenericUrl genericUrl = new GenericUrl(url);
+ if (logger.isDebugEnabled()) {
+ logger.debug("GET " + genericUrl.toString());
+ }
+
+ HttpContent content = null;
+ Credential credential =
+ new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
+ HttpTransport transport = apiClient.getHttpTransport();
+ HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
+ return requestFactory
+ .buildRequest(HttpMethods.GET, genericUrl, content)
+ .setHeaders(headers)
+ .setConnectTimeout(apiClient.getConnectionTimeout())
+ .setReadTimeout(apiClient.getReadTimeout())
+ .execute();
+ }
+
+ /**
+ * convert intput to byte array
+ *
+ * @param is InputStream the server status code returned
+ * @return byteArrayInputStream a ByteArrayInputStream
+ * @throws IOException for failed or interrupted I/O operations
+ */
+ public ByteArrayInputStream convertInputToByteArray(InputStream is) throws IOException {
+ byte[] bytes = IOUtils.toByteArray(is);
+ try {
+ // Process the input stream..
+ ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
+ return byteArrayInputStream;
+ } finally {
+ is.close();
+ }
+ }
+}
diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java
index c6f2561a..0b6afeae 100644
--- a/src/main/java/com/xero/api/client/AccountingApi.java
+++ b/src/main/java/com/xero/api/client/AccountingApi.java
@@ -2,7 +2,7 @@
* Xero Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -103,7 +103,7 @@ public class AccountingApi {
private ApiClient apiClient;
private static AccountingApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);
/** AccountingApi */
diff --git a/src/main/java/com/xero/api/client/AppStoreApi.java b/src/main/java/com/xero/api/client/AppStoreApi.java
index b723e47d..8901f791 100644
--- a/src/main/java/com/xero/api/client/AppStoreApi.java
+++ b/src/main/java/com/xero/api/client/AppStoreApi.java
@@ -2,7 +2,7 @@
* Xero AppStore API
* These endpoints are for Xero Partners to interact with the App Store Billing platform
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,7 +46,7 @@ public class AppStoreApi {
private ApiClient apiClient;
private static AppStoreApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(AppStoreApi.class);
/** AppStoreApi */
diff --git a/src/main/java/com/xero/api/client/AssetApi.java b/src/main/java/com/xero/api/client/AssetApi.java
index 62aafc59..29abc382 100644
--- a/src/main/java/com/xero/api/client/AssetApi.java
+++ b/src/main/java/com/xero/api/client/AssetApi.java
@@ -2,7 +2,7 @@
* Xero Assets API
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -49,7 +49,7 @@ public class AssetApi {
private ApiClient apiClient;
private static AssetApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(AssetApi.class);
/** AssetApi */
diff --git a/src/main/java/com/xero/api/client/BankFeedsApi.java b/src/main/java/com/xero/api/client/BankFeedsApi.java
index 98f42bfe..cb4a6020 100644
--- a/src/main/java/com/xero/api/client/BankFeedsApi.java
+++ b/src/main/java/com/xero/api/client/BankFeedsApi.java
@@ -2,7 +2,7 @@
* Xero Bank Feeds API
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you're an existing financial services partner that wants access, contact your local Partner Manager. If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -48,7 +48,7 @@ public class BankFeedsApi {
private ApiClient apiClient;
private static BankFeedsApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(BankFeedsApi.class);
/** BankFeedsApi */
diff --git a/src/main/java/com/xero/api/client/FilesApi.java b/src/main/java/com/xero/api/client/FilesApi.java
index 868258f3..18f5eac3 100644
--- a/src/main/java/com/xero/api/client/FilesApi.java
+++ b/src/main/java/com/xero/api/client/FilesApi.java
@@ -2,7 +2,7 @@
* Xero Files API
* These endpoints are specific to Xero Files API
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -54,7 +54,7 @@ public class FilesApi {
private ApiClient apiClient;
private static FilesApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(FilesApi.class);
/** FilesApi */
diff --git a/src/main/java/com/xero/api/client/FinanceApi.java b/src/main/java/com/xero/api/client/FinanceApi.java
index 51159210..0cc2ac2d 100644
--- a/src/main/java/com/xero/api/client/FinanceApi.java
+++ b/src/main/java/com/xero/api/client/FinanceApi.java
@@ -2,7 +2,7 @@
* Xero Finance API
* The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -49,7 +49,7 @@ public class FinanceApi {
private ApiClient apiClient;
private static FinanceApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(FinanceApi.class);
/** FinanceApi */
diff --git a/src/main/java/com/xero/api/client/IdentityApi.java b/src/main/java/com/xero/api/client/IdentityApi.java
index 20a190d8..93461240 100644
--- a/src/main/java/com/xero/api/client/IdentityApi.java
+++ b/src/main/java/com/xero/api/client/IdentityApi.java
@@ -2,7 +2,7 @@
* Xero OAuth 2 Identity Service API
* These endpoints are related to managing authentication tokens and identity for Xero API
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -45,7 +45,7 @@ public class IdentityApi {
private ApiClient apiClient;
private static IdentityApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(IdentityApi.class);
/** IdentityApi */
diff --git a/src/main/java/com/xero/api/client/PayrollAuApi.java b/src/main/java/com/xero/api/client/PayrollAuApi.java
index d5643968..98269c5b 100644
--- a/src/main/java/com/xero/api/client/PayrollAuApi.java
+++ b/src/main/java/com/xero/api/client/PayrollAuApi.java
@@ -2,7 +2,7 @@
* Xero Payroll AU API
* This is the Xero Payroll API for orgs in Australia region.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -65,7 +65,7 @@ public class PayrollAuApi {
private ApiClient apiClient;
private static PayrollAuApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(PayrollAuApi.class);
/** PayrollAuApi */
diff --git a/src/main/java/com/xero/api/client/PayrollAuV2Api.java b/src/main/java/com/xero/api/client/PayrollAuV2Api.java
index 4e41fd07..824100f2 100644
--- a/src/main/java/com/xero/api/client/PayrollAuV2Api.java
+++ b/src/main/java/com/xero/api/client/PayrollAuV2Api.java
@@ -2,7 +2,7 @@
* Xero Payroll AU API 2.0
* This is the Xero Payroll API 2.0 for orgs in Australia region.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -49,7 +49,7 @@ public class PayrollAuV2Api {
private ApiClient apiClient;
private static PayrollAuV2Api instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(PayrollAuV2Api.class);
/** PayrollAuV2Api */
diff --git a/src/main/java/com/xero/api/client/PayrollNzApi.java b/src/main/java/com/xero/api/client/PayrollNzApi.java
index f2f4f955..902d04e3 100644
--- a/src/main/java/com/xero/api/client/PayrollNzApi.java
+++ b/src/main/java/com/xero/api/client/PayrollNzApi.java
@@ -2,7 +2,7 @@
* Xero Payroll NZ
* This is the Xero Payroll API for orgs in the NZ region.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -109,7 +109,7 @@ public class PayrollNzApi {
private ApiClient apiClient;
private static PayrollNzApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(PayrollNzApi.class);
/** PayrollNzApi */
diff --git a/src/main/java/com/xero/api/client/PayrollUkApi.java b/src/main/java/com/xero/api/client/PayrollUkApi.java
index e751ce7b..645cd5f8 100644
--- a/src/main/java/com/xero/api/client/PayrollUkApi.java
+++ b/src/main/java/com/xero/api/client/PayrollUkApi.java
@@ -2,7 +2,7 @@
* Xero Payroll UK
* This is the Xero Payroll API for orgs in the UK region.
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -105,7 +105,7 @@ public class PayrollUkApi {
private ApiClient apiClient;
private static PayrollUkApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(PayrollUkApi.class);
/** PayrollUkApi */
diff --git a/src/main/java/com/xero/api/client/ProjectApi.java b/src/main/java/com/xero/api/client/ProjectApi.java
index 50a7a643..46b4947f 100644
--- a/src/main/java/com/xero/api/client/ProjectApi.java
+++ b/src/main/java/com/xero/api/client/ProjectApi.java
@@ -2,7 +2,7 @@
* Xero Projects API
* This is the Xero Projects API
*
- * The version of the OpenAPI document: 20.0.0
+ * The version of the OpenAPI document: 20.0.1
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -57,7 +57,7 @@ public class ProjectApi {
private ApiClient apiClient;
private static ProjectApi instance = null;
private String userAgent = "Default";
- private String version = "18.3.0";
+ private String version = "18.4.0";
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);
/** ProjectApi */
diff --git a/src/main/java/com/xero/models/accountdata/Account.java b/src/main/java/com/xero/models/accountdata/Account.java
new file mode 100644
index 00000000..4bdd4ca1
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/Account.java
@@ -0,0 +1,420 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** Account */
+public class Account {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("code")
+ private String code;
+
+ @JsonProperty("name")
+ private String name;
+
+ /** Gets or Sets propertyClass */
+ public enum PropertyClassEnum {
+ /** ASSET */
+ ASSET("ASSET"),
+
+ /** LIABILITY */
+ LIABILITY("LIABILITY"),
+
+ /** EQUITY */
+ EQUITY("EQUITY"),
+
+ /** REVENUE */
+ REVENUE("REVENUE"),
+
+ /** EXPENSE */
+ EXPENSE("EXPENSE");
+
+ private String value;
+
+ PropertyClassEnum(String value) {
+ this.value = value;
+ }
+
+ /**
+ * getValue
+ *
+ * @return String value
+ */
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * toString
+ *
+ * @return String value
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * fromValue
+ *
+ * @param value String
+ */
+ @JsonCreator
+ public static PropertyClassEnum fromValue(String value) {
+ for (PropertyClassEnum b : PropertyClassEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("class")
+ private PropertyClassEnum propertyClass;
+
+ @JsonProperty("type")
+ private String type;
+
+ /** Gets or Sets status */
+ public enum StatusEnum {
+ /** ACTIVE */
+ ACTIVE("ACTIVE"),
+
+ /** ARCHIVED */
+ ARCHIVED("ARCHIVED"),
+
+ /** DELETED */
+ DELETED("DELETED");
+
+ private String value;
+
+ StatusEnum(String value) {
+ this.value = value;
+ }
+
+ /**
+ * getValue
+ *
+ * @return String value
+ */
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * toString
+ *
+ * @return String value
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * fromValue
+ *
+ * @param value String
+ */
+ @JsonCreator
+ public static StatusEnum fromValue(String value) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("status")
+ private StatusEnum status;
+
+ @JsonProperty("systemAccountCode")
+ private String systemAccountCode;
+
+ /**
+ * code
+ *
+ * @param code String
+ * @return Account
+ */
+ public Account code(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ *
+ * @return code
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * code
+ *
+ * @return code String
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * code
+ *
+ * @param code String
+ */
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ * @return Account
+ */
+ public Account name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ *
+ * @return name
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * name
+ *
+ * @return name String
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * propertyClass
+ *
+ * @param propertyClass PropertyClassEnum
+ * @return Account
+ */
+ public Account propertyClass(PropertyClassEnum propertyClass) {
+ this.propertyClass = propertyClass;
+ return this;
+ }
+
+ /**
+ * Get propertyClass
+ *
+ * @return propertyClass
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * propertyClass
+ *
+ * @return propertyClass PropertyClassEnum
+ */
+ public PropertyClassEnum getPropertyClass() {
+ return propertyClass;
+ }
+
+ /**
+ * propertyClass
+ *
+ * @param propertyClass PropertyClassEnum
+ */
+ public void setPropertyClass(PropertyClassEnum propertyClass) {
+ this.propertyClass = propertyClass;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @param type String
+ * @return Account
+ */
+ public Account type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @return type
+ */
+ @ApiModelProperty(
+ required = true,
+ value =
+ "Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY` for inventory asset"
+ + " accounts, regardless of the account's underlying type. ")
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * status
+ *
+ * @param status StatusEnum
+ * @return Account
+ */
+ public Account status(StatusEnum status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * status
+ *
+ * @return status StatusEnum
+ */
+ public StatusEnum getStatus() {
+ return status;
+ }
+
+ /**
+ * status
+ *
+ * @param status StatusEnum
+ */
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @param systemAccountCode String
+ * @return Account
+ */
+ public Account systemAccountCode(String systemAccountCode) {
+ this.systemAccountCode = systemAccountCode;
+ return this;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @return systemAccountCode
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "System account code, or `NONE` if the account has no system account code.")
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @return systemAccountCode String
+ */
+ public String getSystemAccountCode() {
+ return systemAccountCode;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @param systemAccountCode String
+ */
+ public void setSystemAccountCode(String systemAccountCode) {
+ this.systemAccountCode = systemAccountCode;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Account account = (Account) o;
+ return Objects.equals(this.code, account.code)
+ && Objects.equals(this.name, account.name)
+ && Objects.equals(this.propertyClass, account.propertyClass)
+ && Objects.equals(this.type, account.type)
+ && Objects.equals(this.status, account.status)
+ && Objects.equals(this.systemAccountCode, account.systemAccountCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(code, name, propertyClass, type, status, systemAccountCode);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Account {\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" systemAccountCode: ").append(toIndentedString(systemAccountCode)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountBalance.java b/src/main/java/com/xero/models/accountdata/AccountBalance.java
new file mode 100644
index 00000000..ad502ee8
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountBalance.java
@@ -0,0 +1,260 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import java.util.UUID;
+import org.threeten.bp.LocalDate;
+
+/** AccountBalance */
+public class AccountBalance {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("accountId")
+ private UUID accountId;
+
+ @JsonProperty("date")
+ private LocalDate date;
+
+ @JsonProperty("balance")
+ private LedgerDecimal balance;
+
+ @JsonProperty("signedBalance")
+ private Double signedBalance;
+
+ @JsonProperty("account")
+ private Account account;
+
+ /**
+ * The account this balance is for.
+ *
+ * @param accountId UUID
+ * @return AccountBalance
+ */
+ public AccountBalance accountId(UUID accountId) {
+ this.accountId = accountId;
+ return this;
+ }
+
+ /**
+ * The account this balance is for.
+ *
+ * @return accountId
+ */
+ @ApiModelProperty(required = true, value = "The account this balance is for.")
+ /**
+ * The account this balance is for.
+ *
+ * @return accountId UUID
+ */
+ public UUID getAccountId() {
+ return accountId;
+ }
+
+ /**
+ * The account this balance is for.
+ *
+ * @param accountId UUID
+ */
+ public void setAccountId(UUID accountId) {
+ this.accountId = accountId;
+ }
+
+ /**
+ * The date this balance applies to (YYYY-MM-DD).
+ *
+ * @param date LocalDate
+ * @return AccountBalance
+ */
+ public AccountBalance date(LocalDate date) {
+ this.date = date;
+ return this;
+ }
+
+ /**
+ * The date this balance applies to (YYYY-MM-DD).
+ *
+ * @return date
+ */
+ @ApiModelProperty(required = true, value = "The date this balance applies to (YYYY-MM-DD).")
+ /**
+ * The date this balance applies to (YYYY-MM-DD).
+ *
+ * @return date LocalDate
+ */
+ public LocalDate getDate() {
+ return date;
+ }
+
+ /**
+ * The date this balance applies to (YYYY-MM-DD).
+ *
+ * @param date LocalDate
+ */
+ public void setDate(LocalDate date) {
+ this.date = date;
+ }
+
+ /**
+ * balance
+ *
+ * @param balance LedgerDecimal
+ * @return AccountBalance
+ */
+ public AccountBalance balance(LedgerDecimal balance) {
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * Get balance
+ *
+ * @return balance
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * balance
+ *
+ * @return balance LedgerDecimal
+ */
+ public LedgerDecimal getBalance() {
+ return balance;
+ }
+
+ /**
+ * balance
+ *
+ * @param balance LedgerDecimal
+ */
+ public void setBalance(LedgerDecimal balance) {
+ this.balance = balance;
+ }
+
+ /**
+ * Balance as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedBalance Double
+ * @return AccountBalance
+ */
+ public AccountBalance signedBalance(Double signedBalance) {
+ this.signedBalance = signedBalance;
+ return this;
+ }
+
+ /**
+ * Balance as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedBalance
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "Balance as a signed number (positive for debit, negative for credit).")
+ /**
+ * Balance as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedBalance Double
+ */
+ public Double getSignedBalance() {
+ return signedBalance;
+ }
+
+ /**
+ * Balance as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedBalance Double
+ */
+ public void setSignedBalance(Double signedBalance) {
+ this.signedBalance = signedBalance;
+ }
+
+ /**
+ * account
+ *
+ * @param account Account
+ * @return AccountBalance
+ */
+ public AccountBalance account(Account account) {
+ this.account = account;
+ return this;
+ }
+
+ /**
+ * Get account
+ *
+ * @return account
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * account
+ *
+ * @return account Account
+ */
+ public Account getAccount() {
+ return account;
+ }
+
+ /**
+ * account
+ *
+ * @param account Account
+ */
+ public void setAccount(Account account) {
+ this.account = account;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountBalance accountBalance = (AccountBalance) o;
+ return Objects.equals(this.accountId, accountBalance.accountId)
+ && Objects.equals(this.date, accountBalance.date)
+ && Objects.equals(this.balance, accountBalance.balance)
+ && Objects.equals(this.signedBalance, accountBalance.signedBalance)
+ && Objects.equals(this.account, accountBalance.account);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(accountId, date, balance, signedBalance, account);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountBalance {\n");
+ sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
+ sb.append(" date: ").append(toIndentedString(date)).append("\n");
+ sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
+ sb.append(" signedBalance: ").append(toIndentedString(signedBalance)).append("\n");
+ sb.append(" account: ").append(toIndentedString(account)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountBalancesResponse.java b/src/main/java/com/xero/models/accountdata/AccountBalancesResponse.java
new file mode 100644
index 00000000..18a956dd
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountBalancesResponse.java
@@ -0,0 +1,109 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** AccountBalancesResponse */
+public class AccountBalancesResponse {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("accountBalances")
+ private List accountBalances = new ArrayList();
+
+ /**
+ * accountBalances
+ *
+ * @param accountBalances List<AccountBalance>
+ * @return AccountBalancesResponse
+ */
+ public AccountBalancesResponse accountBalances(List accountBalances) {
+ this.accountBalances = accountBalances;
+ return this;
+ }
+
+ /**
+ * accountBalances
+ *
+ * @param accountBalancesItem AccountBalance
+ * @return AccountBalancesResponse
+ */
+ public AccountBalancesResponse addAccountBalancesItem(AccountBalance accountBalancesItem) {
+ this.accountBalances.add(accountBalancesItem);
+ return this;
+ }
+
+ /**
+ * Get accountBalances
+ *
+ * @return accountBalances
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * accountBalances
+ *
+ * @return accountBalances List
+ */
+ public List getAccountBalances() {
+ return accountBalances;
+ }
+
+ /**
+ * accountBalances
+ *
+ * @param accountBalances List<AccountBalance>
+ */
+ public void setAccountBalances(List accountBalances) {
+ this.accountBalances = accountBalances;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountBalancesResponse accountBalancesResponse = (AccountBalancesResponse) o;
+ return Objects.equals(this.accountBalances, accountBalancesResponse.accountBalances);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(accountBalances);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountBalancesResponse {\n");
+ sb.append(" accountBalances: ").append(toIndentedString(accountBalances)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountMovement.java b/src/main/java/com/xero/models/accountdata/AccountMovement.java
new file mode 100644
index 00000000..1fe5843a
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountMovement.java
@@ -0,0 +1,494 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import java.util.UUID;
+
+/** AccountMovement */
+public class AccountMovement {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("accountId")
+ private UUID accountId;
+
+ @JsonProperty("dateRange")
+ private AccountingDateRange dateRange;
+
+ @JsonProperty("debits")
+ private Double debits;
+
+ @JsonProperty("credits")
+ private Double credits;
+
+ @JsonProperty("movement")
+ private LedgerDecimal movement;
+
+ @JsonProperty("signedMovement")
+ private Double signedMovement;
+
+ @JsonProperty("taxDebits")
+ private Double taxDebits;
+
+ @JsonProperty("taxCredits")
+ private Double taxCredits;
+
+ @JsonProperty("signedTaxMovement")
+ private Double signedTaxMovement;
+
+ @JsonProperty("account")
+ private Account account;
+
+ /**
+ * The account this movement is for.
+ *
+ * @param accountId UUID
+ * @return AccountMovement
+ */
+ public AccountMovement accountId(UUID accountId) {
+ this.accountId = accountId;
+ return this;
+ }
+
+ /**
+ * The account this movement is for.
+ *
+ * @return accountId
+ */
+ @ApiModelProperty(required = true, value = "The account this movement is for.")
+ /**
+ * The account this movement is for.
+ *
+ * @return accountId UUID
+ */
+ public UUID getAccountId() {
+ return accountId;
+ }
+
+ /**
+ * The account this movement is for.
+ *
+ * @param accountId UUID
+ */
+ public void setAccountId(UUID accountId) {
+ this.accountId = accountId;
+ }
+
+ /**
+ * dateRange
+ *
+ * @param dateRange AccountingDateRange
+ * @return AccountMovement
+ */
+ public AccountMovement dateRange(AccountingDateRange dateRange) {
+ this.dateRange = dateRange;
+ return this;
+ }
+
+ /**
+ * Get dateRange
+ *
+ * @return dateRange
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * dateRange
+ *
+ * @return dateRange AccountingDateRange
+ */
+ public AccountingDateRange getDateRange() {
+ return dateRange;
+ }
+
+ /**
+ * dateRange
+ *
+ * @param dateRange AccountingDateRange
+ */
+ public void setDateRange(AccountingDateRange dateRange) {
+ this.dateRange = dateRange;
+ }
+
+ /**
+ * Total debits posted to this account within the date range.
+ *
+ * @param debits Double
+ * @return AccountMovement
+ */
+ public AccountMovement debits(Double debits) {
+ this.debits = debits;
+ return this;
+ }
+
+ /**
+ * Total debits posted to this account within the date range.
+ *
+ * @return debits
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "Total debits posted to this account within the date range.")
+ /**
+ * Total debits posted to this account within the date range.
+ *
+ * @return debits Double
+ */
+ public Double getDebits() {
+ return debits;
+ }
+
+ /**
+ * Total debits posted to this account within the date range.
+ *
+ * @param debits Double
+ */
+ public void setDebits(Double debits) {
+ this.debits = debits;
+ }
+
+ /**
+ * Total credits posted to this account within the date range.
+ *
+ * @param credits Double
+ * @return AccountMovement
+ */
+ public AccountMovement credits(Double credits) {
+ this.credits = credits;
+ return this;
+ }
+
+ /**
+ * Total credits posted to this account within the date range.
+ *
+ * @return credits
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "Total credits posted to this account within the date range.")
+ /**
+ * Total credits posted to this account within the date range.
+ *
+ * @return credits Double
+ */
+ public Double getCredits() {
+ return credits;
+ }
+
+ /**
+ * Total credits posted to this account within the date range.
+ *
+ * @param credits Double
+ */
+ public void setCredits(Double credits) {
+ this.credits = credits;
+ }
+
+ /**
+ * movement
+ *
+ * @param movement LedgerDecimal
+ * @return AccountMovement
+ */
+ public AccountMovement movement(LedgerDecimal movement) {
+ this.movement = movement;
+ return this;
+ }
+
+ /**
+ * Get movement
+ *
+ * @return movement
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * movement
+ *
+ * @return movement LedgerDecimal
+ */
+ public LedgerDecimal getMovement() {
+ return movement;
+ }
+
+ /**
+ * movement
+ *
+ * @param movement LedgerDecimal
+ */
+ public void setMovement(LedgerDecimal movement) {
+ this.movement = movement;
+ }
+
+ /**
+ * Movement as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedMovement Double
+ * @return AccountMovement
+ */
+ public AccountMovement signedMovement(Double signedMovement) {
+ this.signedMovement = signedMovement;
+ return this;
+ }
+
+ /**
+ * Movement as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedMovement
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "Movement as a signed number (positive for debit, negative for credit).")
+ /**
+ * Movement as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedMovement Double
+ */
+ public Double getSignedMovement() {
+ return signedMovement;
+ }
+
+ /**
+ * Movement as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedMovement Double
+ */
+ public void setSignedMovement(Double signedMovement) {
+ this.signedMovement = signedMovement;
+ }
+
+ /**
+ * Total tax debits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @param taxDebits Double
+ * @return AccountMovement
+ */
+ public AccountMovement taxDebits(Double taxDebits) {
+ this.taxDebits = taxDebits;
+ return this;
+ }
+
+ /**
+ * Total tax debits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @return taxDebits
+ */
+ @ApiModelProperty(
+ value =
+ "Total tax debits within the date range. Omitted from the response when tax values are"
+ + " not available.")
+ /**
+ * Total tax debits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @return taxDebits Double
+ */
+ public Double getTaxDebits() {
+ return taxDebits;
+ }
+
+ /**
+ * Total tax debits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @param taxDebits Double
+ */
+ public void setTaxDebits(Double taxDebits) {
+ this.taxDebits = taxDebits;
+ }
+
+ /**
+ * Total tax credits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @param taxCredits Double
+ * @return AccountMovement
+ */
+ public AccountMovement taxCredits(Double taxCredits) {
+ this.taxCredits = taxCredits;
+ return this;
+ }
+
+ /**
+ * Total tax credits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @return taxCredits
+ */
+ @ApiModelProperty(
+ value =
+ "Total tax credits within the date range. Omitted from the response when tax values are"
+ + " not available.")
+ /**
+ * Total tax credits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @return taxCredits Double
+ */
+ public Double getTaxCredits() {
+ return taxCredits;
+ }
+
+ /**
+ * Total tax credits within the date range. Omitted from the response when tax values are not
+ * available.
+ *
+ * @param taxCredits Double
+ */
+ public void setTaxCredits(Double taxCredits) {
+ this.taxCredits = taxCredits;
+ }
+
+ /**
+ * Tax movement as a signed number (positive for debit, negative for credit). Omitted from the
+ * response when tax values are not available.
+ *
+ * @param signedTaxMovement Double
+ * @return AccountMovement
+ */
+ public AccountMovement signedTaxMovement(Double signedTaxMovement) {
+ this.signedTaxMovement = signedTaxMovement;
+ return this;
+ }
+
+ /**
+ * Tax movement as a signed number (positive for debit, negative for credit). Omitted from the
+ * response when tax values are not available.
+ *
+ * @return signedTaxMovement
+ */
+ @ApiModelProperty(
+ value =
+ "Tax movement as a signed number (positive for debit, negative for credit). Omitted from"
+ + " the response when tax values are not available.")
+ /**
+ * Tax movement as a signed number (positive for debit, negative for credit). Omitted from the
+ * response when tax values are not available.
+ *
+ * @return signedTaxMovement Double
+ */
+ public Double getSignedTaxMovement() {
+ return signedTaxMovement;
+ }
+
+ /**
+ * Tax movement as a signed number (positive for debit, negative for credit). Omitted from the
+ * response when tax values are not available.
+ *
+ * @param signedTaxMovement Double
+ */
+ public void setSignedTaxMovement(Double signedTaxMovement) {
+ this.signedTaxMovement = signedTaxMovement;
+ }
+
+ /**
+ * account
+ *
+ * @param account Account
+ * @return AccountMovement
+ */
+ public AccountMovement account(Account account) {
+ this.account = account;
+ return this;
+ }
+
+ /**
+ * Get account
+ *
+ * @return account
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * account
+ *
+ * @return account Account
+ */
+ public Account getAccount() {
+ return account;
+ }
+
+ /**
+ * account
+ *
+ * @param account Account
+ */
+ public void setAccount(Account account) {
+ this.account = account;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountMovement accountMovement = (AccountMovement) o;
+ return Objects.equals(this.accountId, accountMovement.accountId)
+ && Objects.equals(this.dateRange, accountMovement.dateRange)
+ && Objects.equals(this.debits, accountMovement.debits)
+ && Objects.equals(this.credits, accountMovement.credits)
+ && Objects.equals(this.movement, accountMovement.movement)
+ && Objects.equals(this.signedMovement, accountMovement.signedMovement)
+ && Objects.equals(this.taxDebits, accountMovement.taxDebits)
+ && Objects.equals(this.taxCredits, accountMovement.taxCredits)
+ && Objects.equals(this.signedTaxMovement, accountMovement.signedTaxMovement)
+ && Objects.equals(this.account, accountMovement.account);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountId,
+ dateRange,
+ debits,
+ credits,
+ movement,
+ signedMovement,
+ taxDebits,
+ taxCredits,
+ signedTaxMovement,
+ account);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountMovement {\n");
+ sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
+ sb.append(" dateRange: ").append(toIndentedString(dateRange)).append("\n");
+ sb.append(" debits: ").append(toIndentedString(debits)).append("\n");
+ sb.append(" credits: ").append(toIndentedString(credits)).append("\n");
+ sb.append(" movement: ").append(toIndentedString(movement)).append("\n");
+ sb.append(" signedMovement: ").append(toIndentedString(signedMovement)).append("\n");
+ sb.append(" taxDebits: ").append(toIndentedString(taxDebits)).append("\n");
+ sb.append(" taxCredits: ").append(toIndentedString(taxCredits)).append("\n");
+ sb.append(" signedTaxMovement: ").append(toIndentedString(signedTaxMovement)).append("\n");
+ sb.append(" account: ").append(toIndentedString(account)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountMovementsResponse.java b/src/main/java/com/xero/models/accountdata/AccountMovementsResponse.java
new file mode 100644
index 00000000..4ea9c116
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountMovementsResponse.java
@@ -0,0 +1,109 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** AccountMovementsResponse */
+public class AccountMovementsResponse {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("accountMovements")
+ private List accountMovements = new ArrayList();
+
+ /**
+ * accountMovements
+ *
+ * @param accountMovements List<AccountMovement>
+ * @return AccountMovementsResponse
+ */
+ public AccountMovementsResponse accountMovements(List accountMovements) {
+ this.accountMovements = accountMovements;
+ return this;
+ }
+
+ /**
+ * accountMovements
+ *
+ * @param accountMovementsItem AccountMovement
+ * @return AccountMovementsResponse
+ */
+ public AccountMovementsResponse addAccountMovementsItem(AccountMovement accountMovementsItem) {
+ this.accountMovements.add(accountMovementsItem);
+ return this;
+ }
+
+ /**
+ * Get accountMovements
+ *
+ * @return accountMovements
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * accountMovements
+ *
+ * @return accountMovements List
+ */
+ public List getAccountMovements() {
+ return accountMovements;
+ }
+
+ /**
+ * accountMovements
+ *
+ * @param accountMovements List<AccountMovement>
+ */
+ public void setAccountMovements(List accountMovements) {
+ this.accountMovements = accountMovements;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountMovementsResponse accountMovementsResponse = (AccountMovementsResponse) o;
+ return Objects.equals(this.accountMovements, accountMovementsResponse.accountMovements);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(accountMovements);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountMovementsResponse {\n");
+ sb.append(" accountMovements: ").append(toIndentedString(accountMovements)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountTransactionLine.java b/src/main/java/com/xero/models/accountdata/AccountTransactionLine.java
new file mode 100644
index 00000000..5115bd3d
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountTransactionLine.java
@@ -0,0 +1,546 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.threeten.bp.LocalDate;
+
+/** AccountTransactionLine */
+public class AccountTransactionLine {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("journalNumber")
+ private Long journalNumber;
+
+ @JsonProperty("journalDate")
+ private LocalDate journalDate;
+
+ @JsonProperty("description")
+ private String description;
+
+ @JsonProperty("account")
+ private TransactionAccount account;
+
+ @JsonProperty("netAmount")
+ private LedgerDecimal netAmount;
+
+ @JsonProperty("signedNetAmount")
+ private Double signedNetAmount;
+
+ @JsonProperty("taxAmount")
+ private LedgerDecimal taxAmount;
+
+ @JsonProperty("signedTaxAmount")
+ private Double signedTaxAmount;
+
+ @JsonProperty("source")
+ private LineSource source;
+
+ @JsonProperty("taxRate")
+ private LineTaxRate taxRate;
+
+ @JsonProperty("trackingCategories")
+ private Map trackingCategories =
+ new HashMap();
+
+ /**
+ * Unique journal number for this transaction.
+ *
+ * @param journalNumber Long
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine journalNumber(Long journalNumber) {
+ this.journalNumber = journalNumber;
+ return this;
+ }
+
+ /**
+ * Unique journal number for this transaction.
+ *
+ * @return journalNumber
+ */
+ @ApiModelProperty(required = true, value = "Unique journal number for this transaction.")
+ /**
+ * Unique journal number for this transaction.
+ *
+ * @return journalNumber Long
+ */
+ public Long getJournalNumber() {
+ return journalNumber;
+ }
+
+ /**
+ * Unique journal number for this transaction.
+ *
+ * @param journalNumber Long
+ */
+ public void setJournalNumber(Long journalNumber) {
+ this.journalNumber = journalNumber;
+ }
+
+ /**
+ * Accounting date of the transaction (YYYY-MM-DD).
+ *
+ * @param journalDate LocalDate
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine journalDate(LocalDate journalDate) {
+ this.journalDate = journalDate;
+ return this;
+ }
+
+ /**
+ * Accounting date of the transaction (YYYY-MM-DD).
+ *
+ * @return journalDate
+ */
+ @ApiModelProperty(required = true, value = "Accounting date of the transaction (YYYY-MM-DD).")
+ /**
+ * Accounting date of the transaction (YYYY-MM-DD).
+ *
+ * @return journalDate LocalDate
+ */
+ public LocalDate getJournalDate() {
+ return journalDate;
+ }
+
+ /**
+ * Accounting date of the transaction (YYYY-MM-DD).
+ *
+ * @param journalDate LocalDate
+ */
+ public void setJournalDate(LocalDate journalDate) {
+ this.journalDate = journalDate;
+ }
+
+ /**
+ * Line description, falling back to the journal narration. Empty if neither is set.
+ *
+ * @param description String
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Line description, falling back to the journal narration. Empty if neither is set.
+ *
+ * @return description
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "Line description, falling back to the journal narration. Empty if neither is set.")
+ /**
+ * Line description, falling back to the journal narration. Empty if neither is set.
+ *
+ * @return description String
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Line description, falling back to the journal narration. Empty if neither is set.
+ *
+ * @param description String
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * account
+ *
+ * @param account TransactionAccount
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine account(TransactionAccount account) {
+ this.account = account;
+ return this;
+ }
+
+ /**
+ * Get account
+ *
+ * @return account
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * account
+ *
+ * @return account TransactionAccount
+ */
+ public TransactionAccount getAccount() {
+ return account;
+ }
+
+ /**
+ * account
+ *
+ * @param account TransactionAccount
+ */
+ public void setAccount(TransactionAccount account) {
+ this.account = account;
+ }
+
+ /**
+ * netAmount
+ *
+ * @param netAmount LedgerDecimal
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine netAmount(LedgerDecimal netAmount) {
+ this.netAmount = netAmount;
+ return this;
+ }
+
+ /**
+ * Get netAmount
+ *
+ * @return netAmount
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * netAmount
+ *
+ * @return netAmount LedgerDecimal
+ */
+ public LedgerDecimal getNetAmount() {
+ return netAmount;
+ }
+
+ /**
+ * netAmount
+ *
+ * @param netAmount LedgerDecimal
+ */
+ public void setNetAmount(LedgerDecimal netAmount) {
+ this.netAmount = netAmount;
+ }
+
+ /**
+ * Net amount as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedNetAmount Double
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine signedNetAmount(Double signedNetAmount) {
+ this.signedNetAmount = signedNetAmount;
+ return this;
+ }
+
+ /**
+ * Net amount as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedNetAmount
+ */
+ @ApiModelProperty(
+ value = "Net amount as a signed number (positive for debit, negative for credit).")
+ /**
+ * Net amount as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedNetAmount Double
+ */
+ public Double getSignedNetAmount() {
+ return signedNetAmount;
+ }
+
+ /**
+ * Net amount as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedNetAmount Double
+ */
+ public void setSignedNetAmount(Double signedNetAmount) {
+ this.signedNetAmount = signedNetAmount;
+ }
+
+ /**
+ * taxAmount
+ *
+ * @param taxAmount LedgerDecimal
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine taxAmount(LedgerDecimal taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * Get taxAmount
+ *
+ * @return taxAmount
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * taxAmount
+ *
+ * @return taxAmount LedgerDecimal
+ */
+ public LedgerDecimal getTaxAmount() {
+ return taxAmount;
+ }
+
+ /**
+ * taxAmount
+ *
+ * @param taxAmount LedgerDecimal
+ */
+ public void setTaxAmount(LedgerDecimal taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ /**
+ * Tax amount as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedTaxAmount Double
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine signedTaxAmount(Double signedTaxAmount) {
+ this.signedTaxAmount = signedTaxAmount;
+ return this;
+ }
+
+ /**
+ * Tax amount as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedTaxAmount
+ */
+ @ApiModelProperty(
+ value = "Tax amount as a signed number (positive for debit, negative for credit).")
+ /**
+ * Tax amount as a signed number (positive for debit, negative for credit).
+ *
+ * @return signedTaxAmount Double
+ */
+ public Double getSignedTaxAmount() {
+ return signedTaxAmount;
+ }
+
+ /**
+ * Tax amount as a signed number (positive for debit, negative for credit).
+ *
+ * @param signedTaxAmount Double
+ */
+ public void setSignedTaxAmount(Double signedTaxAmount) {
+ this.signedTaxAmount = signedTaxAmount;
+ }
+
+ /**
+ * source
+ *
+ * @param source LineSource
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine source(LineSource source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get source
+ *
+ * @return source
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * source
+ *
+ * @return source LineSource
+ */
+ public LineSource getSource() {
+ return source;
+ }
+
+ /**
+ * source
+ *
+ * @param source LineSource
+ */
+ public void setSource(LineSource source) {
+ this.source = source;
+ }
+
+ /**
+ * taxRate
+ *
+ * @param taxRate LineTaxRate
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine taxRate(LineTaxRate taxRate) {
+ this.taxRate = taxRate;
+ return this;
+ }
+
+ /**
+ * Get taxRate
+ *
+ * @return taxRate
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * taxRate
+ *
+ * @return taxRate LineTaxRate
+ */
+ public LineTaxRate getTaxRate() {
+ return taxRate;
+ }
+
+ /**
+ * taxRate
+ *
+ * @param taxRate LineTaxRate
+ */
+ public void setTaxRate(LineTaxRate taxRate) {
+ this.taxRate = taxRate;
+ }
+
+ /**
+ * Present only when `include=trackingCategories` was requested, and omitted
+ * otherwise. Keys are tracking category IDs (UUIDs); values describe the selected tracking
+ * option. The object is empty when the line has no tracking.
+ *
+ * @param trackingCategories Map
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine trackingCategories(
+ Map trackingCategories) {
+ this.trackingCategories = trackingCategories;
+ return this;
+ }
+
+ /**
+ * Present only when `include=trackingCategories` was requested, and omitted
+ * otherwise. Keys are tracking category IDs (UUIDs); values describe the selected tracking
+ * option. The object is empty when the line has no tracking.
+ *
+ * @param key String
+ * @param trackingCategoriesItem TrackingItemDetails
+ * @return AccountTransactionLine
+ */
+ public AccountTransactionLine putTrackingCategoriesItem(
+ String key, TrackingItemDetails trackingCategoriesItem) {
+ if (this.trackingCategories == null) {
+ this.trackingCategories = new HashMap();
+ }
+ this.trackingCategories.put(key, trackingCategoriesItem);
+ return this;
+ }
+
+ /**
+ * Present only when `include=trackingCategories` was requested, and omitted
+ * otherwise. Keys are tracking category IDs (UUIDs); values describe the selected tracking
+ * option. The object is empty when the line has no tracking.
+ *
+ * @return trackingCategories
+ */
+ @ApiModelProperty(
+ value =
+ "Present only when `include=trackingCategories` was requested, and omitted otherwise."
+ + " Keys are tracking category IDs (UUIDs); values describe the selected tracking"
+ + " option. The object is empty when the line has no tracking. ")
+ /**
+ * Present only when `include=trackingCategories` was requested, and omitted
+ * otherwise. Keys are tracking category IDs (UUIDs); values describe the selected tracking
+ * option. The object is empty when the line has no tracking.
+ *
+ * @return trackingCategories Map
+ */
+ public Map getTrackingCategories() {
+ return trackingCategories;
+ }
+
+ /**
+ * Present only when `include=trackingCategories` was requested, and omitted
+ * otherwise. Keys are tracking category IDs (UUIDs); values describe the selected tracking
+ * option. The object is empty when the line has no tracking.
+ *
+ * @param trackingCategories Map
+ */
+ public void setTrackingCategories(Map trackingCategories) {
+ this.trackingCategories = trackingCategories;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountTransactionLine accountTransactionLine = (AccountTransactionLine) o;
+ return Objects.equals(this.journalNumber, accountTransactionLine.journalNumber)
+ && Objects.equals(this.journalDate, accountTransactionLine.journalDate)
+ && Objects.equals(this.description, accountTransactionLine.description)
+ && Objects.equals(this.account, accountTransactionLine.account)
+ && Objects.equals(this.netAmount, accountTransactionLine.netAmount)
+ && Objects.equals(this.signedNetAmount, accountTransactionLine.signedNetAmount)
+ && Objects.equals(this.taxAmount, accountTransactionLine.taxAmount)
+ && Objects.equals(this.signedTaxAmount, accountTransactionLine.signedTaxAmount)
+ && Objects.equals(this.source, accountTransactionLine.source)
+ && Objects.equals(this.taxRate, accountTransactionLine.taxRate)
+ && Objects.equals(this.trackingCategories, accountTransactionLine.trackingCategories);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ journalNumber,
+ journalDate,
+ description,
+ account,
+ netAmount,
+ signedNetAmount,
+ taxAmount,
+ signedTaxAmount,
+ source,
+ taxRate,
+ trackingCategories);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountTransactionLine {\n");
+ sb.append(" journalNumber: ").append(toIndentedString(journalNumber)).append("\n");
+ sb.append(" journalDate: ").append(toIndentedString(journalDate)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" account: ").append(toIndentedString(account)).append("\n");
+ sb.append(" netAmount: ").append(toIndentedString(netAmount)).append("\n");
+ sb.append(" signedNetAmount: ").append(toIndentedString(signedNetAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" signedTaxAmount: ").append(toIndentedString(signedTaxAmount)).append("\n");
+ sb.append(" source: ").append(toIndentedString(source)).append("\n");
+ sb.append(" taxRate: ").append(toIndentedString(taxRate)).append("\n");
+ sb.append(" trackingCategories: ").append(toIndentedString(trackingCategories)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountTransactionsResponse.java b/src/main/java/com/xero/models/accountdata/AccountTransactionsResponse.java
new file mode 100644
index 00000000..beadab88
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountTransactionsResponse.java
@@ -0,0 +1,241 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** AccountTransactionsResponse */
+public class AccountTransactionsResponse {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("currencyCode")
+ private String currencyCode;
+
+ @JsonProperty("maxJournalNumber")
+ private Long maxJournalNumber;
+
+ @JsonProperty("lines")
+ private List lines = new ArrayList();
+
+ @JsonProperty("pagination")
+ private AccountTransactionsResponsePagination pagination;
+
+ /**
+ * Organisation's base currency code (ISO 4217).
+ *
+ * @param currencyCode String
+ * @return AccountTransactionsResponse
+ */
+ public AccountTransactionsResponse currencyCode(String currencyCode) {
+ this.currencyCode = currencyCode;
+ return this;
+ }
+
+ /**
+ * Organisation's base currency code (ISO 4217).
+ *
+ * @return currencyCode
+ */
+ @ApiModelProperty(
+ example = "USD",
+ required = true,
+ value = "Organisation's base currency code (ISO 4217).")
+ /**
+ * Organisation's base currency code (ISO 4217).
+ *
+ * @return currencyCode String
+ */
+ public String getCurrencyCode() {
+ return currencyCode;
+ }
+
+ /**
+ * Organisation's base currency code (ISO 4217).
+ *
+ * @param currencyCode String
+ */
+ public void setCurrencyCode(String currencyCode) {
+ this.currencyCode = currencyCode;
+ }
+
+ /**
+ * Maximum journal number included in this result set. Captured at the first request and held
+ * constant across all pages for consistency.
+ *
+ * @param maxJournalNumber Long
+ * @return AccountTransactionsResponse
+ */
+ public AccountTransactionsResponse maxJournalNumber(Long maxJournalNumber) {
+ this.maxJournalNumber = maxJournalNumber;
+ return this;
+ }
+
+ /**
+ * Maximum journal number included in this result set. Captured at the first request and held
+ * constant across all pages for consistency.
+ *
+ * @return maxJournalNumber
+ */
+ @ApiModelProperty(
+ example = "546",
+ required = true,
+ value =
+ "Maximum journal number included in this result set. Captured at the first request and"
+ + " held constant across all pages for consistency. ")
+ /**
+ * Maximum journal number included in this result set. Captured at the first request and held
+ * constant across all pages for consistency.
+ *
+ * @return maxJournalNumber Long
+ */
+ public Long getMaxJournalNumber() {
+ return maxJournalNumber;
+ }
+
+ /**
+ * Maximum journal number included in this result set. Captured at the first request and held
+ * constant across all pages for consistency.
+ *
+ * @param maxJournalNumber Long
+ */
+ public void setMaxJournalNumber(Long maxJournalNumber) {
+ this.maxJournalNumber = maxJournalNumber;
+ }
+
+ /**
+ * Transaction lines for this page (max 200).
+ *
+ * @param lines List<AccountTransactionLine>
+ * @return AccountTransactionsResponse
+ */
+ public AccountTransactionsResponse lines(List lines) {
+ this.lines = lines;
+ return this;
+ }
+
+ /**
+ * Transaction lines for this page (max 200).
+ *
+ * @param linesItem AccountTransactionLine
+ * @return AccountTransactionsResponse
+ */
+ public AccountTransactionsResponse addLinesItem(AccountTransactionLine linesItem) {
+ this.lines.add(linesItem);
+ return this;
+ }
+
+ /**
+ * Transaction lines for this page (max 200).
+ *
+ * @return lines
+ */
+ @ApiModelProperty(required = true, value = "Transaction lines for this page (max 200).")
+ /**
+ * Transaction lines for this page (max 200).
+ *
+ * @return lines List
+ */
+ public List getLines() {
+ return lines;
+ }
+
+ /**
+ * Transaction lines for this page (max 200).
+ *
+ * @param lines List<AccountTransactionLine>
+ */
+ public void setLines(List lines) {
+ this.lines = lines;
+ }
+
+ /**
+ * pagination
+ *
+ * @param pagination AccountTransactionsResponsePagination
+ * @return AccountTransactionsResponse
+ */
+ public AccountTransactionsResponse pagination(AccountTransactionsResponsePagination pagination) {
+ this.pagination = pagination;
+ return this;
+ }
+
+ /**
+ * Get pagination
+ *
+ * @return pagination
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * pagination
+ *
+ * @return pagination AccountTransactionsResponsePagination
+ */
+ public AccountTransactionsResponsePagination getPagination() {
+ return pagination;
+ }
+
+ /**
+ * pagination
+ *
+ * @param pagination AccountTransactionsResponsePagination
+ */
+ public void setPagination(AccountTransactionsResponsePagination pagination) {
+ this.pagination = pagination;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountTransactionsResponse accountTransactionsResponse = (AccountTransactionsResponse) o;
+ return Objects.equals(this.currencyCode, accountTransactionsResponse.currencyCode)
+ && Objects.equals(this.maxJournalNumber, accountTransactionsResponse.maxJournalNumber)
+ && Objects.equals(this.lines, accountTransactionsResponse.lines)
+ && Objects.equals(this.pagination, accountTransactionsResponse.pagination);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(currencyCode, maxJournalNumber, lines, pagination);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountTransactionsResponse {\n");
+ sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n");
+ sb.append(" maxJournalNumber: ").append(toIndentedString(maxJournalNumber)).append("\n");
+ sb.append(" lines: ").append(toIndentedString(lines)).append("\n");
+ sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountTransactionsResponsePagination.java b/src/main/java/com/xero/models/accountdata/AccountTransactionsResponsePagination.java
new file mode 100644
index 00000000..9c9919b3
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountTransactionsResponsePagination.java
@@ -0,0 +1,150 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** Pagination metadata. `null` on the last page, including when there are no results. */
+@ApiModel(
+ description =
+ "Pagination metadata. `null` on the last page, including when there are no results.")
+public class AccountTransactionsResponsePagination {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("pageSize")
+ private Integer pageSize;
+
+ @JsonProperty("nextToken")
+ private String nextToken;
+
+ /**
+ * pageSize
+ *
+ * @param pageSize Integer
+ * @return AccountTransactionsResponsePagination
+ */
+ public AccountTransactionsResponsePagination pageSize(Integer pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+ /**
+ * Get pageSize
+ *
+ * @return pageSize
+ */
+ @ApiModelProperty(example = "200", required = true, value = "")
+ /**
+ * pageSize
+ *
+ * @return pageSize Integer
+ */
+ public Integer getPageSize() {
+ return pageSize;
+ }
+
+ /**
+ * pageSize
+ *
+ * @param pageSize Integer
+ */
+ public void setPageSize(Integer pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ /**
+ * Opaque continuation token for the next page. Send it as the `token` query parameter
+ * to retrieve the next page.
+ *
+ * @param nextToken String
+ * @return AccountTransactionsResponsePagination
+ */
+ public AccountTransactionsResponsePagination nextToken(String nextToken) {
+ this.nextToken = nextToken;
+ return this;
+ }
+
+ /**
+ * Opaque continuation token for the next page. Send it as the `token` query parameter
+ * to retrieve the next page.
+ *
+ * @return nextToken
+ */
+ @ApiModelProperty(
+ example = "ZXhhbXBsZS1jb250aW51YXRpb24tdG9rZW4",
+ required = true,
+ value =
+ "Opaque continuation token for the next page. Send it as the `token` query parameter to"
+ + " retrieve the next page.")
+ /**
+ * Opaque continuation token for the next page. Send it as the `token` query parameter
+ * to retrieve the next page.
+ *
+ * @return nextToken String
+ */
+ public String getNextToken() {
+ return nextToken;
+ }
+
+ /**
+ * Opaque continuation token for the next page. Send it as the `token` query parameter
+ * to retrieve the next page.
+ *
+ * @param nextToken String
+ */
+ public void setNextToken(String nextToken) {
+ this.nextToken = nextToken;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountTransactionsResponsePagination accountTransactionsResponsePagination =
+ (AccountTransactionsResponsePagination) o;
+ return Objects.equals(this.pageSize, accountTransactionsResponsePagination.pageSize)
+ && Objects.equals(this.nextToken, accountTransactionsResponsePagination.nextToken);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(pageSize, nextToken);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountTransactionsResponsePagination {\n");
+ sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
+ sb.append(" nextToken: ").append(toIndentedString(nextToken)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/AccountingDateRange.java b/src/main/java/com/xero/models/accountdata/AccountingDateRange.java
new file mode 100644
index 00000000..a18b2967
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/AccountingDateRange.java
@@ -0,0 +1,137 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import org.threeten.bp.LocalDate;
+
+/** AccountingDateRange */
+public class AccountingDateRange {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("startDate")
+ private LocalDate startDate;
+
+ @JsonProperty("endDate")
+ private LocalDate endDate;
+
+ /**
+ * startDate
+ *
+ * @param startDate LocalDate
+ * @return AccountingDateRange
+ */
+ public AccountingDateRange startDate(LocalDate startDate) {
+ this.startDate = startDate;
+ return this;
+ }
+
+ /**
+ * Get startDate
+ *
+ * @return startDate
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * startDate
+ *
+ * @return startDate LocalDate
+ */
+ public LocalDate getStartDate() {
+ return startDate;
+ }
+
+ /**
+ * startDate
+ *
+ * @param startDate LocalDate
+ */
+ public void setStartDate(LocalDate startDate) {
+ this.startDate = startDate;
+ }
+
+ /**
+ * endDate
+ *
+ * @param endDate LocalDate
+ * @return AccountingDateRange
+ */
+ public AccountingDateRange endDate(LocalDate endDate) {
+ this.endDate = endDate;
+ return this;
+ }
+
+ /**
+ * Get endDate
+ *
+ * @return endDate
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * endDate
+ *
+ * @return endDate LocalDate
+ */
+ public LocalDate getEndDate() {
+ return endDate;
+ }
+
+ /**
+ * endDate
+ *
+ * @param endDate LocalDate
+ */
+ public void setEndDate(LocalDate endDate) {
+ this.endDate = endDate;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountingDateRange accountingDateRange = (AccountingDateRange) o;
+ return Objects.equals(this.startDate, accountingDateRange.startDate)
+ && Objects.equals(this.endDate, accountingDateRange.endDate);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(startDate, endDate);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountingDateRange {\n");
+ sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
+ sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/FieldProblem.java b/src/main/java/com/xero/models/accountdata/FieldProblem.java
new file mode 100644
index 00000000..55c4f72e
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/FieldProblem.java
@@ -0,0 +1,305 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** A single validation failure. */
+@ApiModel(description = "A single validation failure.")
+public class FieldProblem {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("fieldName")
+ private String fieldName;
+
+ @JsonProperty("type")
+ private String type;
+
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("status")
+ private Integer status;
+
+ @JsonProperty("detail")
+ private String detail;
+
+ @JsonProperty("instance")
+ private String instance;
+
+ /**
+ * The name of the offending parameter, or an empty string when the failure is not tied to one
+ * parameter.
+ *
+ * @param fieldName String
+ * @return FieldProblem
+ */
+ public FieldProblem fieldName(String fieldName) {
+ this.fieldName = fieldName;
+ return this;
+ }
+
+ /**
+ * The name of the offending parameter, or an empty string when the failure is not tied to one
+ * parameter.
+ *
+ * @return fieldName
+ */
+ @ApiModelProperty(
+ value =
+ "The name of the offending parameter, or an empty string when the failure is not tied to"
+ + " one parameter.")
+ /**
+ * The name of the offending parameter, or an empty string when the failure is not tied to one
+ * parameter.
+ *
+ * @return fieldName String
+ */
+ public String getFieldName() {
+ return fieldName;
+ }
+
+ /**
+ * The name of the offending parameter, or an empty string when the failure is not tied to one
+ * parameter.
+ *
+ * @param fieldName String
+ */
+ public void setFieldName(String fieldName) {
+ this.fieldName = fieldName;
+ }
+
+ /**
+ * type
+ *
+ * @param type String
+ * @return FieldProblem
+ */
+ public FieldProblem type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ *
+ * @return type
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * type
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * type
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * title
+ *
+ * @param title String
+ * @return FieldProblem
+ */
+ public FieldProblem title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ *
+ * @return title
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * title
+ *
+ * @return title String
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * title
+ *
+ * @param title String
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * status
+ *
+ * @param status Integer
+ * @return FieldProblem
+ */
+ public FieldProblem status(Integer status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * status
+ *
+ * @return status Integer
+ */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /**
+ * status
+ *
+ * @param status Integer
+ */
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ /**
+ * detail
+ *
+ * @param detail String
+ * @return FieldProblem
+ */
+ public FieldProblem detail(String detail) {
+ this.detail = detail;
+ return this;
+ }
+
+ /**
+ * Get detail
+ *
+ * @return detail
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * detail
+ *
+ * @return detail String
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * detail
+ *
+ * @param detail String
+ */
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * instance
+ *
+ * @param instance String
+ * @return FieldProblem
+ */
+ public FieldProblem instance(String instance) {
+ this.instance = instance;
+ return this;
+ }
+
+ /**
+ * Get instance
+ *
+ * @return instance
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * instance
+ *
+ * @return instance String
+ */
+ public String getInstance() {
+ return instance;
+ }
+
+ /**
+ * instance
+ *
+ * @param instance String
+ */
+ public void setInstance(String instance) {
+ this.instance = instance;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FieldProblem fieldProblem = (FieldProblem) o;
+ return Objects.equals(this.fieldName, fieldProblem.fieldName)
+ && Objects.equals(this.type, fieldProblem.type)
+ && Objects.equals(this.title, fieldProblem.title)
+ && Objects.equals(this.status, fieldProblem.status)
+ && Objects.equals(this.detail, fieldProblem.detail)
+ && Objects.equals(this.instance, fieldProblem.instance);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fieldName, type, title, status, detail, instance);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FieldProblem {\n");
+ sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
+ sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/GatewayProblem.java b/src/main/java/com/xero/models/accountdata/GatewayProblem.java
new file mode 100644
index 00000000..83b3931a
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/GatewayProblem.java
@@ -0,0 +1,323 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Error body produced by the Xero API gateway (authentication, authorisation and tenant checks).
+ * Note the PascalCase property names.
+ */
+@ApiModel(
+ description =
+ "Error body produced by the Xero API gateway (authentication, authorisation and tenant"
+ + " checks). Note the PascalCase property names.")
+public class GatewayProblem {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("Type")
+ private String type;
+
+ @JsonProperty("Title")
+ private String title;
+
+ @JsonProperty("Status")
+ private Integer status;
+
+ @JsonProperty("Detail")
+ private String detail;
+
+ @JsonProperty("Instance")
+ private String instance;
+
+ @JsonProperty("Extensions")
+ private Map extensions = new HashMap();
+
+ /**
+ * type
+ *
+ * @param type String
+ * @return GatewayProblem
+ */
+ public GatewayProblem type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ *
+ * @return type
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * type
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * type
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * title
+ *
+ * @param title String
+ * @return GatewayProblem
+ */
+ public GatewayProblem title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ *
+ * @return title
+ */
+ @ApiModelProperty(example = "Unauthorized", required = true, value = "")
+ /**
+ * title
+ *
+ * @return title String
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * title
+ *
+ * @param title String
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * status
+ *
+ * @param status Integer
+ * @return GatewayProblem
+ */
+ public GatewayProblem status(Integer status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * status
+ *
+ * @return status Integer
+ */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /**
+ * status
+ *
+ * @param status Integer
+ */
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ /**
+ * detail
+ *
+ * @param detail String
+ * @return GatewayProblem
+ */
+ public GatewayProblem detail(String detail) {
+ this.detail = detail;
+ return this;
+ }
+
+ /**
+ * Get detail
+ *
+ * @return detail
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * detail
+ *
+ * @return detail String
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * detail
+ *
+ * @param detail String
+ */
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * The correlation ID of the request, also returned in the `Xero-Correlation-Id` header.
+ *
+ * @param instance String
+ * @return GatewayProblem
+ */
+ public GatewayProblem instance(String instance) {
+ this.instance = instance;
+ return this;
+ }
+
+ /**
+ * The correlation ID of the request, also returned in the `Xero-Correlation-Id` header.
+ *
+ * @return instance
+ */
+ @ApiModelProperty(
+ value =
+ "The correlation ID of the request, also returned in the `Xero-Correlation-Id` header.")
+ /**
+ * The correlation ID of the request, also returned in the `Xero-Correlation-Id` header.
+ *
+ * @return instance String
+ */
+ public String getInstance() {
+ return instance;
+ }
+
+ /**
+ * The correlation ID of the request, also returned in the `Xero-Correlation-Id` header.
+ *
+ * @param instance String
+ */
+ public void setInstance(String instance) {
+ this.instance = instance;
+ }
+
+ /**
+ * extensions
+ *
+ * @param extensions Map
+ * @return GatewayProblem
+ */
+ public GatewayProblem extensions(Map extensions) {
+ this.extensions = extensions;
+ return this;
+ }
+
+ /**
+ * extensions
+ *
+ * @param key String
+ * @param extensionsItem Object
+ * @return GatewayProblem
+ */
+ public GatewayProblem putExtensionsItem(String key, Object extensionsItem) {
+ if (this.extensions == null) {
+ this.extensions = new HashMap();
+ }
+ this.extensions.put(key, extensionsItem);
+ return this;
+ }
+
+ /**
+ * Get extensions
+ *
+ * @return extensions
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * extensions
+ *
+ * @return extensions Map
+ */
+ public Map getExtensions() {
+ return extensions;
+ }
+
+ /**
+ * extensions
+ *
+ * @param extensions Map
+ */
+ public void setExtensions(Map extensions) {
+ this.extensions = extensions;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GatewayProblem gatewayProblem = (GatewayProblem) o;
+ return Objects.equals(this.type, gatewayProblem.type)
+ && Objects.equals(this.title, gatewayProblem.title)
+ && Objects.equals(this.status, gatewayProblem.status)
+ && Objects.equals(this.detail, gatewayProblem.detail)
+ && Objects.equals(this.instance, gatewayProblem.instance)
+ && Objects.equals(this.extensions, gatewayProblem.extensions);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, title, status, detail, instance, extensions);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class GatewayProblem {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
+ sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
+ sb.append(" extensions: ").append(toIndentedString(extensions)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/LedgerDecimal.java b/src/main/java/com/xero/models/accountdata/LedgerDecimal.java
new file mode 100644
index 00000000..06e50e5a
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/LedgerDecimal.java
@@ -0,0 +1,188 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** LedgerDecimal */
+public class LedgerDecimal {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("value")
+ private Double value;
+
+ /** Gets or Sets type */
+ public enum TypeEnum {
+ /** DEBIT */
+ DEBIT("DEBIT"),
+
+ /** CREDIT */
+ CREDIT("CREDIT");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ /**
+ * getValue
+ *
+ * @return String value
+ */
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * toString
+ *
+ * @return String value
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * fromValue
+ *
+ * @param value String
+ */
+ @JsonCreator
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("type")
+ private TypeEnum type;
+
+ /**
+ * Amount value (always positive).
+ *
+ * @param value Double
+ * @return LedgerDecimal
+ */
+ public LedgerDecimal value(Double value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Amount value (always positive).
+ *
+ * @return value
+ */
+ @ApiModelProperty(required = true, value = "Amount value (always positive).")
+ /**
+ * Amount value (always positive).
+ *
+ * @return value Double
+ */
+ public Double getValue() {
+ return value;
+ }
+
+ /**
+ * Amount value (always positive).
+ *
+ * @param value Double
+ */
+ public void setValue(Double value) {
+ this.value = value;
+ }
+
+ /**
+ * type
+ *
+ * @param type TypeEnum
+ * @return LedgerDecimal
+ */
+ public LedgerDecimal type(TypeEnum type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ *
+ * @return type
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * type
+ *
+ * @return type TypeEnum
+ */
+ public TypeEnum getType() {
+ return type;
+ }
+
+ /**
+ * type
+ *
+ * @param type TypeEnum
+ */
+ public void setType(TypeEnum type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LedgerDecimal ledgerDecimal = (LedgerDecimal) o;
+ return Objects.equals(this.value, ledgerDecimal.value)
+ && Objects.equals(this.type, ledgerDecimal.type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(value, type);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LedgerDecimal {\n");
+ sb.append(" value: ").append(toIndentedString(value)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/LineSource.java b/src/main/java/com/xero/models/accountdata/LineSource.java
new file mode 100644
index 00000000..2d485fbd
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/LineSource.java
@@ -0,0 +1,305 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import java.util.UUID;
+
+/**
+ * The originating document/event for this transaction line. Always present; its fields are null
+ * when the source is unknown.
+ */
+@ApiModel(
+ description =
+ "The originating document/event for this transaction line. Always present; its fields are"
+ + " null when the source is unknown.")
+public class LineSource {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("documentId")
+ private UUID documentId;
+
+ @JsonProperty("documentType")
+ private String documentType;
+
+ @JsonProperty("eventType")
+ private String eventType;
+
+ @JsonProperty("contactId")
+ private UUID contactId;
+
+ @JsonProperty("contactName")
+ private String contactName;
+
+ @JsonProperty("reference")
+ private String reference;
+
+ /**
+ * documentId
+ *
+ * @param documentId UUID
+ * @return LineSource
+ */
+ public LineSource documentId(UUID documentId) {
+ this.documentId = documentId;
+ return this;
+ }
+
+ /**
+ * Get documentId
+ *
+ * @return documentId
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * documentId
+ *
+ * @return documentId UUID
+ */
+ public UUID getDocumentId() {
+ return documentId;
+ }
+
+ /**
+ * documentId
+ *
+ * @param documentId UUID
+ */
+ public void setDocumentId(UUID documentId) {
+ this.documentId = documentId;
+ }
+
+ /**
+ * documentType
+ *
+ * @param documentType String
+ * @return LineSource
+ */
+ public LineSource documentType(String documentType) {
+ this.documentType = documentType;
+ return this;
+ }
+
+ /**
+ * Get documentType
+ *
+ * @return documentType
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * documentType
+ *
+ * @return documentType String
+ */
+ public String getDocumentType() {
+ return documentType;
+ }
+
+ /**
+ * documentType
+ *
+ * @param documentType String
+ */
+ public void setDocumentType(String documentType) {
+ this.documentType = documentType;
+ }
+
+ /**
+ * eventType
+ *
+ * @param eventType String
+ * @return LineSource
+ */
+ public LineSource eventType(String eventType) {
+ this.eventType = eventType;
+ return this;
+ }
+
+ /**
+ * Get eventType
+ *
+ * @return eventType
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * eventType
+ *
+ * @return eventType String
+ */
+ public String getEventType() {
+ return eventType;
+ }
+
+ /**
+ * eventType
+ *
+ * @param eventType String
+ */
+ public void setEventType(String eventType) {
+ this.eventType = eventType;
+ }
+
+ /**
+ * contactId
+ *
+ * @param contactId UUID
+ * @return LineSource
+ */
+ public LineSource contactId(UUID contactId) {
+ this.contactId = contactId;
+ return this;
+ }
+
+ /**
+ * Get contactId
+ *
+ * @return contactId
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * contactId
+ *
+ * @return contactId UUID
+ */
+ public UUID getContactId() {
+ return contactId;
+ }
+
+ /**
+ * contactId
+ *
+ * @param contactId UUID
+ */
+ public void setContactId(UUID contactId) {
+ this.contactId = contactId;
+ }
+
+ /**
+ * contactName
+ *
+ * @param contactName String
+ * @return LineSource
+ */
+ public LineSource contactName(String contactName) {
+ this.contactName = contactName;
+ return this;
+ }
+
+ /**
+ * Get contactName
+ *
+ * @return contactName
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * contactName
+ *
+ * @return contactName String
+ */
+ public String getContactName() {
+ return contactName;
+ }
+
+ /**
+ * contactName
+ *
+ * @param contactName String
+ */
+ public void setContactName(String contactName) {
+ this.contactName = contactName;
+ }
+
+ /**
+ * reference
+ *
+ * @param reference String
+ * @return LineSource
+ */
+ public LineSource reference(String reference) {
+ this.reference = reference;
+ return this;
+ }
+
+ /**
+ * Get reference
+ *
+ * @return reference
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * reference
+ *
+ * @return reference String
+ */
+ public String getReference() {
+ return reference;
+ }
+
+ /**
+ * reference
+ *
+ * @param reference String
+ */
+ public void setReference(String reference) {
+ this.reference = reference;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LineSource lineSource = (LineSource) o;
+ return Objects.equals(this.documentId, lineSource.documentId)
+ && Objects.equals(this.documentType, lineSource.documentType)
+ && Objects.equals(this.eventType, lineSource.eventType)
+ && Objects.equals(this.contactId, lineSource.contactId)
+ && Objects.equals(this.contactName, lineSource.contactName)
+ && Objects.equals(this.reference, lineSource.reference);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(documentId, documentType, eventType, contactId, contactName, reference);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LineSource {\n");
+ sb.append(" documentId: ").append(toIndentedString(documentId)).append("\n");
+ sb.append(" documentType: ").append(toIndentedString(documentType)).append("\n");
+ sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
+ sb.append(" contactId: ").append(toIndentedString(contactId)).append("\n");
+ sb.append(" contactName: ").append(toIndentedString(contactName)).append("\n");
+ sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/LineTaxRate.java b/src/main/java/com/xero/models/accountdata/LineTaxRate.java
new file mode 100644
index 00000000..fd3b56ed
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/LineTaxRate.java
@@ -0,0 +1,184 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/**
+ * The tax rate applied to this transaction line. Always present; its fields are null when no tax
+ * rate applies.
+ */
+@ApiModel(
+ description =
+ "The tax rate applied to this transaction line. Always present; its fields are null when no"
+ + " tax rate applies.")
+public class LineTaxRate {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("code")
+ private String code;
+
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("percentage")
+ private Double percentage;
+
+ /**
+ * code
+ *
+ * @param code String
+ * @return LineTaxRate
+ */
+ public LineTaxRate code(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ *
+ * @return code
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * code
+ *
+ * @return code String
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * code
+ *
+ * @param code String
+ */
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ * @return LineTaxRate
+ */
+ public LineTaxRate name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ *
+ * @return name
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * name
+ *
+ * @return name String
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * percentage
+ *
+ * @param percentage Double
+ * @return LineTaxRate
+ */
+ public LineTaxRate percentage(Double percentage) {
+ this.percentage = percentage;
+ return this;
+ }
+
+ /**
+ * Get percentage
+ *
+ * @return percentage
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * percentage
+ *
+ * @return percentage Double
+ */
+ public Double getPercentage() {
+ return percentage;
+ }
+
+ /**
+ * percentage
+ *
+ * @param percentage Double
+ */
+ public void setPercentage(Double percentage) {
+ this.percentage = percentage;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LineTaxRate lineTaxRate = (LineTaxRate) o;
+ return Objects.equals(this.code, lineTaxRate.code)
+ && Objects.equals(this.name, lineTaxRate.name)
+ && Objects.equals(this.percentage, lineTaxRate.percentage);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(code, name, percentage);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LineTaxRate {\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/ProblemDetails.java b/src/main/java/com/xero/models/accountdata/ProblemDetails.java
new file mode 100644
index 00000000..3b2c18e4
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/ProblemDetails.java
@@ -0,0 +1,258 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** Problem details for HTTP APIs, in the style of RFC 7807. */
+@ApiModel(description = "Problem details for HTTP APIs, in the style of RFC 7807.")
+public class ProblemDetails {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("type")
+ private String type;
+
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("status")
+ private Integer status;
+
+ @JsonProperty("detail")
+ private String detail;
+
+ @JsonProperty("instance")
+ private String instance;
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @param type String
+ * @return ProblemDetails
+ */
+ public ProblemDetails type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @return type
+ */
+ @ApiModelProperty(value = "URI reference identifying the problem type.")
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @param title String
+ * @return ProblemDetails
+ */
+ public ProblemDetails title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @return title
+ */
+ @ApiModelProperty(required = true, value = "Short, human-readable summary.")
+ /**
+ * Short, human-readable summary.
+ *
+ * @return title String
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @param title String
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @param status Integer
+ * @return ProblemDetails
+ */
+ public ProblemDetails status(Integer status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @return status
+ */
+ @ApiModelProperty(required = true, value = "HTTP status code.")
+ /**
+ * HTTP status code.
+ *
+ * @return status Integer
+ */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @param status Integer
+ */
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @param detail String
+ * @return ProblemDetails
+ */
+ public ProblemDetails detail(String detail) {
+ this.detail = detail;
+ return this;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @return detail
+ */
+ @ApiModelProperty(value = "Detailed explanation of the problem.")
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @return detail String
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @param detail String
+ */
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @param instance String
+ * @return ProblemDetails
+ */
+ public ProblemDetails instance(String instance) {
+ this.instance = instance;
+ return this;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @return instance
+ */
+ @ApiModelProperty(value = "URI reference identifying the specific occurrence.")
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @return instance String
+ */
+ public String getInstance() {
+ return instance;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @param instance String
+ */
+ public void setInstance(String instance) {
+ this.instance = instance;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProblemDetails problemDetails = (ProblemDetails) o;
+ return Objects.equals(this.type, problemDetails.type)
+ && Objects.equals(this.title, problemDetails.title)
+ && Objects.equals(this.status, problemDetails.status)
+ && Objects.equals(this.detail, problemDetails.detail)
+ && Objects.equals(this.instance, problemDetails.instance);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, title, status, detail, instance);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProblemDetails {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
+ sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/TrackingItemDetails.java b/src/main/java/com/xero/models/accountdata/TrackingItemDetails.java
new file mode 100644
index 00000000..2b2d84b2
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/TrackingItemDetails.java
@@ -0,0 +1,177 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import java.util.UUID;
+
+/** TrackingItemDetails */
+public class TrackingItemDetails {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("categoryName")
+ private String categoryName;
+
+ @JsonProperty("optionId")
+ private UUID optionId;
+
+ @JsonProperty("optionName")
+ private String optionName;
+
+ /**
+ * categoryName
+ *
+ * @param categoryName String
+ * @return TrackingItemDetails
+ */
+ public TrackingItemDetails categoryName(String categoryName) {
+ this.categoryName = categoryName;
+ return this;
+ }
+
+ /**
+ * Get categoryName
+ *
+ * @return categoryName
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * categoryName
+ *
+ * @return categoryName String
+ */
+ public String getCategoryName() {
+ return categoryName;
+ }
+
+ /**
+ * categoryName
+ *
+ * @param categoryName String
+ */
+ public void setCategoryName(String categoryName) {
+ this.categoryName = categoryName;
+ }
+
+ /**
+ * optionId
+ *
+ * @param optionId UUID
+ * @return TrackingItemDetails
+ */
+ public TrackingItemDetails optionId(UUID optionId) {
+ this.optionId = optionId;
+ return this;
+ }
+
+ /**
+ * Get optionId
+ *
+ * @return optionId
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * optionId
+ *
+ * @return optionId UUID
+ */
+ public UUID getOptionId() {
+ return optionId;
+ }
+
+ /**
+ * optionId
+ *
+ * @param optionId UUID
+ */
+ public void setOptionId(UUID optionId) {
+ this.optionId = optionId;
+ }
+
+ /**
+ * optionName
+ *
+ * @param optionName String
+ * @return TrackingItemDetails
+ */
+ public TrackingItemDetails optionName(String optionName) {
+ this.optionName = optionName;
+ return this;
+ }
+
+ /**
+ * Get optionName
+ *
+ * @return optionName
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * optionName
+ *
+ * @return optionName String
+ */
+ public String getOptionName() {
+ return optionName;
+ }
+
+ /**
+ * optionName
+ *
+ * @param optionName String
+ */
+ public void setOptionName(String optionName) {
+ this.optionName = optionName;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrackingItemDetails trackingItemDetails = (TrackingItemDetails) o;
+ return Objects.equals(this.categoryName, trackingItemDetails.categoryName)
+ && Objects.equals(this.optionId, trackingItemDetails.optionId)
+ && Objects.equals(this.optionName, trackingItemDetails.optionName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(categoryName, optionId, optionName);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrackingItemDetails {\n");
+ sb.append(" categoryName: ").append(toIndentedString(categoryName)).append("\n");
+ sb.append(" optionId: ").append(toIndentedString(optionId)).append("\n");
+ sb.append(" optionName: ").append(toIndentedString(optionName)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/TransactionAccount.java b/src/main/java/com/xero/models/accountdata/TransactionAccount.java
new file mode 100644
index 00000000..51530147
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/TransactionAccount.java
@@ -0,0 +1,461 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+import java.util.UUID;
+
+/** TransactionAccount */
+public class TransactionAccount {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("id")
+ private UUID id;
+
+ @JsonProperty("code")
+ private String code;
+
+ @JsonProperty("name")
+ private String name;
+
+ /** Gets or Sets propertyClass */
+ public enum PropertyClassEnum {
+ /** ASSET */
+ ASSET("ASSET"),
+
+ /** LIABILITY */
+ LIABILITY("LIABILITY"),
+
+ /** EQUITY */
+ EQUITY("EQUITY"),
+
+ /** REVENUE */
+ REVENUE("REVENUE"),
+
+ /** EXPENSE */
+ EXPENSE("EXPENSE");
+
+ private String value;
+
+ PropertyClassEnum(String value) {
+ this.value = value;
+ }
+
+ /**
+ * getValue
+ *
+ * @return String value
+ */
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * toString
+ *
+ * @return String value
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * fromValue
+ *
+ * @param value String
+ */
+ @JsonCreator
+ public static PropertyClassEnum fromValue(String value) {
+ for (PropertyClassEnum b : PropertyClassEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("class")
+ private PropertyClassEnum propertyClass;
+
+ @JsonProperty("type")
+ private String type;
+
+ /** Gets or Sets status */
+ public enum StatusEnum {
+ /** ACTIVE */
+ ACTIVE("ACTIVE"),
+
+ /** ARCHIVED */
+ ARCHIVED("ARCHIVED"),
+
+ /** DELETED */
+ DELETED("DELETED");
+
+ private String value;
+
+ StatusEnum(String value) {
+ this.value = value;
+ }
+
+ /**
+ * getValue
+ *
+ * @return String value
+ */
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * toString
+ *
+ * @return String value
+ */
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ /**
+ * fromValue
+ *
+ * @param value String
+ */
+ @JsonCreator
+ public static StatusEnum fromValue(String value) {
+ for (StatusEnum b : StatusEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("status")
+ private StatusEnum status;
+
+ @JsonProperty("systemAccountCode")
+ private String systemAccountCode;
+
+ /**
+ * id
+ *
+ * @param id UUID
+ * @return TransactionAccount
+ */
+ public TransactionAccount id(UUID id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ *
+ * @return id
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * id
+ *
+ * @return id UUID
+ */
+ public UUID getId() {
+ return id;
+ }
+
+ /**
+ * id
+ *
+ * @param id UUID
+ */
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+ /**
+ * code
+ *
+ * @param code String
+ * @return TransactionAccount
+ */
+ public TransactionAccount code(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ *
+ * @return code
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * code
+ *
+ * @return code String
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * code
+ *
+ * @param code String
+ */
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ * @return TransactionAccount
+ */
+ public TransactionAccount name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ *
+ * @return name
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * name
+ *
+ * @return name String
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * name
+ *
+ * @param name String
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * propertyClass
+ *
+ * @param propertyClass PropertyClassEnum
+ * @return TransactionAccount
+ */
+ public TransactionAccount propertyClass(PropertyClassEnum propertyClass) {
+ this.propertyClass = propertyClass;
+ return this;
+ }
+
+ /**
+ * Get propertyClass
+ *
+ * @return propertyClass
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * propertyClass
+ *
+ * @return propertyClass PropertyClassEnum
+ */
+ public PropertyClassEnum getPropertyClass() {
+ return propertyClass;
+ }
+
+ /**
+ * propertyClass
+ *
+ * @param propertyClass PropertyClassEnum
+ */
+ public void setPropertyClass(PropertyClassEnum propertyClass) {
+ this.propertyClass = propertyClass;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @param type String
+ * @return TransactionAccount
+ */
+ public TransactionAccount type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @return type
+ */
+ @ApiModelProperty(
+ required = true,
+ value =
+ "Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY` for inventory asset"
+ + " accounts, regardless of the account's underlying type. ")
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Account type (e.g. `BANK`, `CURRENT`). Reported as `INVENTORY`
+ * for inventory asset accounts, regardless of the account's underlying type.
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * status
+ *
+ * @param status StatusEnum
+ * @return TransactionAccount
+ */
+ public TransactionAccount status(StatusEnum status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ *
+ * @return status
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * status
+ *
+ * @return status StatusEnum
+ */
+ public StatusEnum getStatus() {
+ return status;
+ }
+
+ /**
+ * status
+ *
+ * @param status StatusEnum
+ */
+ public void setStatus(StatusEnum status) {
+ this.status = status;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @param systemAccountCode String
+ * @return TransactionAccount
+ */
+ public TransactionAccount systemAccountCode(String systemAccountCode) {
+ this.systemAccountCode = systemAccountCode;
+ return this;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @return systemAccountCode
+ */
+ @ApiModelProperty(
+ required = true,
+ value = "System account code, or `NONE` if the account has no system account code.")
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @return systemAccountCode String
+ */
+ public String getSystemAccountCode() {
+ return systemAccountCode;
+ }
+
+ /**
+ * System account code, or `NONE` if the account has no system account code.
+ *
+ * @param systemAccountCode String
+ */
+ public void setSystemAccountCode(String systemAccountCode) {
+ this.systemAccountCode = systemAccountCode;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TransactionAccount transactionAccount = (TransactionAccount) o;
+ return Objects.equals(this.id, transactionAccount.id)
+ && Objects.equals(this.code, transactionAccount.code)
+ && Objects.equals(this.name, transactionAccount.name)
+ && Objects.equals(this.propertyClass, transactionAccount.propertyClass)
+ && Objects.equals(this.type, transactionAccount.type)
+ && Objects.equals(this.status, transactionAccount.status)
+ && Objects.equals(this.systemAccountCode, transactionAccount.systemAccountCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, code, name, propertyClass, type, status, systemAccountCode);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TransactionAccount {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" systemAccountCode: ").append(toIndentedString(systemAccountCode)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/xero/models/accountdata/ValidationProblem.java b/src/main/java/com/xero/models/accountdata/ValidationProblem.java
new file mode 100644
index 00000000..6ea4bce5
--- /dev/null
+++ b/src/main/java/com/xero/models/accountdata/ValidationProblem.java
@@ -0,0 +1,316 @@
+/*
+ * Xero Account Data API (Beta)
+ * **Beta:** this API is in beta. Endpoints, request parameters and response shapes may change before general availability. The Account Data API provides read access to general ledger account data for a Xero organisation: account balances as at a date, account movements over a date range, and the individual account transactions behind them.
+ *
+ * Contact: api@xero.com
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.xero.models.accountdata;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Returned with `400 Bad Request` when the request fails validation. */
+@ApiModel(description = "Returned with `400 Bad Request` when the request fails validation.")
+public class ValidationProblem {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("type")
+ private String type;
+
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("status")
+ private Integer status;
+
+ @JsonProperty("detail")
+ private String detail;
+
+ @JsonProperty("instance")
+ private String instance;
+
+ @JsonProperty("fieldValidationErrors")
+ private List fieldValidationErrors = new ArrayList();
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @param type String
+ * @return ValidationProblem
+ */
+ public ValidationProblem type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @return type
+ */
+ @ApiModelProperty(value = "URI reference identifying the problem type.")
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @return type String
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * URI reference identifying the problem type.
+ *
+ * @param type String
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @param title String
+ * @return ValidationProblem
+ */
+ public ValidationProblem title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @return title
+ */
+ @ApiModelProperty(value = "Short, human-readable summary.")
+ /**
+ * Short, human-readable summary.
+ *
+ * @return title String
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Short, human-readable summary.
+ *
+ * @param title String
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @param status Integer
+ * @return ValidationProblem
+ */
+ public ValidationProblem status(Integer status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @return status
+ */
+ @ApiModelProperty(value = "HTTP status code.")
+ /**
+ * HTTP status code.
+ *
+ * @return status Integer
+ */
+ public Integer getStatus() {
+ return status;
+ }
+
+ /**
+ * HTTP status code.
+ *
+ * @param status Integer
+ */
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @param detail String
+ * @return ValidationProblem
+ */
+ public ValidationProblem detail(String detail) {
+ this.detail = detail;
+ return this;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @return detail
+ */
+ @ApiModelProperty(value = "Detailed explanation of the problem.")
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @return detail String
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * Detailed explanation of the problem.
+ *
+ * @param detail String
+ */
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @param instance String
+ * @return ValidationProblem
+ */
+ public ValidationProblem instance(String instance) {
+ this.instance = instance;
+ return this;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @return instance
+ */
+ @ApiModelProperty(value = "URI reference identifying the specific occurrence.")
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @return instance String
+ */
+ public String getInstance() {
+ return instance;
+ }
+
+ /**
+ * URI reference identifying the specific occurrence.
+ *
+ * @param instance String
+ */
+ public void setInstance(String instance) {
+ this.instance = instance;
+ }
+
+ /**
+ * fieldValidationErrors
+ *
+ * @param fieldValidationErrors List<FieldProblem>
+ * @return ValidationProblem
+ */
+ public ValidationProblem fieldValidationErrors(List fieldValidationErrors) {
+ this.fieldValidationErrors = fieldValidationErrors;
+ return this;
+ }
+
+ /**
+ * fieldValidationErrors
+ *
+ * @param fieldValidationErrorsItem FieldProblem
+ * @return ValidationProblem
+ */
+ public ValidationProblem addFieldValidationErrorsItem(FieldProblem fieldValidationErrorsItem) {
+ if (this.fieldValidationErrors == null) {
+ this.fieldValidationErrors = new ArrayList();
+ }
+ this.fieldValidationErrors.add(fieldValidationErrorsItem);
+ return this;
+ }
+
+ /**
+ * Get fieldValidationErrors
+ *
+ * @return fieldValidationErrors
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * fieldValidationErrors
+ *
+ * @return fieldValidationErrors List
+ */
+ public List getFieldValidationErrors() {
+ return fieldValidationErrors;
+ }
+
+ /**
+ * fieldValidationErrors
+ *
+ * @param fieldValidationErrors List<FieldProblem>
+ */
+ public void setFieldValidationErrors(List fieldValidationErrors) {
+ this.fieldValidationErrors = fieldValidationErrors;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ValidationProblem validationProblem = (ValidationProblem) o;
+ return Objects.equals(this.type, validationProblem.type)
+ && Objects.equals(this.title, validationProblem.title)
+ && Objects.equals(this.status, validationProblem.status)
+ && Objects.equals(this.detail, validationProblem.detail)
+ && Objects.equals(this.instance, validationProblem.instance)
+ && Objects.equals(this.fieldValidationErrors, validationProblem.fieldValidationErrors);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, title, status, detail, instance, fieldValidationErrors);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ValidationProblem {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" detail: ").append(toIndentedString(detail)).append("\n");
+ sb.append(" instance: ").append(toIndentedString(instance)).append("\n");
+ sb.append(" fieldValidationErrors: ")
+ .append(toIndentedString(fieldValidationErrors))
+ .append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}