createAccount
@@ -12419,6 +12431,7 @@ Usage and SDK Samples
Boolean summarizeErrors = true;
Integer unitdp = 4;
String idempotencyKey = 'KEY_VALUE';
+ Boolean allowBackorders = true;
LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
LocalDate dueDateValue = LocalDate.of(2020, Month.OCTOBER, 28);
@@ -12455,7 +12468,7 @@ Usage and SDK Samples
invoices.addInvoicesItem(invoice);
try {
- Invoices result = apiInstance.createInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey);
+ Invoices result = apiInstance.createInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, allowBackorders);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#createInvoices");
@@ -12625,6 +12638,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
@@ -22455,9 +22488,10 @@ Usage and SDK Samples
Integer page = 1;
Integer unitdp = 4;
Integer pageSize = 100;
+ array[String] references = "Ref1", "Ref2";
try {
- BankTransactions result = apiInstance.getBankTransactions(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize);
+ BankTransactions result = apiInstance.getBankTransactions(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, references);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#getBankTransactions");
@@ -22639,6 +22673,26 @@ Parameters
+
+
+ References
+
+
+
+
+
+
+
+ array[String]
+
+
+
+Filter by a comma-separated list of References
+
+
+
+
+
@@ -33737,9 +33791,10 @@ Usage and SDK Samples
Integer unitdp = 4;
Integer pageSize = 100;
array[String] invoiceNumbers = "INV-001", "INV-002";
+ array[String] references = "Ref1", "Ref2";
try {
- Prepayments result = apiInstance.getPrepayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, invoiceNumbers);
+ Prepayments result = apiInstance.getPrepayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, invoiceNumbers, references);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#getPrepayments");
@@ -33875,7 +33930,7 @@ Parameters
-e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
+e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
@@ -33941,6 +33996,26 @@ Parameters
+
+
+ References
+
+
+
+
+
+
+
+ array[String]
+
+
+
+Filter by a comma-separated list of References
+
+
+
+
+
@@ -43774,6 +43849,7 @@ Usage and SDK Samples
UUID invoiceID = '00000000-0000-0000-0000-000000000000';
Integer unitdp = 4;
String idempotencyKey = 'KEY_VALUE';
+ Boolean allowBackorders = true;
Invoice invoice = new Invoice();
invoice.setReference("I am Iron man");
@@ -43782,7 +43858,7 @@ Usage and SDK Samples
invoices.addInvoicesItem(invoice);
try {
- Invoices result = apiInstance.updateInvoice(accessToken, xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey);
+ Invoices result = apiInstance.updateInvoice(accessToken, xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey, allowBackorders);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#updateInvoice");
@@ -43953,6 +44029,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
@@ -45747,6 +45843,7 @@ Usage and SDK Samples
Boolean summarizeErrors = true;
Integer unitdp = 4;
String idempotencyKey = 'KEY_VALUE';
+ Boolean allowBackorders = true;
LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
LocalDate dueDateValue = LocalDate.of(2020, Month.OCTOBER, 28);
@@ -45775,7 +45872,7 @@ Usage and SDK Samples
invoices.addInvoicesItem(invoice);
try {
- Invoices result = apiInstance.updateOrCreateInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey);
+ Invoices result = apiInstance.updateOrCreateInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, allowBackorders);
System.out.println(result);
} catch (XeroException e) {
System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices");
@@ -45944,6 +46041,26 @@ Parameters
+
+
+ allowBackorders
+
+
+
+
+
+
+
+ Boolean
+
+
+
+Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
+
+
+
+
+
diff --git a/docs/v4/appstore/index.html b/docs/v4/appstore/index.html
index 3caafce6..e8cc24f6 100644
--- a/docs/v4/appstore/index.html
+++ b/docs/v4/appstore/index.html
@@ -1238,7 +1238,7 @@
-
+
getSubscription
diff --git a/docs/v4/assets/index.html b/docs/v4/assets/index.html
index 9c33d5d0..60dc4c58 100644
--- a/docs/v4/assets/index.html
+++ b/docs/v4/assets/index.html
@@ -1416,7 +1416,7 @@
-
+
createAsset
diff --git a/docs/v4/files/index.html b/docs/v4/files/index.html
index 86875825..92c432a7 100644
--- a/docs/v4/files/index.html
+++ b/docs/v4/files/index.html
@@ -1155,7 +1155,7 @@
-
+
createFileAssociation
diff --git a/docs/v4/finance/index.html b/docs/v4/finance/index.html
index 8d067e48..991563a2 100644
--- a/docs/v4/finance/index.html
+++ b/docs/v4/finance/index.html
@@ -2372,7 +2372,7 @@
-
+
getBankStatementAccounting
diff --git a/docs/v4/payroll-au-v2/index.html b/docs/v4/payroll-au-v2/index.html
index 22fc3792..341a568c 100644
--- a/docs/v4/payroll-au-v2/index.html
+++ b/docs/v4/payroll-au-v2/index.html
@@ -1156,7 +1156,7 @@
-
+
approveTimesheet
diff --git a/docs/v4/payroll-au/index.html b/docs/v4/payroll-au/index.html
index 1e73d6eb..f8ec7e2f 100644
--- a/docs/v4/payroll-au/index.html
+++ b/docs/v4/payroll-au/index.html
@@ -3449,7 +3449,7 @@
-
+
approveLeaveApplication
diff --git a/docs/v4/payroll-nz/index.html b/docs/v4/payroll-nz/index.html
index 1ff54541..bcb5db3a 100644
--- a/docs/v4/payroll-nz/index.html
+++ b/docs/v4/payroll-nz/index.html
@@ -4064,7 +4064,7 @@
-
+
approveTimesheet
diff --git a/docs/v4/payroll-uk/index.html b/docs/v4/payroll-uk/index.html
index 881f5af6..d25860d0 100644
--- a/docs/v4/payroll-uk/index.html
+++ b/docs/v4/payroll-uk/index.html
@@ -3697,7 +3697,7 @@
-
+
approveTimesheet
diff --git a/pom.xml b/pom.xml
index 44a3d112..62fb050e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
xero-java
jar
xero-java
- 18.0.0
+ 18.1.0
https://github.com/XeroAPI/Xero-Java
This is the official Java SDK for Xero API
diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java
index cca169e4..ac7df072 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.0";
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);
/** AccountingApi */
@@ -264,7 +264,16 @@ public Prepayments getPrepayments(
Integer pageSize)
throws IOException {
return getPrepayments(
- accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, null);
+ accessToken,
+ xeroTenantId,
+ ifModifiedSince,
+ where,
+ order,
+ page,
+ unitdp,
+ pageSize,
+ null,
+ null);
}
/**
@@ -296,7 +305,16 @@ public HttpResponse getPrepaymentsForHttpResponse(
Integer pageSize)
throws IOException {
return getPrepaymentsForHttpResponse(
- accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize, null);
+ accessToken,
+ xeroTenantId,
+ ifModifiedSince,
+ where,
+ order,
+ page,
+ unitdp,
+ pageSize,
+ null,
+ null);
}
/* End backward compatibility functions */
@@ -4643,6 +4661,9 @@ public HttpResponse createInvoiceHistoryForHttpResponse(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @param accessToken Authorization token for user set in header of each request
* @return Invoices
* @throws IOException if an error occurs while attempting to invoke the API *
@@ -4653,13 +4674,20 @@ public Invoices createInvoices(
Invoices invoices,
Boolean summarizeErrors,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
try {
TypeReference typeRef = new TypeReference() {};
HttpResponse response =
createInvoicesForHttpResponse(
- accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey);
+ accessToken,
+ xeroTenantId,
+ invoices,
+ summarizeErrors,
+ unitdp,
+ idempotencyKey,
+ allowBackorders);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
@@ -4703,6 +4731,9 @@ public Invoices createInvoices(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @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
@@ -4713,7 +4744,8 @@ public HttpResponse createInvoicesForHttpResponse(
Invoices invoices,
Boolean summarizeErrors,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
@@ -4774,6 +4806,26 @@ public HttpResponse createInvoicesForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
+ if (allowBackorders != null) {
+ String key = "allowBackorders";
+ Object value = allowBackorders;
+ if (value instanceof Collection) {
+ List valueList = new ArrayList<>((Collection) value);
+ if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
+ List list = new ArrayList();
+ for (int i = 0; i < valueList.size(); i++) {
+ list.add(valueList.get(i).toString());
+ }
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
+ }
+ } 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()) {
@@ -12192,6 +12244,7 @@ public HttpResponse getBankTransactionAttachmentsForHttpResponse(
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
+ * @param references Filter by a comma-separated list of References
* @param accessToken Authorization token for user set in header of each request
* @return BankTransactions
* @throws IOException if an error occurs while attempting to invoke the API *
@@ -12204,13 +12257,22 @@ public BankTransactions getBankTransactions(
String order,
Integer page,
Integer unitdp,
- Integer pageSize)
+ Integer pageSize,
+ List references)
throws IOException {
try {
TypeReference typeRef = new TypeReference() {};
HttpResponse response =
getBankTransactionsForHttpResponse(
- accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, pageSize);
+ accessToken,
+ xeroTenantId,
+ ifModifiedSince,
+ where,
+ order,
+ page,
+ unitdp,
+ pageSize,
+ references);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
@@ -12243,6 +12305,7 @@ public BankTransactions getBankTransactions(
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
+ * @param references Filter by a comma-separated list of References
* @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
@@ -12255,7 +12318,8 @@ public HttpResponse getBankTransactionsForHttpResponse(
String order,
Integer page,
Integer unitdp,
- Integer pageSize)
+ Integer pageSize,
+ List references)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
@@ -12374,6 +12438,26 @@ public HttpResponse getBankTransactionsForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
+ if (references != null) {
+ String key = "References";
+ Object value = references;
+ if (value instanceof Collection) {
+ List valueList = new ArrayList<>((Collection) value);
+ if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
+ List list = new ArrayList();
+ for (int i = 0; i < valueList.size(); i++) {
+ list.add(valueList.get(i).toString());
+ }
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
+ }
+ } 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()) {
@@ -20757,11 +20841,12 @@ public HttpResponse getPrepaymentHistoryForHttpResponse(
* @param where Filter by an any element
* @param order Order by an any element
* @param page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with
- * line items shown for each overpayment
+ * line items shown for each prepayment
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @param invoiceNumbers Filter by a comma-separated list of InvoiceNumbers
+ * @param references Filter by a comma-separated list of References
* @param accessToken Authorization token for user set in header of each request
* @return Prepayments
* @throws IOException if an error occurs while attempting to invoke the API *
@@ -20775,7 +20860,8 @@ public Prepayments getPrepayments(
Integer page,
Integer unitdp,
Integer pageSize,
- List invoiceNumbers)
+ List invoiceNumbers,
+ List references)
throws IOException {
try {
TypeReference typeRef = new TypeReference() {};
@@ -20789,7 +20875,8 @@ public Prepayments getPrepayments(
page,
unitdp,
pageSize,
- invoiceNumbers);
+ invoiceNumbers,
+ references);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
@@ -20817,11 +20904,12 @@ public Prepayments getPrepayments(
* @param where Filter by an any element
* @param order Order by an any element
* @param page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with
- * line items shown for each overpayment
+ * line items shown for each prepayment
* @param unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal
* places for unit amounts
* @param pageSize Number of records to retrieve per page
* @param invoiceNumbers Filter by a comma-separated list of InvoiceNumbers
+ * @param references Filter by a comma-separated list of References
* @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
@@ -20835,7 +20923,8 @@ public HttpResponse getPrepaymentsForHttpResponse(
Integer page,
Integer unitdp,
Integer pageSize,
- List invoiceNumbers)
+ List invoiceNumbers,
+ List references)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
@@ -20974,6 +21063,26 @@ public HttpResponse getPrepaymentsForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
+ if (references != null) {
+ String key = "References";
+ Object value = references;
+ if (value instanceof Collection) {
+ List valueList = new ArrayList<>((Collection) value);
+ if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
+ List list = new ArrayList();
+ for (int i = 0; i < valueList.size(); i++) {
+ list.add(valueList.get(i).toString());
+ }
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
+ }
+ } 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()) {
@@ -28922,6 +29031,9 @@ public HttpResponse updateExpenseClaimForHttpResponse(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @param accessToken Authorization token for user set in header of each request
* @return Invoices
* @throws IOException if an error occurs while attempting to invoke the API *
@@ -28932,13 +29044,20 @@ public Invoices updateInvoice(
UUID invoiceID,
Invoices invoices,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
try {
TypeReference typeRef = new TypeReference() {};
HttpResponse response =
updateInvoiceForHttpResponse(
- accessToken, xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey);
+ accessToken,
+ xeroTenantId,
+ invoiceID,
+ invoices,
+ unitdp,
+ idempotencyKey,
+ allowBackorders);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
@@ -28981,6 +29100,9 @@ public Invoices updateInvoice(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @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
@@ -28991,7 +29113,8 @@ public HttpResponse updateInvoiceForHttpResponse(
UUID invoiceID,
Invoices invoices,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
@@ -29040,6 +29163,26 @@ public HttpResponse updateInvoiceForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
+ if (allowBackorders != null) {
+ String key = "allowBackorders";
+ Object value = allowBackorders;
+ if (value instanceof Collection) {
+ List valueList = new ArrayList<>((Collection) value);
+ if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
+ List list = new ArrayList();
+ for (int i = 0; i < valueList.size(); i++) {
+ list.add(valueList.get(i).toString());
+ }
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
+ }
+ } else if (value instanceof Object[]) {
+ uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, value);
+ }
+ }
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
if (logger.isDebugEnabled()) {
@@ -30539,6 +30682,9 @@ public HttpResponse updateOrCreateCreditNotesForHttpResponse(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @param accessToken Authorization token for user set in header of each request
* @return Invoices
* @throws IOException if an error occurs while attempting to invoke the API *
@@ -30549,13 +30695,20 @@ public Invoices updateOrCreateInvoices(
Invoices invoices,
Boolean summarizeErrors,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
try {
TypeReference typeRef = new TypeReference() {};
HttpResponse response =
updateOrCreateInvoicesForHttpResponse(
- accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey);
+ accessToken,
+ xeroTenantId,
+ invoices,
+ summarizeErrors,
+ unitdp,
+ idempotencyKey,
+ allowBackorders);
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
} catch (HttpResponseException e) {
if (logger.isDebugEnabled()) {
@@ -30599,6 +30752,9 @@ public Invoices updateOrCreateInvoices(
* places for unit amounts
* @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
* processing. 128 character max.
+ * @param allowBackorders Allows an invoice to be created even when one or more line items contain
+ * tracked inventory where the invoice quantity would cause the available quantity to go
+ * negative
* @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
@@ -30609,7 +30765,8 @@ public HttpResponse updateOrCreateInvoicesForHttpResponse(
Invoices invoices,
Boolean summarizeErrors,
Integer unitdp,
- String idempotencyKey)
+ String idempotencyKey,
+ Boolean allowBackorders)
throws IOException {
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null) {
@@ -30670,6 +30827,26 @@ public HttpResponse updateOrCreateInvoicesForHttpResponse(
uriBuilder = uriBuilder.queryParam(key, value);
}
}
+ if (allowBackorders != null) {
+ String key = "allowBackorders";
+ Object value = allowBackorders;
+ if (value instanceof Collection) {
+ List valueList = new ArrayList<>((Collection) value);
+ if (!valueList.isEmpty() && valueList.get(0) instanceof UUID) {
+ List list = new ArrayList();
+ for (int i = 0; i < valueList.size(); i++) {
+ list.add(valueList.get(i).toString());
+ }
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", list));
+ } else {
+ uriBuilder = uriBuilder.queryParam(key, String.join(",", valueList));
+ }
+ } 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()) {
diff --git a/src/main/java/com/xero/api/client/AppStoreApi.java b/src/main/java/com/xero/api/client/AppStoreApi.java
index 0d09a950..f6592f5f 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 2c97f4b9..2d33ec6d 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 ed20a328..2ea5f0e6 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 43c1d7e2..4a06ff18 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 46231fc1..f16ab274 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 d26b665a..e85c3ec2 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 32b56b93..b21214b1 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 0046cf80..f7a51dc0 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 dc0f4bca..38b6bc4e 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.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 44394d4d..78cb5f28 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.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 = "18.0.0";
+ private String version = "18.1.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 f1e89217..6d903585 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: 16.1.0
+ * The version of the OpenAPI document: 16.2.0
* 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.0.0";
+ private String version = "18.1.0";
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);
/** ProjectApi */
diff --git a/src/main/java/com/xero/models/accounting/Item.java b/src/main/java/com/xero/models/accounting/Item.java
index 48c6ecff..d6a13f38 100644
--- a/src/main/java/com/xero/models/accounting/Item.java
+++ b/src/main/java/com/xero/models/accounting/Item.java
@@ -61,6 +61,12 @@ public class Item {
@JsonProperty("QuantityOnHand")
private Double quantityOnHand;
+ @JsonProperty("QuantityAvailable")
+ private Double quantityAvailable;
+
+ @JsonProperty("QuantityOnBackOrder")
+ private Double quantityOnBackOrder;
+
@JsonProperty("UpdatedDateUTC")
private String updatedDateUTC;
@@ -498,7 +504,8 @@ public void setTotalCostPool(Double totalCostPool) {
}
/**
- * The quantity of the item on hand
+ * The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater
+ * than 0.
*
* @param quantityOnHand Double
* @return Item
@@ -509,13 +516,18 @@ public Item quantityOnHand(Double quantityOnHand) {
}
/**
- * The quantity of the item on hand
+ * The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater
+ * than 0.
*
* @return quantityOnHand
*/
- @ApiModelProperty(value = "The quantity of the item on hand")
+ @ApiModelProperty(
+ value =
+ "The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater"
+ + " than 0.")
/**
- * The quantity of the item on hand
+ * The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater
+ * than 0.
*
* @return quantityOnHand Double
*/
@@ -524,7 +536,8 @@ public Double getQuantityOnHand() {
}
/**
- * The quantity of the item on hand
+ * The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater
+ * than 0.
*
* @param quantityOnHand Double
*/
@@ -532,6 +545,49 @@ public void setQuantityOnHand(Double quantityOnHand) {
this.quantityOnHand = quantityOnHand;
}
+ /**
+ * The quantity of the item available. This is equal to `QuantityOnHand` -
+ * `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder`
+ * is greater than 0.
+ *
+ * @return quantityAvailable
+ */
+ @ApiModelProperty(
+ value =
+ "The quantity of the item available. This is equal to `QuantityOnHand` -"
+ + " `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is"
+ + " greater than 0.")
+ /**
+ * The quantity of the item available. This is equal to `QuantityOnHand` -
+ * `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder`
+ * is greater than 0.
+ *
+ * @return quantityAvailable Double
+ */
+ public Double getQuantityAvailable() {
+ return quantityAvailable;
+ }
+
+ /**
+ * The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater
+ * than 0.
+ *
+ * @return quantityOnBackOrder
+ */
+ @ApiModelProperty(
+ value =
+ "The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater"
+ + " than 0.")
+ /**
+ * The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater
+ * than 0.
+ *
+ * @return quantityOnBackOrder Double
+ */
+ public Double getQuantityOnBackOrder() {
+ return quantityOnBackOrder;
+ }
+
/**
* Last modified date in UTC format
*
@@ -703,6 +759,8 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.isTrackedAsInventory, item.isTrackedAsInventory)
&& Objects.equals(this.totalCostPool, item.totalCostPool)
&& Objects.equals(this.quantityOnHand, item.quantityOnHand)
+ && Objects.equals(this.quantityAvailable, item.quantityAvailable)
+ && Objects.equals(this.quantityOnBackOrder, item.quantityOnBackOrder)
&& Objects.equals(this.updatedDateUTC, item.updatedDateUTC)
&& Objects.equals(this.itemID, item.itemID)
&& Objects.equals(this.statusAttributeString, item.statusAttributeString)
@@ -724,6 +782,8 @@ public int hashCode() {
isTrackedAsInventory,
totalCostPool,
quantityOnHand,
+ quantityAvailable,
+ quantityOnBackOrder,
updatedDateUTC,
itemID,
statusAttributeString,
@@ -752,6 +812,10 @@ public String toString() {
.append("\n");
sb.append(" totalCostPool: ").append(toIndentedString(totalCostPool)).append("\n");
sb.append(" quantityOnHand: ").append(toIndentedString(quantityOnHand)).append("\n");
+ sb.append(" quantityAvailable: ").append(toIndentedString(quantityAvailable)).append("\n");
+ sb.append(" quantityOnBackOrder: ")
+ .append(toIndentedString(quantityOnBackOrder))
+ .append("\n");
sb.append(" updatedDateUTC: ").append(toIndentedString(updatedDateUTC)).append("\n");
sb.append(" itemID: ").append(toIndentedString(itemID)).append("\n");
sb.append(" statusAttributeString: ")
diff --git a/src/test/java/com/xero/api/client/AccountingApiBankTransactionTest.java b/src/test/java/com/xero/api/client/AccountingApiBankTransactionTest.java
index 3f50e03a..1d52fad5 100644
--- a/src/test/java/com/xero/api/client/AccountingApiBankTransactionTest.java
+++ b/src/test/java/com/xero/api/client/AccountingApiBankTransactionTest.java
@@ -61,7 +61,7 @@ public void testGetBankTransactions() throws Exception {
Integer page = null;
Integer unitdp = null;
Integer pageSize = null;
- BankTransactions response = accountingApi.getBankTransactions(accessToken,xeroTenantId,ifModifiedSince, where, order, page, unitdp, pageSize);
+ BankTransactions response = accountingApi.getBankTransactions(accessToken,xeroTenantId,ifModifiedSince, where, order, page, unitdp, pageSize, null);
assertThat(response.getBankTransactions().get(0).getBankTransactionID(), is(equalTo(UUID.fromString("db54aab0-ad40-4ced-bcff-0940ba20db2c"))));
assertThat(response.getBankTransactions().get(0).getStatus(), is(equalTo(com.xero.models.accounting.BankTransaction.StatusEnum.AUTHORISED)));
assertThat(response.getBankTransactions().get(0).getType(), is(equalTo(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE)));
diff --git a/src/test/java/com/xero/api/client/AccountingApiInvoicesTest.java b/src/test/java/com/xero/api/client/AccountingApiInvoicesTest.java
index 585445b3..5912f8ed 100644
--- a/src/test/java/com/xero/api/client/AccountingApiInvoicesTest.java
+++ b/src/test/java/com/xero/api/client/AccountingApiInvoicesTest.java
@@ -61,7 +61,7 @@ public void tearDown() {
public void createInvoiceTest() throws IOException {
System.out.println("@Test - createInvoices");
Invoices invoices = new Invoices();
- Invoices response = accountingApi.createInvoices(accessToken, xeroTenantId, invoices, false, 4, null);
+ Invoices response = accountingApi.createInvoices(accessToken, xeroTenantId, invoices, false, 4, null, null);
assertThat(response.getInvoices().get(0).getType(), is(equalTo(com.xero.models.accounting.Invoice.TypeEnum.ACCREC)));
assertThat(response.getInvoices().get(0).getDateAsDate(), is(equalTo(LocalDate.of(2019, 03, 11))));
@@ -256,7 +256,7 @@ public void updateInvoiceTest() throws IOException {
System.out.println("@Test - updateInvoice");
UUID invoiceID = UUID.fromString("8138a266-fb42-49b2-a104-014b7045753d");
Invoices invoices = new Invoices();
- Invoices response = accountingApi.updateInvoice(accessToken,xeroTenantId,invoiceID, invoices,4, null);
+ Invoices response = accountingApi.updateInvoice(accessToken,xeroTenantId,invoiceID, invoices,4, null, null);
assertThat(response.getInvoices().get(0).getType(), is(equalTo(com.xero.models.accounting.Invoice.TypeEnum.ACCREC)));
assertThat(response.getInvoices().get(0).getDateAsDate(), is(equalTo(LocalDate.of(2019,03,11))));