-
-
import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.PayrollUkApi;
-import org.openapitools.client.models.payrollUk.*;
-
-import java.io.File;
-import java.util.*;
-
-public class PayrollUkApiExample {
- private PayrollUkApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'xeroTenantId_example';
- UUID payRunID = UUID.fromString("38400000-8cf0-11bd-b23e-10b96e4ef00d");
- UUID payRunID = '38400000-8cf0-11bd-b23e-10b96e4ef00d';
- String idempotencyKey = 'KEY_VALUE';
- LocalDate startDate = LocalDate.of(2020, Month.OCTOBER, 28);
- LocalDate paymentDate = LocalDate.of(2020, Month.OCTOBER, 30);
-
- PayRunCalendar payRunCalendar = new PayRunCalendar();
- payRunCalendar.setCalendarType(com.xero.models.payrolluk.CalendarType.WEEKLY);
- payRunCalendar.setPeriodStartDate(startDate);
- payRunCalendar.setPaymentDate(paymentDate);
-
- try {
- PayRunObject result = apiInstance.updatePayRun(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling PayrollUkApi#updatePayRun");
- e.printStackTrace();
- }
- }
-}
-
-
-
diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java
index 527b6d3b..16b0f915 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: 9.1.0
+ * The version of the OpenAPI document: 9.2.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -102,7 +102,7 @@ public class AccountingApi {
private ApiClient apiClient;
private static AccountingApi instance = null;
private String userAgent = "Default";
- private String version = "12.1.0";
+ private String version = "12.2.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 8e974ba9..d54400df 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 e14d1062..4ec49c30 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 01c0b95b..eea21d08 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 fdb7f5aa..e3f91b2b 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 18bfa45b..b5bad50d 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: 9.1.0
+ * The version of the OpenAPI document: 9.2.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -53,7 +53,7 @@ public class FinanceApi {
private ApiClient apiClient;
private static FinanceApi instance = null;
private String userAgent = "Default";
- private String version = "12.1.0";
+ private String version = "12.2.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 8e41780d..076ae3d4 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 baa2cf1d..7edf3d2d 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.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 741985ee..4220acbb 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.0";
static final Logger logger = LoggerFactory.getLogger(PayrollNzApi.class);
/** PayrollNzApi */
@@ -7951,120 +7951,6 @@ public HttpResponse updateEmployeeTaxForHttpResponse(
.execute();
}
- /**
- * Updates a pay run
- *
- * 200 - search results matching criteria
- *
- *
400 - validation error for a bad request
- *
- * @param xeroTenantId Xero identifier for Tenant
- * @param payRunID Identifier for the pay run
- * @param payRun The payRun parameter
- * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
- * processing. 128 character max.
- * @param accessToken Authorization token for user set in header of each request
- * @return PayRunObject
- * @throws IOException if an error occurs while attempting to invoke the API *
- */
- public PayRunObject updatePayRun(
- String accessToken, String xeroTenantId, UUID payRunID, PayRun payRun, String idempotencyKey)
- throws IOException {
- try {
- TypeReference typeRef = new TypeReference() {};
- HttpResponse response =
- updatePayRunForHttpResponse(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey);
- return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
- } catch (HttpResponseException e) {
- if (logger.isDebugEnabled()) {
- logger.debug(
- "------------------ HttpResponseException "
- + e.getStatusCode()
- + " : updatePayRun -------------------");
- logger.debug(e.toString());
- }
- XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
- if (e.getStatusCode() == 400 || e.getStatusCode() == 405) {
- TypeReference errorTypeRef = new TypeReference() {};
- PayRunObject object = apiClient.getObjectMapper().readValue(e.getContent(), errorTypeRef);
- handler.validationError(e.getStatusCode(), "PayRunObject", object.getProblem(), e);
- } else {
- handler.execute(e);
- }
- } catch (IOException ioe) {
- throw ioe;
- }
- return null;
- }
-
- /**
- * Updates a pay run
- *
- * 200 - search results matching criteria
- *
- *
400 - validation error for a bad request
- *
- * @param xeroTenantId Xero identifier for Tenant
- * @param payRunID Identifier for the pay run
- * @param payRun The payRun parameter
- * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
- * processing. 128 character max.
- * @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 updatePayRunForHttpResponse(
- String accessToken, String xeroTenantId, UUID payRunID, PayRun payRun, String idempotencyKey)
- throws IOException {
- // verify the required parameter 'xeroTenantId' is set
- if (xeroTenantId == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'xeroTenantId' when calling updatePayRun");
- } // verify the required parameter 'payRunID' is set
- if (payRunID == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'payRunID' when calling updatePayRun");
- } // verify the required parameter 'payRun' is set
- if (payRun == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'payRun' when calling updatePayRun");
- }
- if (accessToken == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'accessToken' when calling updatePayRun");
- }
- HttpHeaders headers = new HttpHeaders();
- headers.set("Xero-Tenant-Id", xeroTenantId);
- headers.set("Idempotency-Key", idempotencyKey);
- headers.setAccept("application/json");
- headers.setContentType("application/json");
- headers.setUserAgent(this.getUserAgent());
- // create a map of path variables
- final Map uriVariables = new HashMap();
- uriVariables.put("PayRunID", payRunID);
-
- UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/PayRuns/{PayRunID}");
- String url = uriBuilder.buildFromMap(uriVariables).toString();
- GenericUrl genericUrl = new GenericUrl(url);
- if (logger.isDebugEnabled()) {
- logger.debug("PUT " + genericUrl.toString());
- }
-
- HttpContent content = null;
- content = apiClient.new JacksonJsonHttpContent(payRun);
-
- Credential credential =
- new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
- HttpTransport transport = apiClient.getHttpTransport();
- HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
- return requestFactory
- .buildRequest(HttpMethods.PUT, genericUrl, content)
- .setHeaders(headers)
- .setConnectTimeout(apiClient.getConnectionTimeout())
- .setReadTimeout(apiClient.getReadTimeout())
- .execute();
- }
-
/**
* Creates an employee pay slip
*
diff --git a/src/main/java/com/xero/api/client/PayrollUkApi.java b/src/main/java/com/xero/api/client/PayrollUkApi.java
index 611ee839..8334fad8 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: 9.1.0
+ * The version of the OpenAPI document: 9.2.0
* Contact: api@xero.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -63,7 +63,6 @@
import com.xero.models.payrolluk.LeaveType;
import com.xero.models.payrolluk.LeaveTypeObject;
import com.xero.models.payrolluk.LeaveTypes;
-import com.xero.models.payrolluk.PayRun;
import com.xero.models.payrolluk.PayRunCalendar;
import com.xero.models.payrolluk.PayRunCalendarObject;
import com.xero.models.payrolluk.PayRunCalendars;
@@ -106,7 +105,7 @@ public class PayrollUkApi {
private ApiClient apiClient;
private static PayrollUkApi instance = null;
private String userAgent = "Default";
- private String version = "12.1.0";
+ private String version = "12.2.0";
static final Logger logger = LoggerFactory.getLogger(PayrollUkApi.class);
/** PayrollUkApi */
@@ -7877,120 +7876,6 @@ public HttpResponse updateEmployeeSalaryAndWageForHttpResponse(
.execute();
}
- /**
- * Updates a specific pay run
- *
- * 200 - search results matching criteria
- *
- *
400 - validation error for a bad request
- *
- * @param xeroTenantId Xero identifier for Tenant
- * @param payRunID Identifier for the pay run
- * @param payRun The payRun parameter
- * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
- * processing. 128 character max.
- * @param accessToken Authorization token for user set in header of each request
- * @return PayRunObject
- * @throws IOException if an error occurs while attempting to invoke the API *
- */
- public PayRunObject updatePayRun(
- String accessToken, String xeroTenantId, UUID payRunID, PayRun payRun, String idempotencyKey)
- throws IOException {
- try {
- TypeReference typeRef = new TypeReference() {};
- HttpResponse response =
- updatePayRunForHttpResponse(accessToken, xeroTenantId, payRunID, payRun, idempotencyKey);
- return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
- } catch (HttpResponseException e) {
- if (logger.isDebugEnabled()) {
- logger.debug(
- "------------------ HttpResponseException "
- + e.getStatusCode()
- + " : updatePayRun -------------------");
- logger.debug(e.toString());
- }
- XeroApiExceptionHandler handler = new XeroApiExceptionHandler();
- if (e.getStatusCode() == 400 || e.getStatusCode() == 405) {
- TypeReference errorTypeRef = new TypeReference() {};
- PayRunObject object = apiClient.getObjectMapper().readValue(e.getContent(), errorTypeRef);
- handler.validationError(e.getStatusCode(), "PayRunObject", object.getProblem(), e);
- } else {
- handler.execute(e);
- }
- } catch (IOException ioe) {
- throw ioe;
- }
- return null;
- }
-
- /**
- * Updates a specific pay run
- *
- * 200 - search results matching criteria
- *
- *
400 - validation error for a bad request
- *
- * @param xeroTenantId Xero identifier for Tenant
- * @param payRunID Identifier for the pay run
- * @param payRun The payRun parameter
- * @param idempotencyKey This allows you to safely retry requests without the risk of duplicate
- * processing. 128 character max.
- * @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 updatePayRunForHttpResponse(
- String accessToken, String xeroTenantId, UUID payRunID, PayRun payRun, String idempotencyKey)
- throws IOException {
- // verify the required parameter 'xeroTenantId' is set
- if (xeroTenantId == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'xeroTenantId' when calling updatePayRun");
- } // verify the required parameter 'payRunID' is set
- if (payRunID == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'payRunID' when calling updatePayRun");
- } // verify the required parameter 'payRun' is set
- if (payRun == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'payRun' when calling updatePayRun");
- }
- if (accessToken == null) {
- throw new IllegalArgumentException(
- "Missing the required parameter 'accessToken' when calling updatePayRun");
- }
- HttpHeaders headers = new HttpHeaders();
- headers.set("Xero-Tenant-Id", xeroTenantId);
- headers.set("Idempotency-Key", idempotencyKey);
- headers.setAccept("application/json");
- headers.setContentType("application/json");
- headers.setUserAgent(this.getUserAgent());
- // create a map of path variables
- final Map uriVariables = new HashMap();
- uriVariables.put("PayRunID", payRunID);
-
- UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/PayRuns/{PayRunID}");
- String url = uriBuilder.buildFromMap(uriVariables).toString();
- GenericUrl genericUrl = new GenericUrl(url);
- if (logger.isDebugEnabled()) {
- logger.debug("PUT " + genericUrl.toString());
- }
-
- HttpContent content = null;
- content = apiClient.new JacksonJsonHttpContent(payRun);
-
- Credential credential =
- new Credential(BearerToken.authorizationHeaderAccessMethod()).setAccessToken(accessToken);
- HttpTransport transport = apiClient.getHttpTransport();
- HttpRequestFactory requestFactory = transport.createRequestFactory(credential);
- return requestFactory
- .buildRequest(HttpMethods.PUT, genericUrl, content)
- .setHeaders(headers)
- .setConnectTimeout(apiClient.getConnectionTimeout())
- .setReadTimeout(apiClient.getReadTimeout())
- .execute();
- }
-
/**
* Updates a specific timesheet line for a specific timesheet
*
diff --git a/src/main/java/com/xero/api/client/ProjectApi.java b/src/main/java/com/xero/api/client/ProjectApi.java
index 7cb64bb7..0d73d416 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: 9.1.0
+ * The version of the OpenAPI document: 9.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 = "12.1.0";
+ private String version = "12.2.0";
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);
/** ProjectApi */
diff --git a/src/main/java/com/xero/models/accounting/Contact.java b/src/main/java/com/xero/models/accounting/Contact.java
index 06306e99..baec9b25 100644
--- a/src/main/java/com/xero/models/accounting/Contact.java
+++ b/src/main/java/com/xero/models/accounting/Contact.java
@@ -119,6 +119,68 @@ public static ContactStatusEnum fromValue(String value) {
@JsonProperty("TaxNumber")
private String taxNumber;
+ /**
+ * Identifier of the regional type of tax number, such as US, UK, or other regional tax
+ * identifiers
+ */
+ public enum TaxNumberTypeEnum {
+ /** SSN */
+ SSN("SSN"),
+
+ /** EIN */
+ EIN("EIN"),
+
+ /** ITIN */
+ ITIN("ITIN"),
+
+ /** ATIN */
+ ATIN("ATIN");
+
+ private String value;
+
+ TaxNumberTypeEnum(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 TaxNumberTypeEnum fromValue(String value) {
+ for (TaxNumberTypeEnum b : TaxNumberTypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("TaxNumberType")
+ private TaxNumberTypeEnum taxNumberType;
+
@JsonProperty("AccountsReceivableTaxType")
private String accountsReceivableTaxType;
@@ -829,6 +891,48 @@ public void setTaxNumber(String taxNumber) {
this.taxNumber = taxNumber;
}
+ /**
+ * Identifier of the regional type of tax number, such as US, UK, or other regional tax
+ * identifiers
+ *
+ * @param taxNumberType TaxNumberTypeEnum
+ * @return Contact
+ */
+ public Contact taxNumberType(TaxNumberTypeEnum taxNumberType) {
+ this.taxNumberType = taxNumberType;
+ return this;
+ }
+
+ /**
+ * Identifier of the regional type of tax number, such as US, UK, or other regional tax
+ * identifiers
+ *
+ * @return taxNumberType
+ */
+ @ApiModelProperty(
+ value =
+ "Identifier of the regional type of tax number, such as US, UK, or other regional tax"
+ + " identifiers")
+ /**
+ * Identifier of the regional type of tax number, such as US, UK, or other regional tax
+ * identifiers
+ *
+ * @return taxNumberType TaxNumberTypeEnum
+ */
+ public TaxNumberTypeEnum getTaxNumberType() {
+ return taxNumberType;
+ }
+
+ /**
+ * Identifier of the regional type of tax number, such as US, UK, or other regional tax
+ * identifiers
+ *
+ * @param taxNumberType TaxNumberTypeEnum
+ */
+ public void setTaxNumberType(TaxNumberTypeEnum taxNumberType) {
+ this.taxNumberType = taxNumberType;
+ }
+
/**
* The tax type from TaxRates
*
@@ -1985,6 +2089,7 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.contactPersons, contact.contactPersons)
&& Objects.equals(this.bankAccountDetails, contact.bankAccountDetails)
&& Objects.equals(this.taxNumber, contact.taxNumber)
+ && Objects.equals(this.taxNumberType, contact.taxNumberType)
&& Objects.equals(this.accountsReceivableTaxType, contact.accountsReceivableTaxType)
&& Objects.equals(this.accountsPayableTaxType, contact.accountsPayableTaxType)
&& Objects.equals(this.addresses, contact.addresses)
@@ -2033,6 +2138,7 @@ public int hashCode() {
contactPersons,
bankAccountDetails,
taxNumber,
+ taxNumberType,
accountsReceivableTaxType,
accountsPayableTaxType,
addresses,
@@ -2081,6 +2187,7 @@ public String toString() {
sb.append(" contactPersons: ").append(toIndentedString(contactPersons)).append("\n");
sb.append(" bankAccountDetails: ").append(toIndentedString(bankAccountDetails)).append("\n");
sb.append(" taxNumber: ").append(toIndentedString(taxNumber)).append("\n");
+ sb.append(" taxNumberType: ").append(toIndentedString(taxNumberType)).append("\n");
sb.append(" accountsReceivableTaxType: ")
.append(toIndentedString(accountsReceivableTaxType))
.append("\n");
diff --git a/src/main/java/com/xero/models/assets/BookDepreciationDetail.java b/src/main/java/com/xero/models/assets/BookDepreciationDetail.java
index 4f0f3788..55a78935 100644
--- a/src/main/java/com/xero/models/assets/BookDepreciationDetail.java
+++ b/src/main/java/com/xero/models/assets/BookDepreciationDetail.java
@@ -14,6 +14,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
import java.util.Objects;
import org.threeten.bp.LocalDate;
@@ -42,6 +43,21 @@ public class BookDepreciationDetail {
@JsonProperty("currentAccumDepreciationAmount")
private Double currentAccumDepreciationAmount;
+ @JsonProperty("businessUseCapitalGain")
+ private BigDecimal businessUseCapitalGain;
+
+ @JsonProperty("businessUseCurrentGainLoss")
+ private BigDecimal businessUseCurrentGainLoss;
+
+ @JsonProperty("privateUseCapitalGain")
+ private BigDecimal privateUseCapitalGain;
+
+ @JsonProperty("privateUseCurrentGainLoss")
+ private BigDecimal privateUseCurrentGainLoss;
+
+ @JsonProperty("initialDeductionPercentage")
+ private BigDecimal initialDeductionPercentage;
+
/**
* When an asset is disposed, this will be the sell price minus the purchase price if a profit was
* made.
@@ -314,6 +330,219 @@ public void setCurrentAccumDepreciationAmount(Double currentAccumDepreciationAmo
this.currentAccumDepreciationAmount = currentAccumDepreciationAmount;
}
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its business use.
+ *
+ * @param businessUseCapitalGain BigDecimal
+ * @return BookDepreciationDetail
+ */
+ public BookDepreciationDetail businessUseCapitalGain(BigDecimal businessUseCapitalGain) {
+ this.businessUseCapitalGain = businessUseCapitalGain;
+ return this;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its business use.
+ *
+ * @return businessUseCapitalGain
+ */
+ @ApiModelProperty(
+ value =
+ "(New Zealand Orgs Only) The portion of capital gain realised from the disposal of a"
+ + " fixed asset that is attributable to its business use.")
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its business use.
+ *
+ * @return businessUseCapitalGain BigDecimal
+ */
+ public BigDecimal getBusinessUseCapitalGain() {
+ return businessUseCapitalGain;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its business use.
+ *
+ * @param businessUseCapitalGain BigDecimal
+ */
+ public void setBusinessUseCapitalGain(BigDecimal businessUseCapitalGain) {
+ this.businessUseCapitalGain = businessUseCapitalGain;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s business use.
+ *
+ * @param businessUseCurrentGainLoss BigDecimal
+ * @return BookDepreciationDetail
+ */
+ public BookDepreciationDetail businessUseCurrentGainLoss(BigDecimal businessUseCurrentGainLoss) {
+ this.businessUseCurrentGainLoss = businessUseCurrentGainLoss;
+ return this;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s business use.
+ *
+ * @return businessUseCurrentGainLoss
+ */
+ @ApiModelProperty(
+ value =
+ "(New Zealand Orgs Only) Represents the gain or loss from the disposal of the business"
+ + " use portion of a fixed asset. This value records the financial result (profit or"
+ + " loss) related specifically to the asset’s business use.")
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s business use.
+ *
+ * @return businessUseCurrentGainLoss BigDecimal
+ */
+ public BigDecimal getBusinessUseCurrentGainLoss() {
+ return businessUseCurrentGainLoss;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the business use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s business use.
+ *
+ * @param businessUseCurrentGainLoss BigDecimal
+ */
+ public void setBusinessUseCurrentGainLoss(BigDecimal businessUseCurrentGainLoss) {
+ this.businessUseCurrentGainLoss = businessUseCurrentGainLoss;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its private (non-business) use.
+ *
+ * @param privateUseCapitalGain BigDecimal
+ * @return BookDepreciationDetail
+ */
+ public BookDepreciationDetail privateUseCapitalGain(BigDecimal privateUseCapitalGain) {
+ this.privateUseCapitalGain = privateUseCapitalGain;
+ return this;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its private (non-business) use.
+ *
+ * @return privateUseCapitalGain
+ */
+ @ApiModelProperty(
+ value =
+ "(New Zealand Orgs Only) The portion of capital gain realised from the disposal of a"
+ + " fixed asset that is attributable to its private (non-business) use.")
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its private (non-business) use.
+ *
+ * @return privateUseCapitalGain BigDecimal
+ */
+ public BigDecimal getPrivateUseCapitalGain() {
+ return privateUseCapitalGain;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The portion of capital gain realised from the disposal of a fixed asset
+ * that is attributable to its private (non-business) use.
+ *
+ * @param privateUseCapitalGain BigDecimal
+ */
+ public void setPrivateUseCapitalGain(BigDecimal privateUseCapitalGain) {
+ this.privateUseCapitalGain = privateUseCapitalGain;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s private use.
+ *
+ * @param privateUseCurrentGainLoss BigDecimal
+ * @return BookDepreciationDetail
+ */
+ public BookDepreciationDetail privateUseCurrentGainLoss(BigDecimal privateUseCurrentGainLoss) {
+ this.privateUseCurrentGainLoss = privateUseCurrentGainLoss;
+ return this;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s private use.
+ *
+ * @return privateUseCurrentGainLoss
+ */
+ @ApiModelProperty(
+ value =
+ "(New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use"
+ + " portion of a fixed asset. This value records the financial result (profit or"
+ + " loss) related specifically to the asset’s private use.")
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s private use.
+ *
+ * @return privateUseCurrentGainLoss BigDecimal
+ */
+ public BigDecimal getPrivateUseCurrentGainLoss() {
+ return privateUseCurrentGainLoss;
+ }
+
+ /**
+ * (New Zealand Orgs Only) Represents the gain or loss from the disposal of the private use
+ * portion of a fixed asset. This value records the financial result (profit or loss) related
+ * specifically to the asset’s private use.
+ *
+ * @param privateUseCurrentGainLoss BigDecimal
+ */
+ public void setPrivateUseCurrentGainLoss(BigDecimal privateUseCurrentGainLoss) {
+ this.privateUseCurrentGainLoss = privateUseCurrentGainLoss;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The Investment Boost deduction percentage.
+ *
+ * @param initialDeductionPercentage BigDecimal
+ * @return BookDepreciationDetail
+ */
+ public BookDepreciationDetail initialDeductionPercentage(BigDecimal initialDeductionPercentage) {
+ this.initialDeductionPercentage = initialDeductionPercentage;
+ return this;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The Investment Boost deduction percentage.
+ *
+ * @return initialDeductionPercentage
+ */
+ @ApiModelProperty(value = "(New Zealand Orgs Only) The Investment Boost deduction percentage.")
+ /**
+ * (New Zealand Orgs Only) The Investment Boost deduction percentage.
+ *
+ * @return initialDeductionPercentage BigDecimal
+ */
+ public BigDecimal getInitialDeductionPercentage() {
+ return initialDeductionPercentage;
+ }
+
+ /**
+ * (New Zealand Orgs Only) The Investment Boost deduction percentage.
+ *
+ * @param initialDeductionPercentage BigDecimal
+ */
+ public void setInitialDeductionPercentage(BigDecimal initialDeductionPercentage) {
+ this.initialDeductionPercentage = initialDeductionPercentage;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -332,7 +561,16 @@ public boolean equals(java.lang.Object o) {
this.priorAccumDepreciationAmount, bookDepreciationDetail.priorAccumDepreciationAmount)
&& Objects.equals(
this.currentAccumDepreciationAmount,
- bookDepreciationDetail.currentAccumDepreciationAmount);
+ bookDepreciationDetail.currentAccumDepreciationAmount)
+ && Objects.equals(
+ this.businessUseCapitalGain, bookDepreciationDetail.businessUseCapitalGain)
+ && Objects.equals(
+ this.businessUseCurrentGainLoss, bookDepreciationDetail.businessUseCurrentGainLoss)
+ && Objects.equals(this.privateUseCapitalGain, bookDepreciationDetail.privateUseCapitalGain)
+ && Objects.equals(
+ this.privateUseCurrentGainLoss, bookDepreciationDetail.privateUseCurrentGainLoss)
+ && Objects.equals(
+ this.initialDeductionPercentage, bookDepreciationDetail.initialDeductionPercentage);
}
@Override
@@ -344,7 +582,12 @@ public int hashCode() {
costLimit,
residualValue,
priorAccumDepreciationAmount,
- currentAccumDepreciationAmount);
+ currentAccumDepreciationAmount,
+ businessUseCapitalGain,
+ businessUseCurrentGainLoss,
+ privateUseCapitalGain,
+ privateUseCurrentGainLoss,
+ initialDeductionPercentage);
}
@Override
@@ -364,6 +607,21 @@ public String toString() {
sb.append(" currentAccumDepreciationAmount: ")
.append(toIndentedString(currentAccumDepreciationAmount))
.append("\n");
+ sb.append(" businessUseCapitalGain: ")
+ .append(toIndentedString(businessUseCapitalGain))
+ .append("\n");
+ sb.append(" businessUseCurrentGainLoss: ")
+ .append(toIndentedString(businessUseCurrentGainLoss))
+ .append("\n");
+ sb.append(" privateUseCapitalGain: ")
+ .append(toIndentedString(privateUseCapitalGain))
+ .append("\n");
+ sb.append(" privateUseCurrentGainLoss: ")
+ .append(toIndentedString(privateUseCurrentGainLoss))
+ .append("\n");
+ sb.append(" initialDeductionPercentage: ")
+ .append(toIndentedString(initialDeductionPercentage))
+ .append("\n");
sb.append("}");
return sb.toString();
}