diff --git a/docs/v4/payroll-uk/index.html b/docs/v4/payroll-uk/index.html
index a3f6c869..68a7fbc4 100644
--- a/docs/v4/payroll-uk/index.html
+++ b/docs/v4/payroll-uk/index.html
@@ -1593,6 +1593,16 @@
"format" : "date-time",
"x-is-datetime" : true
},
+ "niCategory" : {
+ "$ref" : "#/components/schemas/NICategoryLetter"
+ },
+ "niCategories" : {
+ "type" : "array",
+ "description" : "The employee's NI categories",
+ "items" : {
+ "$ref" : "#/components/schemas/NICategory"
+ }
+ },
"nationalInsuranceNumber" : {
"type" : "string",
"description" : "National insurance number of the employee",
@@ -2260,7 +2270,7 @@
};
defs["Employment"] = {
"title" : "",
- "required" : [ "EmployeeNumber", "NICategory", "PayrollCalendarID", "StartDate" ],
+ "required" : [ "EmployeeNumber", "NICategories", "PayrollCalendarID", "StartDate" ],
"type" : "object",
"properties" : {
"payrollCalendarID" : {
@@ -2280,10 +2290,14 @@
"example" : "7"
},
"niCategory" : {
- "type" : "string",
- "description" : "The NI Category of the employee",
- "example" : "A",
- "enum" : [ "A", "B", "C", "F", "H", "I", "J", "L", "M", "S", "V", "X", "Z" ]
+ "$ref" : "#/components/schemas/NICategoryLetter"
+ },
+ "niCategories" : {
+ "type" : "array",
+ "description" : "The employee's NI categories",
+ "items" : {
+ "$ref" : "#/components/schemas/NICategory"
+ }
}
},
"description" : ""
@@ -2500,6 +2514,75 @@
}
},
"description" : ""
+};
+ defs["NICategory"] = {
+ "title" : "",
+ "required" : [ "niCategory", "workplacePostcode" ],
+ "type" : "object",
+ "properties" : {
+ "startDate" : {
+ "type" : "string",
+ "description" : "The start date of the NI category (YYYY-MM-DD)",
+ "format" : "date",
+ "example" : "2024-12-02",
+ "x-is-date" : true
+ },
+ "niCategory" : {
+ "$ref" : "#/components/schemas/NICategoryLetter"
+ },
+ "niCategoryID" : {
+ "type" : "number",
+ "description" : "Xero unique identifier for the NI category",
+ "example" : 15
+ },
+ "dateFirstEmployedAsCivilian" : {
+ "type" : "string",
+ "description" : "The date in which the employee was first employed as a civilian (YYYY-MM-DD)",
+ "format" : "date",
+ "example" : "2024-12-02",
+ "x-is-date" : true
+ },
+ "workplacePostcode" : {
+ "type" : "string",
+ "description" : "The workplace postcode",
+ "example" : "SW1A 1AA"
+ }
+ },
+ "description" : "",
+ "oneOf" : [ {
+ "$ref" : "#/components/schemas/NICategory_oneOf"
+ }, {
+ "$ref" : "#/components/schemas/NICategory_oneOf_1"
+ } ]
+};
+ defs["NICategoryLetter"] = {
+ "title" : "",
+ "type" : "string",
+ "description" : "The employee's NI Category letter.",
+ "example" : "I",
+ "enum" : [ "A", "B", "C", "D", "E", "F", "H", "I", "J", "K", "L", "M", "N", "S", "V", "X", "Z" ]
+};
+ defs["NICategory_oneOf"] = {
+ "title" : "",
+ "required" : [ "workplacePostcode" ],
+ "properties" : {
+ "niCategory" : {
+ "type" : "string",
+ "enum" : [ "F", "I", "L", "S", "N", "E", "D", "K" ]
+ }
+ },
+ "description" : ""
+};
+ defs["NICategory_oneOf_1"] = {
+ "title" : "",
+ "required" : [ "dateFirstEmployedAsCivilian" ],
+ "properties" : {
+ "niCategory" : {
+ "type" : "string",
+ "enum" : [ "V" ]
+ }
+ },
+ "description" : ""
};
defs["Pagination"] = {
"title" : "",
@@ -5872,6 +5955,8 @@
Usage and SDK Samples
Employment employment = new Employment();
employment.setPayrollCalendarID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
employment.setStartDate(startDate);
+
+ NICategories niCategories = new NICategories();
try {
EmploymentObject result = apiInstance.createEmployment(accessToken, xeroTenantId, employeeID, employment, idempotencyKey);
@@ -6006,7 +6091,7 @@ Parameters
"schema" : {
"$ref" : "#/components/schemas/Employment"
},
- "example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"EmployeeNumber\": \"123ABC\", \"NICategory\": \"A\" }"
+ "example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"NICategories\": [ { \"NICategory\": \"A\", \"StartDate\": \"2020-05-01\" } ], \"EmployeeNumber\": \"123ABC\" }"
}
},
"required" : true
diff --git a/src/main/java/com/xero/models/payrolluk/Employee.java b/src/main/java/com/xero/models/payrolluk/Employee.java
index 392b266e..7436d3e8 100644
--- a/src/main/java/com/xero/models/payrolluk/Employee.java
+++ b/src/main/java/com/xero/models/payrolluk/Employee.java
@@ -16,6 +16,8 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Objects;
import java.util.UUID;
import org.threeten.bp.LocalDate;
@@ -116,6 +118,12 @@ public static GenderEnum fromValue(String value) {
@JsonProperty("createdDateUTC")
private LocalDateTime createdDateUTC;
+ @JsonProperty("niCategory")
+ private NICategoryLetter niCategory;
+
+ @JsonProperty("niCategories")
+ private List niCategories = new ArrayList();
+
@JsonProperty("nationalInsuranceNumber")
private String nationalInsuranceNumber;
@@ -619,6 +627,90 @@ public void setCreatedDateUTC(LocalDateTime createdDateUTC) {
this.createdDateUTC = createdDateUTC;
}
+ /**
+ * niCategory
+ *
+ * @param niCategory NICategoryLetter
+ * @return Employee
+ */
+ public Employee niCategory(NICategoryLetter niCategory) {
+ this.niCategory = niCategory;
+ return this;
+ }
+
+ /**
+ * Get niCategory
+ *
+ * @return niCategory
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * niCategory
+ *
+ * @return niCategory NICategoryLetter
+ */
+ public NICategoryLetter getNiCategory() {
+ return niCategory;
+ }
+
+ /**
+ * niCategory
+ *
+ * @param niCategory NICategoryLetter
+ */
+ public void setNiCategory(NICategoryLetter niCategory) {
+ this.niCategory = niCategory;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategories List<NICategory>
+ * @return Employee
+ */
+ public Employee niCategories(List niCategories) {
+ this.niCategories = niCategories;
+ return this;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategoriesItem NICategory
+ * @return Employee
+ */
+ public Employee addNiCategoriesItem(NICategory niCategoriesItem) {
+ if (this.niCategories == null) {
+ this.niCategories = new ArrayList();
+ }
+ this.niCategories.add(niCategoriesItem);
+ return this;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @return niCategories
+ */
+ @ApiModelProperty(value = "The employee's NI categories")
+ /**
+ * The employee's NI categories
+ *
+ * @return niCategories List
+ */
+ public List getNiCategories() {
+ return niCategories;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategories List<NICategory>
+ */
+ public void setNiCategories(List niCategories) {
+ this.niCategories = niCategories;
+ }
+
/**
* National insurance number of the employee
*
@@ -712,6 +804,8 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.payrollCalendarID, employee.payrollCalendarID)
&& Objects.equals(this.updatedDateUTC, employee.updatedDateUTC)
&& Objects.equals(this.createdDateUTC, employee.createdDateUTC)
+ && Objects.equals(this.niCategory, employee.niCategory)
+ && Objects.equals(this.niCategories, employee.niCategories)
&& Objects.equals(this.nationalInsuranceNumber, employee.nationalInsuranceNumber)
&& Objects.equals(this.isOffPayrollWorker, employee.isOffPayrollWorker);
}
@@ -733,6 +827,8 @@ public int hashCode() {
payrollCalendarID,
updatedDateUTC,
createdDateUTC,
+ niCategory,
+ niCategories,
nationalInsuranceNumber,
isOffPayrollWorker);
}
@@ -755,6 +851,8 @@ public String toString() {
sb.append(" payrollCalendarID: ").append(toIndentedString(payrollCalendarID)).append("\n");
sb.append(" updatedDateUTC: ").append(toIndentedString(updatedDateUTC)).append("\n");
sb.append(" createdDateUTC: ").append(toIndentedString(createdDateUTC)).append("\n");
+ sb.append(" niCategory: ").append(toIndentedString(niCategory)).append("\n");
+ sb.append(" niCategories: ").append(toIndentedString(niCategories)).append("\n");
sb.append(" nationalInsuranceNumber: ")
.append(toIndentedString(nationalInsuranceNumber))
.append("\n");
diff --git a/src/main/java/com/xero/models/payrolluk/Employment.java b/src/main/java/com/xero/models/payrolluk/Employment.java
index a4861f9b..a84dd200 100644
--- a/src/main/java/com/xero/models/payrolluk/Employment.java
+++ b/src/main/java/com/xero/models/payrolluk/Employment.java
@@ -11,11 +11,11 @@
package com.xero.models.payrolluk;
-import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
import com.xero.api.StringUtil;
import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Objects;
import java.util.UUID;
import org.threeten.bp.LocalDate;
@@ -32,91 +32,12 @@ public class Employment {
@JsonProperty("employeeNumber")
private String employeeNumber;
- /** The NI Category of the employee */
- public enum NiCategoryEnum {
- /** A */
- A("A"),
-
- /** B */
- B("B"),
-
- /** C */
- C("C"),
-
- /** F */
- F("F"),
-
- /** H */
- H("H"),
-
- /** I */
- I("I"),
-
- /** J */
- J("J"),
-
- /** L */
- L("L"),
-
- /** M */
- M("M"),
-
- /** S */
- S("S"),
-
- /** V */
- V("V"),
-
- /** X */
- X("X"),
-
- /** Z */
- Z("Z");
-
- private String value;
-
- NiCategoryEnum(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 NiCategoryEnum fromValue(String value) {
- for (NiCategoryEnum b : NiCategoryEnum.values()) {
- if (b.value.equals(value)) {
- return b;
- }
- }
- throw new IllegalArgumentException("Unexpected value '" + value + "'");
- }
- }
@JsonProperty("niCategory")
- private NiCategoryEnum niCategory;
+ private NICategoryLetter niCategory;
+
+ @JsonProperty("niCategories")
+ private List niCategories = new ArrayList();
/**
* Xero unique identifier for the payroll calendar of the employee
*
@@ -223,40 +144,89 @@ public void setEmployeeNumber(String employeeNumber) {
}
/**
- * The NI Category of the employee
+ * niCategory
*
- * @param niCategory NiCategoryEnum
+ * @param niCategory NICategoryLetter
* @return Employment
*/
- public Employment niCategory(NiCategoryEnum niCategory) {
+ public Employment niCategory(NICategoryLetter niCategory) {
this.niCategory = niCategory;
return this;
}
/**
- * The NI Category of the employee
+ * Get niCategory
*
* @return niCategory
*/
- @ApiModelProperty(example = "A", value = "The NI Category of the employee")
+ @ApiModelProperty(value = "")
/**
- * The NI Category of the employee
+ * niCategory
*
- * @return niCategory NiCategoryEnum
+ * @return niCategory NICategoryLetter
*/
- public NiCategoryEnum getNiCategory() {
+ public NICategoryLetter getNiCategory() {
return niCategory;
}
/**
- * The NI Category of the employee
+ * niCategory
*
- * @param niCategory NiCategoryEnum
+ * @param niCategory NICategoryLetter
*/
- public void setNiCategory(NiCategoryEnum niCategory) {
+ public void setNiCategory(NICategoryLetter niCategory) {
this.niCategory = niCategory;
}
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategories List<NICategory>
+ * @return Employment
+ */
+ public Employment niCategories(List niCategories) {
+ this.niCategories = niCategories;
+ return this;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategoriesItem NICategory
+ * @return Employment
+ */
+ public Employment addNiCategoriesItem(NICategory niCategoriesItem) {
+ if (this.niCategories == null) {
+ this.niCategories = new ArrayList();
+ }
+ this.niCategories.add(niCategoriesItem);
+ return this;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @return niCategories
+ */
+ @ApiModelProperty(value = "The employee's NI categories")
+ /**
+ * The employee's NI categories
+ *
+ * @return niCategories List
+ */
+ public List getNiCategories() {
+ return niCategories;
+ }
+
+ /**
+ * The employee's NI categories
+ *
+ * @param niCategories List<NICategory>
+ */
+ public void setNiCategories(List niCategories) {
+ this.niCategories = niCategories;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -269,12 +239,13 @@ public boolean equals(java.lang.Object o) {
return Objects.equals(this.payrollCalendarID, employment.payrollCalendarID)
&& Objects.equals(this.startDate, employment.startDate)
&& Objects.equals(this.employeeNumber, employment.employeeNumber)
- && Objects.equals(this.niCategory, employment.niCategory);
+ && Objects.equals(this.niCategory, employment.niCategory)
+ && Objects.equals(this.niCategories, employment.niCategories);
}
@Override
public int hashCode() {
- return Objects.hash(payrollCalendarID, startDate, employeeNumber, niCategory);
+ return Objects.hash(payrollCalendarID, startDate, employeeNumber, niCategory, niCategories);
}
@Override
@@ -285,6 +256,7 @@ public String toString() {
sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
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("}");
return sb.toString();
}
diff --git a/src/main/java/com/xero/models/payrolluk/NICategory.java b/src/main/java/com/xero/models/payrolluk/NICategory.java
new file mode 100644
index 00000000..918cbc65
--- /dev/null
+++ b/src/main/java/com/xero/models/payrolluk/NICategory.java
@@ -0,0 +1,264 @@
+/*
+ * 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.math.BigDecimal;
+import java.util.Objects;
+import org.threeten.bp.LocalDate;
+
+/** NICategory */
+public class NICategory {
+ StringUtil util = new StringUtil();
+
+ @JsonProperty("startDate")
+ private LocalDate startDate;
+
+ @JsonProperty("niCategory")
+ private NICategoryLetter niCategory;
+
+ @JsonProperty("niCategoryID")
+ private BigDecimal niCategoryID;
+
+ @JsonProperty("dateFirstEmployedAsCivilian")
+ private LocalDate dateFirstEmployedAsCivilian;
+
+ @JsonProperty("workplacePostcode")
+ private String workplacePostcode;
+ /**
+ * The start date of the NI category (YYYY-MM-DD)
+ *
+ * @param startDate LocalDate
+ * @return NICategory
+ */
+ public NICategory startDate(LocalDate startDate) {
+ this.startDate = startDate;
+ return this;
+ }
+
+ /**
+ * The start date of the NI category (YYYY-MM-DD)
+ *
+ * @return startDate
+ */
+ @ApiModelProperty(
+ example = "Mon Dec 02 00:00:00 UTC 2024",
+ value = "The start date of the NI category (YYYY-MM-DD)")
+ /**
+ * The start date of the NI category (YYYY-MM-DD)
+ *
+ * @return startDate LocalDate
+ */
+ public LocalDate getStartDate() {
+ return startDate;
+ }
+
+ /**
+ * The start date of the NI category (YYYY-MM-DD)
+ *
+ * @param startDate LocalDate
+ */
+ public void setStartDate(LocalDate startDate) {
+ this.startDate = startDate;
+ }
+
+ /**
+ * niCategory
+ *
+ * @param niCategory NICategoryLetter
+ * @return NICategory
+ */
+ public NICategory niCategory(NICategoryLetter niCategory) {
+ this.niCategory = niCategory;
+ return this;
+ }
+
+ /**
+ * Get niCategory
+ *
+ * @return niCategory
+ */
+ @ApiModelProperty(required = true, value = "")
+ /**
+ * niCategory
+ *
+ * @return niCategory NICategoryLetter
+ */
+ public NICategoryLetter getNiCategory() {
+ return niCategory;
+ }
+
+ /**
+ * niCategory
+ *
+ * @param niCategory NICategoryLetter
+ */
+ public void setNiCategory(NICategoryLetter niCategory) {
+ this.niCategory = niCategory;
+ }
+
+ /**
+ * Xero unique identifier for the NI category
+ *
+ * @param niCategoryID BigDecimal
+ * @return NICategory
+ */
+ public NICategory niCategoryID(BigDecimal niCategoryID) {
+ this.niCategoryID = niCategoryID;
+ return this;
+ }
+
+ /**
+ * Xero unique identifier for the NI category
+ *
+ * @return niCategoryID
+ */
+ @ApiModelProperty(example = "15", value = "Xero unique identifier for the NI category")
+ /**
+ * Xero unique identifier for the NI category
+ *
+ * @return niCategoryID BigDecimal
+ */
+ public BigDecimal getNiCategoryID() {
+ return niCategoryID;
+ }
+
+ /**
+ * Xero unique identifier for the NI category
+ *
+ * @param niCategoryID BigDecimal
+ */
+ public void setNiCategoryID(BigDecimal niCategoryID) {
+ this.niCategoryID = niCategoryID;
+ }
+
+ /**
+ * The date in which the employee was first employed as a civilian (YYYY-MM-DD)
+ *
+ * @param dateFirstEmployedAsCivilian LocalDate
+ * @return NICategory
+ */
+ public NICategory dateFirstEmployedAsCivilian(LocalDate dateFirstEmployedAsCivilian) {
+ this.dateFirstEmployedAsCivilian = dateFirstEmployedAsCivilian;
+ return this;
+ }
+
+ /**
+ * The date in which the employee was first employed as a civilian (YYYY-MM-DD)
+ *
+ * @return dateFirstEmployedAsCivilian
+ */
+ @ApiModelProperty(
+ example = "Mon Dec 02 00:00:00 UTC 2024",
+ value = "The date in which the employee was first employed as a civilian (YYYY-MM-DD)")
+ /**
+ * The date in which the employee was first employed as a civilian (YYYY-MM-DD)
+ *
+ * @return dateFirstEmployedAsCivilian LocalDate
+ */
+ public LocalDate getDateFirstEmployedAsCivilian() {
+ return dateFirstEmployedAsCivilian;
+ }
+
+ /**
+ * The date in which the employee was first employed as a civilian (YYYY-MM-DD)
+ *
+ * @param dateFirstEmployedAsCivilian LocalDate
+ */
+ public void setDateFirstEmployedAsCivilian(LocalDate dateFirstEmployedAsCivilian) {
+ this.dateFirstEmployedAsCivilian = dateFirstEmployedAsCivilian;
+ }
+
+ /**
+ * The workplace postcode
+ *
+ * @param workplacePostcode String
+ * @return NICategory
+ */
+ public NICategory workplacePostcode(String workplacePostcode) {
+ this.workplacePostcode = workplacePostcode;
+ return this;
+ }
+
+ /**
+ * The workplace postcode
+ *
+ * @return workplacePostcode
+ */
+ @ApiModelProperty(example = "SW1A 1AA", required = true, value = "The workplace postcode")
+ /**
+ * The workplace postcode
+ *
+ * @return workplacePostcode String
+ */
+ public String getWorkplacePostcode() {
+ return workplacePostcode;
+ }
+
+ /**
+ * The workplace postcode
+ *
+ * @param workplacePostcode String
+ */
+ public void setWorkplacePostcode(String workplacePostcode) {
+ this.workplacePostcode = workplacePostcode;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NICategory niCategory = (NICategory) o;
+ return Objects.equals(this.startDate, niCategory.startDate)
+ && Objects.equals(this.niCategory, niCategory.niCategory)
+ && Objects.equals(this.niCategoryID, niCategory.niCategoryID)
+ && Objects.equals(this.dateFirstEmployedAsCivilian, niCategory.dateFirstEmployedAsCivilian)
+ && Objects.equals(this.workplacePostcode, niCategory.workplacePostcode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ startDate, niCategory, niCategoryID, dateFirstEmployedAsCivilian, workplacePostcode);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class NICategory {\n");
+ sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n");
+ sb.append(" niCategory: ").append(toIndentedString(niCategory)).append("\n");
+ sb.append(" niCategoryID: ").append(toIndentedString(niCategoryID)).append("\n");
+ sb.append(" dateFirstEmployedAsCivilian: ")
+ .append(toIndentedString(dateFirstEmployedAsCivilian))
+ .append("\n");
+ sb.append(" workplacePostcode: ").append(toIndentedString(workplacePostcode)).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/NICategoryLetter.java b/src/main/java/com/xero/models/payrolluk/NICategoryLetter.java
new file mode 100644
index 00000000..bbae8f1d
--- /dev/null
+++ b/src/main/java/com/xero/models/payrolluk/NICategoryLetter.java
@@ -0,0 +1,108 @@
+/*
+ * 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 employee's NI Category letter. */
+public enum NICategoryLetter {
+
+ /** A */
+ A("A"),
+
+ /** B */
+ B("B"),
+
+ /** C */
+ C("C"),
+
+ /** D */
+ D("D"),
+
+ /** E */
+ E("E"),
+
+ /** F */
+ F("F"),
+
+ /** H */
+ H("H"),
+
+ /** I */
+ I("I"),
+
+ /** J */
+ J("J"),
+
+ /** K */
+ K("K"),
+
+ /** L */
+ L("L"),
+
+ /** M */
+ M("M"),
+
+ /** N */
+ N("N"),
+
+ /** S */
+ S("S"),
+
+ /** V */
+ V("V"),
+
+ /** X */
+ X("X"),
+
+ /** Z */
+ Z("Z");
+
+ private String value;
+
+ NICategoryLetter(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 NICategoryLetter fromValue(String value) {
+ for (NICategoryLetter b : NICategoryLetter.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
diff --git a/src/main/java/com/xero/models/payrolluk/NICategoryOneOf.java b/src/main/java/com/xero/models/payrolluk/NICategoryOneOf.java
new file mode 100644
index 00000000..699207a9
--- /dev/null
+++ b/src/main/java/com/xero/models/payrolluk/NICategoryOneOf.java
@@ -0,0 +1,164 @@
+/*
+ * 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.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** NICategoryOneOf */
+public class NICategoryOneOf {
+ StringUtil util = new StringUtil();
+ /** Gets or Sets niCategory */
+ public enum NiCategoryEnum {
+ /** F */
+ F("F"),
+
+ /** I */
+ I("I"),
+
+ /** L */
+ L("L"),
+
+ /** S */
+ S("S"),
+
+ /** N */
+ N("N"),
+
+ /** E */
+ E("E"),
+
+ /** D */
+ D("D"),
+
+ /** K */
+ K("K");
+
+ private String value;
+
+ NiCategoryEnum(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 NiCategoryEnum fromValue(String value) {
+ for (NiCategoryEnum b : NiCategoryEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("niCategory")
+ private NiCategoryEnum niCategory;
+ /**
+ * niCategory
+ *
+ * @param niCategory NiCategoryEnum
+ * @return NICategoryOneOf
+ */
+ public NICategoryOneOf niCategory(NiCategoryEnum niCategory) {
+ this.niCategory = niCategory;
+ return this;
+ }
+
+ /**
+ * Get niCategory
+ *
+ * @return niCategory
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * niCategory
+ *
+ * @return niCategory NiCategoryEnum
+ */
+ public NiCategoryEnum getNiCategory() {
+ return niCategory;
+ }
+
+ /**
+ * niCategory
+ *
+ * @param niCategory NiCategoryEnum
+ */
+ public void setNiCategory(NiCategoryEnum niCategory) {
+ this.niCategory = niCategory;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NICategoryOneOf niCategoryOneOf = (NICategoryOneOf) o;
+ return Objects.equals(this.niCategory, niCategoryOneOf.niCategory);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(niCategory);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class NICategoryOneOf {\n");
+ sb.append(" niCategory: ").append(toIndentedString(niCategory)).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/NICategoryOneOf1.java b/src/main/java/com/xero/models/payrolluk/NICategoryOneOf1.java
new file mode 100644
index 00000000..2336f6cf
--- /dev/null
+++ b/src/main/java/com/xero/models/payrolluk/NICategoryOneOf1.java
@@ -0,0 +1,143 @@
+/*
+ * 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.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.xero.api.StringUtil;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Objects;
+
+/** NICategoryOneOf1 */
+public class NICategoryOneOf1 {
+ StringUtil util = new StringUtil();
+ /** Gets or Sets niCategory */
+ public enum NiCategoryEnum {
+ /** V */
+ V("V");
+
+ private String value;
+
+ NiCategoryEnum(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 NiCategoryEnum fromValue(String value) {
+ for (NiCategoryEnum b : NiCategoryEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ @JsonProperty("niCategory")
+ private NiCategoryEnum niCategory;
+ /**
+ * niCategory
+ *
+ * @param niCategory NiCategoryEnum
+ * @return NICategoryOneOf1
+ */
+ public NICategoryOneOf1 niCategory(NiCategoryEnum niCategory) {
+ this.niCategory = niCategory;
+ return this;
+ }
+
+ /**
+ * Get niCategory
+ *
+ * @return niCategory
+ */
+ @ApiModelProperty(value = "")
+ /**
+ * niCategory
+ *
+ * @return niCategory NiCategoryEnum
+ */
+ public NiCategoryEnum getNiCategory() {
+ return niCategory;
+ }
+
+ /**
+ * niCategory
+ *
+ * @param niCategory NiCategoryEnum
+ */
+ public void setNiCategory(NiCategoryEnum niCategory) {
+ this.niCategory = niCategory;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ NICategoryOneOf1 niCategoryOneOf1 = (NICategoryOneOf1) o;
+ return Objects.equals(this.niCategory, niCategoryOneOf1.niCategory);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(niCategory);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class NICategoryOneOf1 {\n");
+ sb.append(" niCategory: ").append(toIndentedString(niCategory)).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/test/java/com/xero/api/client/PayrollUkApiEmploymentTest.java b/src/test/java/com/xero/api/client/PayrollUkApiEmploymentTest.java
index b10a2757..3465569e 100644
--- a/src/test/java/com/xero/api/client/PayrollUkApiEmploymentTest.java
+++ b/src/test/java/com/xero/api/client/PayrollUkApiEmploymentTest.java
@@ -77,7 +77,7 @@ public void createEmploymentTest() throws IOException {
assertThat(response.getEmployment().getPayrollCalendarID(), is(equalTo(UUID.fromString("216d80e6-af55-47b1-b718-9457c3f5d2fe"))));
assertThat(response.getEmployment().getStartDate(), is(equalTo(LocalDate.of(2020, 04, 01))));
assertThat(response.getEmployment().getEmployeeNumber(), is(equalTo("123ABC")));
- assertThat(response.getEmployment().getNiCategory(), is(equalTo(com.xero.models.payrolluk.Employment.NiCategoryEnum.A)));
+ assertThat(response.getEmployment().getNiCategory(), is(equalTo(com.xero.models.payrolluk.NICategoryLetter.A)));
//System.out.println(response.toString());
}
}