diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java
index 66f23546..06b8ba27 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -99,7 +99,7 @@ public class AccountingApi {
private ApiClient apiClient;
private static AccountingApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.0";
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);
/** AccountingApi */
@@ -15650,6 +15650,95 @@ public HttpResponse getJournalForHttpResponse(
.execute();
}
+ /**
+ * Retrieves a specific journal using a unique journal number.
+ *
+ * 200 - Success - return response of type Journals array with specified Journal
+ *
+ * @param xeroTenantId Xero identifier for Tenant
+ * @param journalNumber Number of a Journal
+ * @param accessToken Authorization token for user set in header of each request
+ * @return Journals
+ * @throws IOException if an error occurs while attempting to invoke the API *
+ */
+ public Journals getJournalByNumber(String accessToken, String xeroTenantId, Integer journalNumber)
+ throws IOException {
+ try {
+ TypeReference typeRef = new TypeReference() {};
+ HttpResponse response =
+ getJournalByNumberForHttpResponse(accessToken, xeroTenantId, journalNumber);
+ return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
+ } catch (HttpResponseException e) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(
+ "------------------ HttpResponseException "
+ + e.getStatusCode()
+ + " : getJournalByNumber -------------------");
+ logger.debug(e.toString());
+ }
+ XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
+ handler.execute(e);
+ } catch (IOException ioe) {
+ throw ioe;
+ }
+ return null;
+ }
+
+ /**
+ * Retrieves a specific journal using a unique journal number.
+ *
+ * 200 - Success - return response of type Journals array with specified Journal
+ *
+ * @param xeroTenantId Xero identifier for Tenant
+ * @param journalNumber Number of a Journal
+ * @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 getJournalByNumberForHttpResponse(
+ String accessToken, String xeroTenantId, Integer journalNumber) throws IOException {
+ // verify the required parameter 'xeroTenantId' is set
+ if (xeroTenantId == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'xeroTenantId' when calling getJournalByNumber");
+ } // verify the required parameter 'journalNumber' is set
+ if (journalNumber == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'journalNumber' when calling getJournalByNumber");
+ }
+ if (accessToken == null) {
+ throw new IllegalArgumentException(
+ "Missing the required parameter 'accessToken' when calling getJournalByNumber");
+ }
+ HttpHeaders headers = new HttpHeaders();
+ headers.set("xero-tenant-id", xeroTenantId);
+ headers.setAccept("application/json");
+ headers.setUserAgent(this.getUserAgent());
+ // create a map of path variables
+ final Map uriVariables = new HashMap();
+ uriVariables.put("JournalNumber", journalNumber);
+
+ UriBuilder uriBuilder =
+ UriBuilder.fromUri(apiClient.getBasePath() + "/Journals/{JournalNumber}");
+ String url = uriBuilder.buildFromMap(uriVariables).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();
+ }
+
/**
* Retrieves journals
*
diff --git a/src/main/java/com/xero/api/client/AppStoreApi.java b/src/main/java/com/xero/api/client/AppStoreApi.java
index 782f0346..91faad5e 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -42,7 +42,7 @@ public class AppStoreApi {
private ApiClient apiClient;
private static AppStoreApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 e0083709..e8bf1599 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -48,7 +48,7 @@ public class AssetApi {
private ApiClient apiClient;
private static AssetApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 e07a6fc6..799b7fac 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,7 +46,7 @@ public class BankFeedsApi {
private ApiClient apiClient;
private static BankFeedsApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 86cbd5f5..258f1dd3 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -53,7 +53,7 @@ public class FilesApi {
private ApiClient apiClient;
private static FilesApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 b4faa8d4..7f7038c1 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -52,7 +52,7 @@ public class FinanceApi {
private ApiClient apiClient;
private static FinanceApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 36a65142..1ec803a5 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -44,7 +44,7 @@ public class IdentityApi {
private ApiClient apiClient;
private static IdentityApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 e8c77b9a..99621bfc 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -64,7 +64,7 @@ public class PayrollAuApi {
private ApiClient apiClient;
private static PayrollAuApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.0";
static final Logger logger = LoggerFactory.getLogger(PayrollAuApi.class);
/** PayrollAuApi */
diff --git a/src/main/java/com/xero/api/client/PayrollNzApi.java b/src/main/java/com/xero/api/client/PayrollNzApi.java
index aca98651..78be1d33 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -105,7 +105,7 @@ public class PayrollNzApi {
private ApiClient apiClient;
private static PayrollNzApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.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 3cf07790..5bb9f31c 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* 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 = "4.15.1";
+ private String version = "4.16.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 a9ab5d73..8d1bbda7 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: 2.19.3
+ * The version of the OpenAPI document: 2.22.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -55,7 +55,7 @@ public class ProjectApi {
private ApiClient apiClient;
private static ProjectApi instance = null;
private String userAgent = "Default";
- private String version = "4.15.1";
+ private String version = "4.16.0";
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);
/** ProjectApi */
diff --git a/src/main/java/com/xero/models/appstore/Product.java b/src/main/java/com/xero/models/appstore/Product.java
index ed89c4c9..76f3852e 100644
--- a/src/main/java/com/xero/models/appstore/Product.java
+++ b/src/main/java/com/xero/models/appstore/Product.java
@@ -28,16 +28,23 @@ public class Product {
@JsonProperty("name")
private String name;
+
+ @JsonProperty("seatUnit")
+ private String seatUnit;
/**
* The pricing model of the product: * FIXED: Customers are charged a fixed amount for each
- * billing period * PER_SEAT: Customers are charged based on the number of units they purchase
+ * billing period * PER_SEAT: Customers are charged based on the number of units they purchase *
+ * METERED: Customers are charged per use of this product
*/
public enum TypeEnum {
/** FIXED */
FIXED("FIXED"),
/** PER_SEAT */
- PER_SEAT("PER_SEAT");
+ PER_SEAT("PER_SEAT"),
+
+ /** METERED */
+ METERED("METERED");
private String value;
@@ -84,8 +91,8 @@ public static TypeEnum fromValue(String value) {
@JsonProperty("type")
private TypeEnum type;
- @JsonProperty("seatUnit")
- private String seatUnit;
+ @JsonProperty("usageUnit")
+ private String usageUnit;
/**
* The unique identifier for the product
*
@@ -156,9 +163,50 @@ public void setName(String name) {
this.name = name;
}
+ /**
+ * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * \"SMS\", etc
+ *
+ * @param seatUnit String
+ * @return Product
+ */
+ public Product seatUnit(String seatUnit) {
+ this.seatUnit = seatUnit;
+ return this;
+ }
+
+ /**
+ * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * \"SMS\", etc
+ *
+ * @return seatUnit
+ */
+ @ApiModelProperty(
+ value = "The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc")
+ /**
+ * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * \"SMS\", etc
+ *
+ * @return seatUnit String
+ */
+ public String getSeatUnit() {
+ return seatUnit;
+ }
+
+ /**
+ * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * \"SMS\", etc
+ *
+ * @param seatUnit String
+ */
+ public void setSeatUnit(String seatUnit) {
+ this.seatUnit = seatUnit;
+ }
+
/**
* The pricing model of the product: * FIXED: Customers are charged a fixed amount for each
- * billing period * PER_SEAT: Customers are charged based on the number of units they purchase
+ * billing period * PER_SEAT: Customers are charged based on the number of units they purchase *
+ * METERED: Customers are charged per use of this product
*
* @param type TypeEnum
* @return Product
@@ -170,7 +218,8 @@ public Product type(TypeEnum type) {
/**
* The pricing model of the product: * FIXED: Customers are charged a fixed amount for each
- * billing period * PER_SEAT: Customers are charged based on the number of units they purchase
+ * billing period * PER_SEAT: Customers are charged based on the number of units they purchase *
+ * METERED: Customers are charged per use of this product
*
* @return type
*/
@@ -178,10 +227,11 @@ public Product type(TypeEnum type) {
value =
"The pricing model of the product: * FIXED: Customers are charged a fixed amount for"
+ " each billing period * PER_SEAT: Customers are charged based on the number of"
- + " units they purchase ")
+ + " units they purchase * METERED: Customers are charged per use of this product ")
/**
* The pricing model of the product: * FIXED: Customers are charged a fixed amount for each
- * billing period * PER_SEAT: Customers are charged based on the number of units they purchase
+ * billing period * PER_SEAT: Customers are charged based on the number of units they purchase *
+ * METERED: Customers are charged per use of this product
*
* @return type TypeEnum
*/
@@ -191,7 +241,8 @@ public TypeEnum getType() {
/**
* The pricing model of the product: * FIXED: Customers are charged a fixed amount for each
- * billing period * PER_SEAT: Customers are charged based on the number of units they purchase
+ * billing period * PER_SEAT: Customers are charged based on the number of units they purchase *
+ * METERED: Customers are charged per use of this product
*
* @param type TypeEnum
*/
@@ -200,43 +251,43 @@ public void setType(TypeEnum type) {
}
/**
- * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * The unit of the usage product. e.g. \"user\", \"minutes\",
* \"SMS\", etc
*
- * @param seatUnit String
+ * @param usageUnit String
* @return Product
*/
- public Product seatUnit(String seatUnit) {
- this.seatUnit = seatUnit;
+ public Product usageUnit(String usageUnit) {
+ this.usageUnit = usageUnit;
return this;
}
/**
- * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * The unit of the usage product. e.g. \"user\", \"minutes\",
* \"SMS\", etc
*
- * @return seatUnit
+ * @return usageUnit
*/
@ApiModelProperty(
- value = "The unit of the per seat product. e.g. \"user\", \"organisation\", \"SMS\", etc")
+ value = "The unit of the usage product. e.g. \"user\", \"minutes\", \"SMS\", etc")
/**
- * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * The unit of the usage product. e.g. \"user\", \"minutes\",
* \"SMS\", etc
*
- * @return seatUnit String
+ * @return usageUnit String
*/
- public String getSeatUnit() {
- return seatUnit;
+ public String getUsageUnit() {
+ return usageUnit;
}
/**
- * The unit of the per seat product. e.g. \"user\", \"organisation\",
+ * The unit of the usage product. e.g. \"user\", \"minutes\",
* \"SMS\", etc
*
- * @param seatUnit String
+ * @param usageUnit String
*/
- public void setSeatUnit(String seatUnit) {
- this.seatUnit = seatUnit;
+ public void setUsageUnit(String usageUnit) {
+ this.usageUnit = usageUnit;
}
@Override
@@ -250,13 +301,14 @@ public boolean equals(java.lang.Object o) {
Product product = (Product) o;
return Objects.equals(this.id, product.id)
&& Objects.equals(this.name, product.name)
+ && Objects.equals(this.seatUnit, product.seatUnit)
&& Objects.equals(this.type, product.type)
- && Objects.equals(this.seatUnit, product.seatUnit);
+ && Objects.equals(this.usageUnit, product.usageUnit);
}
@Override
public int hashCode() {
- return Objects.hash(id, name, type, seatUnit);
+ return Objects.hash(id, name, seatUnit, type, usageUnit);
}
@Override
@@ -265,8 +317,9 @@ public String toString() {
sb.append("class Product {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" seatUnit: ").append(toIndentedString(seatUnit)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" usageUnit: ").append(toIndentedString(usageUnit)).append("\n");
sb.append("}");
return sb.toString();
}
diff --git a/src/main/java/com/xero/models/appstore/SubscriptionItem.java b/src/main/java/com/xero/models/appstore/SubscriptionItem.java
index 3133e0ce..7a0493fa 100644
--- a/src/main/java/com/xero/models/appstore/SubscriptionItem.java
+++ b/src/main/java/com/xero/models/appstore/SubscriptionItem.java
@@ -36,6 +36,9 @@ public class SubscriptionItem {
@JsonProperty("product")
private Product product;
+ @JsonProperty("quantity")
+ private Integer quantity;
+
@JsonProperty("startDate")
private OffsetDateTime startDate;
/**
@@ -239,6 +242,48 @@ public void setProduct(Product product) {
this.product = product;
}
+ /**
+ * The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a
+ * positive integer. For metered products, it is always null.
+ *
+ * @param quantity Integer
+ * @return SubscriptionItem
+ */
+ public SubscriptionItem quantity(Integer quantity) {
+ this.quantity = quantity;
+ return this;
+ }
+
+ /**
+ * The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a
+ * positive integer. For metered products, it is always null.
+ *
+ * @return quantity
+ */
+ @ApiModelProperty(
+ value =
+ "The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a"
+ + " positive integer. For metered products, it is always null.")
+ /**
+ * The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a
+ * positive integer. For metered products, it is always null.
+ *
+ * @return quantity Integer
+ */
+ public Integer getQuantity() {
+ return quantity;
+ }
+
+ /**
+ * The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a
+ * positive integer. For metered products, it is always null.
+ *
+ * @param quantity Integer
+ */
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+
/**
* Date the subscription started, or will start. Note: this could be in the future for downgrades
* or reduced number of seats that haven't taken effect yet.
@@ -373,6 +418,7 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.id, subscriptionItem.id)
&& Objects.equals(this.price, subscriptionItem.price)
&& Objects.equals(this.product, subscriptionItem.product)
+ && Objects.equals(this.quantity, subscriptionItem.quantity)
&& Objects.equals(this.startDate, subscriptionItem.startDate)
&& Objects.equals(this.status, subscriptionItem.status)
&& Objects.equals(this.testMode, subscriptionItem.testMode);
@@ -380,7 +426,7 @@ public boolean equals(java.lang.Object o) {
@Override
public int hashCode() {
- return Objects.hash(endDate, id, price, product, startDate, status, testMode);
+ return Objects.hash(endDate, id, price, product, quantity, startDate, status, testMode);
}
@Override
@@ -391,6 +437,7 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" price: ").append(toIndentedString(price)).append("\n");
sb.append(" product: ").append(toIndentedString(product)).append("\n");
+ sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n");
diff --git a/src/main/java/com/xero/models/finance/StatementResponse.java b/src/main/java/com/xero/models/finance/StatementResponse.java
index adac4ac2..710f8281 100644
--- a/src/main/java/com/xero/models/finance/StatementResponse.java
+++ b/src/main/java/com/xero/models/finance/StatementResponse.java
@@ -40,6 +40,12 @@ public class StatementResponse {
@JsonProperty("importSource")
private String importSource;
+ @JsonProperty("startBalance")
+ private Double startBalance;
+
+ @JsonProperty("endBalance")
+ private Double endBalance;
+
@JsonProperty("statementLines")
private List statementLines = new ArrayList();
/**
@@ -183,8 +189,11 @@ public void setImportedDateTimeUtc(OffsetDateTime importedDateTimeUtc) {
}
/**
- * Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF,
- * STMTIMPORTSRC/OFX, XeroApi)
+ * Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2)
+ * manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL,
+ * STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are
+ * direct and, depending on the direct solution, may contain the name of the financial
+ * institution.
*
* @param importSource String
* @return StatementResponse
@@ -195,18 +204,27 @@ public StatementResponse importSource(String importSource) {
}
/**
- * Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF,
- * STMTIMPORTSRC/OFX, XeroApi)
+ * Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2)
+ * manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL,
+ * STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are
+ * direct and, depending on the direct solution, may contain the name of the financial
+ * institution.
*
* @return importSource
*/
@ApiModelProperty(
value =
- "Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF,"
- + " STMTIMPORTSRC/OFX, XeroApi)")
+ "Indicates the source of the statement data. Either imported from 1) direct bank feed OR"
+ + " 2) manual customer entry or upload. Manual import sources are"
+ + " STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or"
+ + " STMTIMPORTSRC/QIF. All other import sources are direct and, depending on the"
+ + " direct solution, may contain the name of the financial institution.")
/**
- * Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF,
- * STMTIMPORTSRC/OFX, XeroApi)
+ * Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2)
+ * manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL,
+ * STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are
+ * direct and, depending on the direct solution, may contain the name of the financial
+ * institution.
*
* @return importSource String
*/
@@ -215,8 +233,11 @@ public String getImportSource() {
}
/**
- * Import source of statement (STMTIMPORTSRC/MANUAL, STMTIMPORTSRC/CSV, STMTIMPORTSRC/QIF,
- * STMTIMPORTSRC/OFX, XeroApi)
+ * Indicates the source of the statement data. Either imported from 1) direct bank feed OR 2)
+ * manual customer entry or upload. Manual import sources are STMTIMPORTSRC/MANUAL,
+ * STMTIMPORTSRC/CSV, STMTIMPORTSRC/OFX, Ofx or STMTIMPORTSRC/QIF. All other import sources are
+ * direct and, depending on the direct solution, may contain the name of the financial
+ * institution.
*
* @param importSource String
*/
@@ -224,6 +245,90 @@ public void setImportSource(String importSource) {
this.importSource = importSource;
}
+ /**
+ * Opening balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @param startBalance Double
+ * @return StatementResponse
+ */
+ public StatementResponse startBalance(Double startBalance) {
+ this.startBalance = startBalance;
+ return this;
+ }
+
+ /**
+ * Opening balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @return startBalance
+ */
+ @ApiModelProperty(
+ value =
+ "Opening balance sourced from imported bank statements (if supplied). Note, for manually"
+ + " uploaded statements, this balance is also manual and usually not supplied.")
+ /**
+ * Opening balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @return startBalance Double
+ */
+ public Double getStartBalance() {
+ return startBalance;
+ }
+
+ /**
+ * Opening balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @param startBalance Double
+ */
+ public void setStartBalance(Double startBalance) {
+ this.startBalance = startBalance;
+ }
+
+ /**
+ * Closing balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @param endBalance Double
+ * @return StatementResponse
+ */
+ public StatementResponse endBalance(Double endBalance) {
+ this.endBalance = endBalance;
+ return this;
+ }
+
+ /**
+ * Closing balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @return endBalance
+ */
+ @ApiModelProperty(
+ value =
+ "Closing balance sourced from imported bank statements (if supplied). Note, for manually"
+ + " uploaded statements, this balance is also manual and usually not supplied.")
+ /**
+ * Closing balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @return endBalance Double
+ */
+ public Double getEndBalance() {
+ return endBalance;
+ }
+
+ /**
+ * Closing balance sourced from imported bank statements (if supplied). Note, for manually
+ * uploaded statements, this balance is also manual and usually not supplied.
+ *
+ * @param endBalance Double
+ */
+ public void setEndBalance(Double endBalance) {
+ this.endBalance = endBalance;
+ }
+
/**
* List of statement lines
*
@@ -287,13 +392,22 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.endDate, statementResponse.endDate)
&& Objects.equals(this.importedDateTimeUtc, statementResponse.importedDateTimeUtc)
&& Objects.equals(this.importSource, statementResponse.importSource)
+ && Objects.equals(this.startBalance, statementResponse.startBalance)
+ && Objects.equals(this.endBalance, statementResponse.endBalance)
&& Objects.equals(this.statementLines, statementResponse.statementLines);
}
@Override
public int hashCode() {
return Objects.hash(
- statementId, startDate, endDate, importedDateTimeUtc, importSource, statementLines);
+ statementId,
+ startDate,
+ endDate,
+ importedDateTimeUtc,
+ importSource,
+ startBalance,
+ endBalance,
+ statementLines);
}
@Override
@@ -307,6 +421,8 @@ public String toString() {
.append(toIndentedString(importedDateTimeUtc))
.append("\n");
sb.append(" importSource: ").append(toIndentedString(importSource)).append("\n");
+ sb.append(" startBalance: ").append(toIndentedString(startBalance)).append("\n");
+ sb.append(" endBalance: ").append(toIndentedString(endBalance)).append("\n");
sb.append(" statementLines: ").append(toIndentedString(statementLines)).append("\n");
sb.append("}");
return sb.toString();
diff --git a/src/main/java/com/xero/models/payrolluk/Employment.java b/src/main/java/com/xero/models/payrolluk/Employment.java
index d732b479..a4861f9b 100644
--- a/src/main/java/com/xero/models/payrolluk/Employment.java
+++ b/src/main/java/com/xero/models/payrolluk/Employment.java
@@ -43,20 +43,35 @@ public enum NiCategoryEnum {
/** C */
C("C"),
+ /** F */
+ F("F"),
+
/** H */
H("H"),
+ /** I */
+ I("I"),
+
/** J */
J("J"),
+ /** L */
+ L("L"),
+
/** M */
M("M"),
- /** Z */
- Z("Z"),
+ /** S */
+ S("S"),
+
+ /** V */
+ V("V"),
/** X */
- X("X");
+ X("X"),
+
+ /** Z */
+ Z("Z");
private String value;
diff --git a/src/test/java/com/xero/api/client/FinanceApiTest.java b/src/test/java/com/xero/api/client/FinanceApiTest.java
index ab7db49c..01899a97 100644
--- a/src/test/java/com/xero/api/client/FinanceApiTest.java
+++ b/src/test/java/com/xero/api/client/FinanceApiTest.java
@@ -236,14 +236,14 @@ public void testGetFinancialStatementContactsExpense() throws Exception {
}
@Test
- public void testgetBankStatementAccounting() throws Exception {
+ public void testGetBankStatementAccounting() throws Exception {
System.out.println("@Test - getBankStatementAccounting");
UUID bankAccountID = UUID.fromString("1234eee9-47f0-4179-bd46-9adb4f21cc7f");
try {
BankStatementAccountingResponse response = financeApi.getBankStatementAccounting(accessToken, "73151de8-3676-4887-a021-edec960dd537", bankAccountID, "2021-01-01", "2021-01-02", null);
assertThat(response.getStatements().get(0).getStatementId().toString(), (equalTo("7c29eee9-47f0-4179-bd46-9adb4f21cc7f")));
assertThat(response.getStatements().get(0).getStatementLines().get(0).getPayments().get(0).getInvoice().getContact().getContactName(), (equalTo("Bob")));
-
+ assertThat(response.getStatements().get(0).getEndBalance(), (equalTo(200.0)));
} catch (XeroApiException xe) {
System.out.println(xe.toString());
}