diff --git a/docs/v4/accounting/index.html b/docs/v4/accounting/index.html index dc7b5947..c72f7d4e 100644 --- a/docs/v4/accounting/index.html +++ b/docs/v4/accounting/index.html @@ -2102,6 +2102,11 @@ "type" : "string", "description" : "Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)" }, + "TaxNumberType" : { + "type" : "string", + "description" : "Identifier of the regional type of tax number, such as US, UK, or other regional tax identifiers", + "enum" : [ "SSN", "EIN", "ITIN", "ATIN" ] + }, "AccountsReceivableTaxType" : { "type" : "string", "description" : "The tax type from TaxRates" diff --git a/docs/v4/payroll-nz/index.html b/docs/v4/payroll-nz/index.html index f8cc0717..0805a805 100644 --- a/docs/v4/payroll-nz/index.html +++ b/docs/v4/payroll-nz/index.html @@ -4292,9 +4292,6 @@
  • updateEmployeeTax
  • -
  • - updatePayRun -
  • updatePaySlipLineItems
  • @@ -15226,199 +15223,6 @@

    Parameters

    } }, "required" : true -} - - - - -
    -
    -
    -
    -

    updatePayRun

    -

    Updates a pay run

    -
    -
    -
    -

    -

    -

    -
    -
    /PayRuns/{PayRunID}
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    import org.openapitools.client.api.*;
    -import org.openapitools.client.api.client.PayrollNzApi;
    -import org.openapitools.client.models.payrollNz.*;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class PayrollNzApiExample {
    -    private PayrollNzApi 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.payrollnz.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 PayrollNzApi#updatePayRun");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -
    -

    Scopes

    - - - - - - - -
    payroll.payrunsGrant read-write access to payroll payruns
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    PayRunID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the pay run -
    -
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - - - - - - - -
    NameDescription
    Xero-Tenant-Id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    -
    -
    -
    Idempotency-Key - - -
    -
    -
    - - String - - -
    -This allows you to safely retry requests without the risk of duplicate processing. 128 character max. -
    -
    -
    -
    -
    -
    Body parameters
    - - - - - - - -
    NameDescription
    payRun * -
    -
    - - PayRun - -
    - -
    -
    -
    - Required -
    -
    -
    diff --git a/docs/v4/payroll-uk/index.html b/docs/v4/payroll-uk/index.html index 78c81155..ebfb1c44 100644 --- a/docs/v4/payroll-uk/index.html +++ b/docs/v4/payroll-uk/index.html @@ -3802,9 +3802,6 @@
  • updateEmployeeSalaryAndWage
  • -
  • - updatePayRun -
  • updateTimesheetLine
  • @@ -14483,199 +14480,6 @@

    Parameters

    } }, "required" : true -} - - -
    -
    -
    -
    -
    -
    -

    updatePayRun

    -

    Updates a specific pay run

    -
    -
    -
    -

    -

    -

    -
    -
    /PayRuns/{PayRunID}
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    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();
    -        }
    -    }
    -}
    -
    -
    -

    Scopes

    - - - - - - - -
    payroll.payrunsGrant read-write access to payroll payruns
    -

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    PayRunID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the pay run -
    -
    -
    - Required -
    -
    -
    -
    -
    Header parameters
    - - - - - - - - - - - - - -
    NameDescription
    Xero-Tenant-Id* - - -
    -
    -
    - - String - - -
    -Xero identifier for Tenant -
    -
    -
    - Required -
    -
    -
    -
    Idempotency-Key - - -
    -
    -
    - - String - - -
    -This allows you to safely retry requests without the risk of duplicate processing. 128 character max. -
    -
    -
    -
    -
    -
    Body parameters
    - - - - - - - -
    NameDescription
    payRun * -
    -
    - - PayRun - -
    - -
    -
    -
    - Required -
    -
    -
    diff --git a/src/main/java/com/xero/api/client/AccountingApi.java b/src/main/java/com/xero/api/client/AccountingApi.java index 527b6d3b..8174b1f2 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/AppStoreApi.java b/src/main/java/com/xero/api/client/AppStoreApi.java index 8e974ba9..9120f4dd 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/AssetApi.java b/src/main/java/com/xero/api/client/AssetApi.java index e14d1062..ea2c256b 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/BankFeedsApi.java b/src/main/java/com/xero/api/client/BankFeedsApi.java index 01c0b95b..583a37f9 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/FilesApi.java b/src/main/java/com/xero/api/client/FilesApi.java index fdb7f5aa..3a384158 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/FinanceApi.java b/src/main/java/com/xero/api/client/FinanceApi.java index 18bfa45b..dec9ba41 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/IdentityApi.java b/src/main/java/com/xero/api/client/IdentityApi.java index 8e41780d..0a1b13e2 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/PayrollAuApi.java b/src/main/java/com/xero/api/client/PayrollAuApi.java index baa2cf1d..a3c1509e 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/xero/api/client/PayrollNzApi.java b/src/main/java/com/xero/api/client/PayrollNzApi.java index 741985ee..ee8e4e83 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -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..6a999682 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.1.1 * 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; @@ -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..1da42b5b 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.1.1 * Contact: api@xero.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 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");