diff --git a/docs/v4/accounting/index.html b/docs/v4/accounting/index.html index 0d3f94a8..17a6dad2 100644 --- a/docs/v4/accounting/index.html +++ b/docs/v4/accounting/index.html @@ -6340,7 +6340,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods createAccount diff --git a/docs/v4/appstore/index.html b/docs/v4/appstore/index.html index 9b8f145f..97c52f88 100644 --- a/docs/v4/appstore/index.html +++ b/docs/v4/appstore/index.html @@ -1237,7 +1237,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods getSubscription diff --git a/docs/v4/assets/index.html b/docs/v4/assets/index.html index a15e1660..dfb77fba 100644 --- a/docs/v4/assets/index.html +++ b/docs/v4/assets/index.html @@ -1415,7 +1415,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods createAsset diff --git a/docs/v4/files/index.html b/docs/v4/files/index.html index 7f113902..9ff3f41e 100644 --- a/docs/v4/files/index.html +++ b/docs/v4/files/index.html @@ -1144,7 +1144,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods createFileAssociation diff --git a/docs/v4/finance/index.html b/docs/v4/finance/index.html index 2e4efd38..e9864ca1 100644 --- a/docs/v4/finance/index.html +++ b/docs/v4/finance/index.html @@ -2712,7 +2712,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods getAccountingActivityAccountUsage diff --git a/docs/v4/payroll-au/index.html b/docs/v4/payroll-au/index.html index 30bd5da4..48fc2ef5 100644 --- a/docs/v4/payroll-au/index.html +++ b/docs/v4/payroll-au/index.html @@ -3411,7 +3411,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods approveLeaveApplication diff --git a/docs/v4/payroll-nz/index.html b/docs/v4/payroll-nz/index.html index af5367d5..b323c372 100644 --- a/docs/v4/payroll-nz/index.html +++ b/docs/v4/payroll-nz/index.html @@ -4083,7 +4083,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods approveTimesheet diff --git a/docs/v4/payroll-uk/index.html b/docs/v4/payroll-uk/index.html index 58bd5163..b54c1b4c 100644 --- a/docs/v4/payroll-uk/index.html +++ b/docs/v4/payroll-uk/index.html @@ -1089,6 +1089,53 @@ } }, "description" : "" +}; + defs["ContractType"] = { + "title" : "", + "type" : "string", + "description" : "The contract type of the employee.", + "example" : "FullTime", + "enum" : [ "FullTime", "PartTime", "ZeroHour", "Unspecified" ] +}; + defs["Contracts"] = { + "title" : "", + "required" : [ "contractType", "employmentStatus", "startDate" ], + "type" : "object", + "properties" : { + "startDate" : { + "type" : "string", + "description" : "The contract start date of the employee. This will be locked once an employee has been paid and cannot be changed (YYYY-MM-DD)", + "format" : "date", + "example" : "2024-12-02", + "x-is-date" : true + }, + "employmentStatus" : { + "$ref" : "#/components/schemas/EmploymentStatus" + }, + "contractType" : { + "$ref" : "#/components/schemas/ContractType" + }, + "publicKey" : { + "type" : "string", + "description" : "The public key of the contract. Public key is required if the intention is to edit an existing contract. If no key is supplied a new contract will be created", + "format" : "uuid" + }, + "isFixedTerm" : { + "type" : "boolean", + "description" : "describes whether the contract is fixed term (required if trying to create Fixed term contract)" + }, + "fixedTermEndDate" : { + "type" : "string", + "description" : "The fixed term end date of the employee. Not required if isFixedTerm is false or not provided (required if trying to create Fixed term contract)", + "format" : "date", + "example" : "2025-11-01", + "x-is-date" : true + }, + "developmentalRoleDetails" : { + "$ref" : "#/components/schemas/DevelopmentalRoleDetails" + } + }, + "description" : "" }; defs["CourtOrderLine"] = { "title" : "", @@ -1247,6 +1294,38 @@ } }, "description" : "" +}; + defs["DevelopmentalRoleDetails"] = { + "title" : "", + "required" : [ "developmentalRole", "endDate", "startDate" ], + "type" : "object", + "properties" : { + "startDate" : { + "type" : "string", + "description" : "The start date of the developmental role", + "format" : "date", + "example" : "2024-12-02", + "x-is-date" : true + }, + "endDate" : { + "type" : "string", + "description" : "The end date of the developmental role", + "format" : "date", + "example" : "2024-12-02", + "x-is-date" : true + }, + "developmentalRole" : { + "type" : "string", + "description" : "The developmental role type - \"Apprentice\" is the only supported role currently", + "example" : "Apprentice" + }, + "publicKey" : { + "type" : "string", + "description" : "The public key of the developmental role. Public key is required if the intention is to edit an existing developmental role. If no key is supplied a new developmental role will be created", + "format" : "uuid" + } + }, + "description" : "" }; defs["EarningsLine"] = { "title" : "", @@ -1611,6 +1690,13 @@ "isOffPayrollWorker" : { "type" : "boolean", "description" : "Whether the employee is an off payroll worker" + }, + "contracts" : { + "type" : "array", + "description" : "The employee's contracts", + "items" : { + "$ref" : "#/components/schemas/Contracts" + } } }, "description" : "" @@ -2298,6 +2384,13 @@ "items" : { "$ref" : "#/components/schemas/NICategory" } + }, + "contracts" : { + "type" : "array", + "description" : "The employee's contracts", + "items" : { + "$ref" : "#/components/schemas/Contracts" + } } }, "description" : "" @@ -2317,6 +2410,13 @@ } }, "description" : "" +}; + defs["EmploymentStatus"] = { + "title" : "", + "type" : "string", + "description" : "The employment status of the employee.", + "example" : "Employee", + "enum" : [ "Employee", "Worker", "Unspecified" ] }; defs["InvalidField"] = { "title" : "", @@ -3596,7 +3696,7 @@ SDK: - VSN: 12.2.0 + VSN: 12.3.0 Methods approveTimesheet diff --git a/pom.xml b/pom.xml index 07fef5b3..72d95382 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ xero-java jar xero-java - 12.2.0 + 12.3.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 16b0f915..554b725a 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 d54400df..327d3f1f 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 4ec49c30..1291f29c 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 eea21d08..46531610 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 e3f91b2b..73575da3 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 b5bad50d..d091900e 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 076ae3d4..36c4d789 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 7edf3d2d..848950e8 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 4220acbb..5297bad4 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.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 8334fad8..cb941558 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.2.0 + * The version of the OpenAPI document: 9.3.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 = "12.2.0"; + private String version = "12.3.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 0d73d416..7f35ff46 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.2.0 + * The version of the OpenAPI document: 9.3.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.2.0"; + private String version = "12.3.0"; static final Logger logger = LoggerFactory.getLogger(ProjectApi.class); /** ProjectApi */ diff --git a/src/main/java/com/xero/models/payrolluk/ContractType.java b/src/main/java/com/xero/models/payrolluk/ContractType.java new file mode 100644 index 00000000..2c003391 --- /dev/null +++ b/src/main/java/com/xero/models/payrolluk/ContractType.java @@ -0,0 +1,71 @@ +/* + * Xero Payroll UK + * This is the Xero Payroll API for orgs in the UK region. + * + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.xero.models.payrolluk; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The contract type of the employee. */ +public enum ContractType { + + /** FULLTIME */ + FULLTIME("FullTime"), + + /** PARTTIME */ + PARTTIME("PartTime"), + + /** ZEROHOUR */ + ZEROHOUR("ZeroHour"), + + /** UNSPECIFIED */ + UNSPECIFIED("Unspecified"); + + private String value; + + ContractType(String value) { + this.value = value; + } + + /** + * @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 ContractType fromValue(String value) { + for (ContractType b : ContractType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/src/main/java/com/xero/models/payrolluk/Contracts.java b/src/main/java/com/xero/models/payrolluk/Contracts.java new file mode 100644 index 00000000..f409ff7a --- /dev/null +++ b/src/main/java/com/xero/models/payrolluk/Contracts.java @@ -0,0 +1,374 @@ +/* + * Xero Payroll UK + * This is the Xero Payroll API for orgs in the UK region. + * + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.xero.models.payrolluk; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.xero.api.StringUtil; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; +import java.util.UUID; +import org.threeten.bp.LocalDate; + +/** Contracts */ +public class Contracts { + StringUtil util = new StringUtil(); + + @JsonProperty("startDate") + private LocalDate startDate; + + @JsonProperty("employmentStatus") + private EmploymentStatus employmentStatus; + + @JsonProperty("contractType") + private ContractType contractType; + + @JsonProperty("publicKey") + private UUID publicKey; + + @JsonProperty("isFixedTerm") + private Boolean isFixedTerm; + + @JsonProperty("fixedTermEndDate") + private LocalDate fixedTermEndDate; + + @JsonProperty("developmentalRoleDetails") + private DevelopmentalRoleDetails developmentalRoleDetails; + + /** + * The contract start date of the employee. This will be locked once an employee has been paid and + * cannot be changed (YYYY-MM-DD) + * + * @param startDate LocalDate + * @return Contracts + */ + public Contracts startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * The contract start date of the employee. This will be locked once an employee has been paid and + * cannot be changed (YYYY-MM-DD) + * + * @return startDate + */ + @ApiModelProperty( + example = "Mon Dec 02 00:00:00 UTC 2024", + required = true, + value = + "The contract start date of the employee. This will be locked once an employee has been" + + " paid and cannot be changed (YYYY-MM-DD)") + /** + * The contract start date of the employee. This will be locked once an employee has been paid and + * cannot be changed (YYYY-MM-DD) + * + * @return startDate LocalDate + */ + public LocalDate getStartDate() { + return startDate; + } + + /** + * The contract start date of the employee. This will be locked once an employee has been paid and + * cannot be changed (YYYY-MM-DD) + * + * @param startDate LocalDate + */ + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * employmentStatus + * + * @param employmentStatus EmploymentStatus + * @return Contracts + */ + public Contracts employmentStatus(EmploymentStatus employmentStatus) { + this.employmentStatus = employmentStatus; + return this; + } + + /** + * Get employmentStatus + * + * @return employmentStatus + */ + @ApiModelProperty(required = true, value = "") + /** + * employmentStatus + * + * @return employmentStatus EmploymentStatus + */ + public EmploymentStatus getEmploymentStatus() { + return employmentStatus; + } + + /** + * employmentStatus + * + * @param employmentStatus EmploymentStatus + */ + public void setEmploymentStatus(EmploymentStatus employmentStatus) { + this.employmentStatus = employmentStatus; + } + + /** + * contractType + * + * @param contractType ContractType + * @return Contracts + */ + public Contracts contractType(ContractType contractType) { + this.contractType = contractType; + return this; + } + + /** + * Get contractType + * + * @return contractType + */ + @ApiModelProperty(required = true, value = "") + /** + * contractType + * + * @return contractType ContractType + */ + public ContractType getContractType() { + return contractType; + } + + /** + * contractType + * + * @param contractType ContractType + */ + public void setContractType(ContractType contractType) { + this.contractType = contractType; + } + + /** + * The public key of the contract. Public key is required if the intention is to edit an existing + * contract. If no key is supplied a new contract will be created + * + * @param publicKey UUID + * @return Contracts + */ + public Contracts publicKey(UUID publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The public key of the contract. Public key is required if the intention is to edit an existing + * contract. If no key is supplied a new contract will be created + * + * @return publicKey + */ + @ApiModelProperty( + value = + "The public key of the contract. Public key is required if the intention is to edit an" + + " existing contract. If no key is supplied a new contract will be created") + /** + * The public key of the contract. Public key is required if the intention is to edit an existing + * contract. If no key is supplied a new contract will be created + * + * @return publicKey UUID + */ + public UUID getPublicKey() { + return publicKey; + } + + /** + * The public key of the contract. Public key is required if the intention is to edit an existing + * contract. If no key is supplied a new contract will be created + * + * @param publicKey UUID + */ + public void setPublicKey(UUID publicKey) { + this.publicKey = publicKey; + } + + /** + * describes whether the contract is fixed term (required if trying to create Fixed term contract) + * + * @param isFixedTerm Boolean + * @return Contracts + */ + public Contracts isFixedTerm(Boolean isFixedTerm) { + this.isFixedTerm = isFixedTerm; + return this; + } + + /** + * describes whether the contract is fixed term (required if trying to create Fixed term contract) + * + * @return isFixedTerm + */ + @ApiModelProperty( + value = + "describes whether the contract is fixed term (required if trying to create Fixed term" + + " contract)") + /** + * describes whether the contract is fixed term (required if trying to create Fixed term contract) + * + * @return isFixedTerm Boolean + */ + public Boolean getIsFixedTerm() { + return isFixedTerm; + } + + /** + * describes whether the contract is fixed term (required if trying to create Fixed term contract) + * + * @param isFixedTerm Boolean + */ + public void setIsFixedTerm(Boolean isFixedTerm) { + this.isFixedTerm = isFixedTerm; + } + + /** + * The fixed term end date of the employee. Not required if isFixedTerm is false or not provided + * (required if trying to create Fixed term contract) + * + * @param fixedTermEndDate LocalDate + * @return Contracts + */ + public Contracts fixedTermEndDate(LocalDate fixedTermEndDate) { + this.fixedTermEndDate = fixedTermEndDate; + return this; + } + + /** + * The fixed term end date of the employee. Not required if isFixedTerm is false or not provided + * (required if trying to create Fixed term contract) + * + * @return fixedTermEndDate + */ + @ApiModelProperty( + example = "Sat Nov 01 00:00:00 UTC 2025", + value = + "The fixed term end date of the employee. Not required if isFixedTerm is false or not" + + " provided (required if trying to create Fixed term contract)") + /** + * The fixed term end date of the employee. Not required if isFixedTerm is false or not provided + * (required if trying to create Fixed term contract) + * + * @return fixedTermEndDate LocalDate + */ + public LocalDate getFixedTermEndDate() { + return fixedTermEndDate; + } + + /** + * The fixed term end date of the employee. Not required if isFixedTerm is false or not provided + * (required if trying to create Fixed term contract) + * + * @param fixedTermEndDate LocalDate + */ + public void setFixedTermEndDate(LocalDate fixedTermEndDate) { + this.fixedTermEndDate = fixedTermEndDate; + } + + /** + * developmentalRoleDetails + * + * @param developmentalRoleDetails DevelopmentalRoleDetails + * @return Contracts + */ + public Contracts developmentalRoleDetails(DevelopmentalRoleDetails developmentalRoleDetails) { + this.developmentalRoleDetails = developmentalRoleDetails; + return this; + } + + /** + * Get developmentalRoleDetails + * + * @return developmentalRoleDetails + */ + @ApiModelProperty(value = "") + /** + * developmentalRoleDetails + * + * @return developmentalRoleDetails DevelopmentalRoleDetails + */ + public DevelopmentalRoleDetails getDevelopmentalRoleDetails() { + return developmentalRoleDetails; + } + + /** + * developmentalRoleDetails + * + * @param developmentalRoleDetails DevelopmentalRoleDetails + */ + public void setDevelopmentalRoleDetails(DevelopmentalRoleDetails developmentalRoleDetails) { + this.developmentalRoleDetails = developmentalRoleDetails; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Contracts contracts = (Contracts) o; + return Objects.equals(this.startDate, contracts.startDate) + && Objects.equals(this.employmentStatus, contracts.employmentStatus) + && Objects.equals(this.contractType, contracts.contractType) + && Objects.equals(this.publicKey, contracts.publicKey) + && Objects.equals(this.isFixedTerm, contracts.isFixedTerm) + && Objects.equals(this.fixedTermEndDate, contracts.fixedTermEndDate) + && Objects.equals(this.developmentalRoleDetails, contracts.developmentalRoleDetails); + } + + @Override + public int hashCode() { + return Objects.hash( + startDate, + employmentStatus, + contractType, + publicKey, + isFixedTerm, + fixedTermEndDate, + developmentalRoleDetails); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Contracts {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" employmentStatus: ").append(toIndentedString(employmentStatus)).append("\n"); + sb.append(" contractType: ").append(toIndentedString(contractType)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" isFixedTerm: ").append(toIndentedString(isFixedTerm)).append("\n"); + sb.append(" fixedTermEndDate: ").append(toIndentedString(fixedTermEndDate)).append("\n"); + sb.append(" developmentalRoleDetails: ") + .append(toIndentedString(developmentalRoleDetails)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/xero/models/payrolluk/DevelopmentalRoleDetails.java b/src/main/java/com/xero/models/payrolluk/DevelopmentalRoleDetails.java new file mode 100644 index 00000000..86368ab8 --- /dev/null +++ b/src/main/java/com/xero/models/payrolluk/DevelopmentalRoleDetails.java @@ -0,0 +1,235 @@ +/* + * Xero Payroll UK + * This is the Xero Payroll API for orgs in the UK region. + * + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.xero.models.payrolluk; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.xero.api.StringUtil; +import io.swagger.annotations.ApiModelProperty; +import java.util.Objects; +import java.util.UUID; +import org.threeten.bp.LocalDate; + +/** DevelopmentalRoleDetails */ +public class DevelopmentalRoleDetails { + StringUtil util = new StringUtil(); + + @JsonProperty("startDate") + private LocalDate startDate; + + @JsonProperty("endDate") + private LocalDate endDate; + + @JsonProperty("developmentalRole") + private String developmentalRole; + + @JsonProperty("publicKey") + private UUID publicKey; + + /** + * The start date of the developmental role + * + * @param startDate LocalDate + * @return DevelopmentalRoleDetails + */ + public DevelopmentalRoleDetails startDate(LocalDate startDate) { + this.startDate = startDate; + return this; + } + + /** + * The start date of the developmental role + * + * @return startDate + */ + @ApiModelProperty( + example = "Mon Dec 02 00:00:00 UTC 2024", + required = true, + value = "The start date of the developmental role") + /** + * The start date of the developmental role + * + * @return startDate LocalDate + */ + public LocalDate getStartDate() { + return startDate; + } + + /** + * The start date of the developmental role + * + * @param startDate LocalDate + */ + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + /** + * The end date of the developmental role + * + * @param endDate LocalDate + * @return DevelopmentalRoleDetails + */ + public DevelopmentalRoleDetails endDate(LocalDate endDate) { + this.endDate = endDate; + return this; + } + + /** + * The end date of the developmental role + * + * @return endDate + */ + @ApiModelProperty( + example = "Mon Dec 02 00:00:00 UTC 2024", + required = true, + value = "The end date of the developmental role") + /** + * The end date of the developmental role + * + * @return endDate LocalDate + */ + public LocalDate getEndDate() { + return endDate; + } + + /** + * The end date of the developmental role + * + * @param endDate LocalDate + */ + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + /** + * The developmental role type - \"Apprentice\" is the only supported role currently + * + * @param developmentalRole String + * @return DevelopmentalRoleDetails + */ + public DevelopmentalRoleDetails developmentalRole(String developmentalRole) { + this.developmentalRole = developmentalRole; + return this; + } + + /** + * The developmental role type - \"Apprentice\" is the only supported role currently + * + * @return developmentalRole + */ + @ApiModelProperty( + example = "Apprentice", + required = true, + value = "The developmental role type - \"Apprentice\" is the only supported role currently") + /** + * The developmental role type - \"Apprentice\" is the only supported role currently + * + * @return developmentalRole String + */ + public String getDevelopmentalRole() { + return developmentalRole; + } + + /** + * The developmental role type - \"Apprentice\" is the only supported role currently + * + * @param developmentalRole String + */ + public void setDevelopmentalRole(String developmentalRole) { + this.developmentalRole = developmentalRole; + } + + /** + * The public key of the developmental role. Public key is required if the intention is to edit an + * existing developmental role. If no key is supplied a new developmental role will be created + * + * @param publicKey UUID + * @return DevelopmentalRoleDetails + */ + public DevelopmentalRoleDetails publicKey(UUID publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The public key of the developmental role. Public key is required if the intention is to edit an + * existing developmental role. If no key is supplied a new developmental role will be created + * + * @return publicKey + */ + @ApiModelProperty( + value = + "The public key of the developmental role. Public key is required if the intention is to" + + " edit an existing developmental role. If no key is supplied a new developmental" + + " role will be created") + /** + * The public key of the developmental role. Public key is required if the intention is to edit an + * existing developmental role. If no key is supplied a new developmental role will be created + * + * @return publicKey UUID + */ + public UUID getPublicKey() { + return publicKey; + } + + /** + * The public key of the developmental role. Public key is required if the intention is to edit an + * existing developmental role. If no key is supplied a new developmental role will be created + * + * @param publicKey UUID + */ + public void setPublicKey(UUID publicKey) { + this.publicKey = publicKey; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DevelopmentalRoleDetails developmentalRoleDetails = (DevelopmentalRoleDetails) o; + return Objects.equals(this.startDate, developmentalRoleDetails.startDate) + && Objects.equals(this.endDate, developmentalRoleDetails.endDate) + && Objects.equals(this.developmentalRole, developmentalRoleDetails.developmentalRole) + && Objects.equals(this.publicKey, developmentalRoleDetails.publicKey); + } + + @Override + public int hashCode() { + return Objects.hash(startDate, endDate, developmentalRole, publicKey); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DevelopmentalRoleDetails {\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" developmentalRole: ").append(toIndentedString(developmentalRole)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/xero/models/payrolluk/Employee.java b/src/main/java/com/xero/models/payrolluk/Employee.java index a3463453..09a33f23 100644 --- a/src/main/java/com/xero/models/payrolluk/Employee.java +++ b/src/main/java/com/xero/models/payrolluk/Employee.java @@ -131,6 +131,9 @@ public static GenderEnum fromValue(String value) { @JsonProperty("isOffPayrollWorker") private Boolean isOffPayrollWorker; + @JsonProperty("contracts") + private List contracts = new ArrayList(); + /** * Xero unique identifier for the employee * @@ -784,6 +787,55 @@ public void setIsOffPayrollWorker(Boolean isOffPayrollWorker) { this.isOffPayrollWorker = isOffPayrollWorker; } + /** + * The employee's contracts + * + * @param contracts List<Contracts> + * @return Employee + */ + public Employee contracts(List contracts) { + this.contracts = contracts; + return this; + } + + /** + * The employee's contracts + * + * @param contractsItem Contracts + * @return Employee + */ + public Employee addContractsItem(Contracts contractsItem) { + if (this.contracts == null) { + this.contracts = new ArrayList(); + } + this.contracts.add(contractsItem); + return this; + } + + /** + * The employee's contracts + * + * @return contracts + */ + @ApiModelProperty(value = "The employee's contracts") + /** + * The employee's contracts + * + * @return contracts List + */ + public List getContracts() { + return contracts; + } + + /** + * The employee's contracts + * + * @param contracts List<Contracts> + */ + public void setContracts(List contracts) { + this.contracts = contracts; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -810,7 +862,8 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.niCategory, employee.niCategory) && Objects.equals(this.niCategories, employee.niCategories) && Objects.equals(this.nationalInsuranceNumber, employee.nationalInsuranceNumber) - && Objects.equals(this.isOffPayrollWorker, employee.isOffPayrollWorker); + && Objects.equals(this.isOffPayrollWorker, employee.isOffPayrollWorker) + && Objects.equals(this.contracts, employee.contracts); } @Override @@ -833,7 +886,8 @@ public int hashCode() { niCategory, niCategories, nationalInsuranceNumber, - isOffPayrollWorker); + isOffPayrollWorker, + contracts); } @Override @@ -860,6 +914,7 @@ public String toString() { .append(toIndentedString(nationalInsuranceNumber)) .append("\n"); sb.append(" isOffPayrollWorker: ").append(toIndentedString(isOffPayrollWorker)).append("\n"); + sb.append(" contracts: ").append(toIndentedString(contracts)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/xero/models/payrolluk/Employment.java b/src/main/java/com/xero/models/payrolluk/Employment.java index c3e9bc7c..fb553579 100644 --- a/src/main/java/com/xero/models/payrolluk/Employment.java +++ b/src/main/java/com/xero/models/payrolluk/Employment.java @@ -39,6 +39,9 @@ public class Employment { @JsonProperty("niCategories") private List niCategories = new ArrayList(); + @JsonProperty("contracts") + private List contracts = new ArrayList(); + /** * Xero unique identifier for the payroll calendar of the employee * @@ -227,6 +230,55 @@ public void setNiCategories(List niCategories) { this.niCategories = niCategories; } + /** + * The employee's contracts + * + * @param contracts List<Contracts> + * @return Employment + */ + public Employment contracts(List contracts) { + this.contracts = contracts; + return this; + } + + /** + * The employee's contracts + * + * @param contractsItem Contracts + * @return Employment + */ + public Employment addContractsItem(Contracts contractsItem) { + if (this.contracts == null) { + this.contracts = new ArrayList(); + } + this.contracts.add(contractsItem); + return this; + } + + /** + * The employee's contracts + * + * @return contracts + */ + @ApiModelProperty(value = "The employee's contracts") + /** + * The employee's contracts + * + * @return contracts List + */ + public List getContracts() { + return contracts; + } + + /** + * The employee's contracts + * + * @param contracts List<Contracts> + */ + public void setContracts(List contracts) { + this.contracts = contracts; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -240,12 +292,14 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.startDate, employment.startDate) && Objects.equals(this.employeeNumber, employment.employeeNumber) && Objects.equals(this.niCategory, employment.niCategory) - && Objects.equals(this.niCategories, employment.niCategories); + && Objects.equals(this.niCategories, employment.niCategories) + && Objects.equals(this.contracts, employment.contracts); } @Override public int hashCode() { - return Objects.hash(payrollCalendarID, startDate, employeeNumber, niCategory, niCategories); + return Objects.hash( + payrollCalendarID, startDate, employeeNumber, niCategory, niCategories, contracts); } @Override @@ -257,6 +311,7 @@ public String toString() { sb.append(" employeeNumber: ").append(toIndentedString(employeeNumber)).append("\n"); sb.append(" niCategory: ").append(toIndentedString(niCategory)).append("\n"); sb.append(" niCategories: ").append(toIndentedString(niCategories)).append("\n"); + sb.append(" contracts: ").append(toIndentedString(contracts)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/xero/models/payrolluk/EmploymentStatus.java b/src/main/java/com/xero/models/payrolluk/EmploymentStatus.java new file mode 100644 index 00000000..1d026f68 --- /dev/null +++ b/src/main/java/com/xero/models/payrolluk/EmploymentStatus.java @@ -0,0 +1,68 @@ +/* + * Xero Payroll UK + * This is the Xero Payroll API for orgs in the UK region. + * + * Contact: api@xero.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.xero.models.payrolluk; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The employment status of the employee. */ +public enum EmploymentStatus { + + /** EMPLOYEE */ + EMPLOYEE("Employee"), + + /** WORKER */ + WORKER("Worker"), + + /** UNSPECIFIED */ + UNSPECIFIED("Unspecified"); + + private String value; + + EmploymentStatus(String value) { + this.value = value; + } + + /** + * @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 EmploymentStatus fromValue(String value) { + for (EmploymentStatus b : EmploymentStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +}