|
1593 | 1593 | "format" : "date-time",
|
1594 | 1594 | "x-is-datetime" : true
|
1595 | 1595 | },
|
| 1596 | + "niCategory" : { |
| 1597 | + "$ref" : "#/components/schemas/NICategoryLetter" |
| 1598 | + }, |
| 1599 | + "niCategories" : { |
| 1600 | + "type" : "array", |
| 1601 | + "description" : "The employee's NI categories", |
| 1602 | + "items" : { |
| 1603 | + "$ref" : "#/components/schemas/NICategory" |
| 1604 | + } |
| 1605 | + }, |
1596 | 1606 | "nationalInsuranceNumber" : {
|
1597 | 1607 | "type" : "string",
|
1598 | 1608 | "description" : "National insurance number of the employee",
|
|
2260 | 2270 | };
|
2261 | 2271 | defs["Employment"] = {
|
2262 | 2272 | "title" : "",
|
2263 |
| - "required" : [ "EmployeeNumber", "NICategory", "PayrollCalendarID", "StartDate" ], |
| 2273 | + "required" : [ "EmployeeNumber", "NICategories", "PayrollCalendarID", "StartDate" ], |
2264 | 2274 | "type" : "object",
|
2265 | 2275 | "properties" : {
|
2266 | 2276 | "payrollCalendarID" : {
|
|
2280 | 2290 | "example" : "7"
|
2281 | 2291 | },
|
2282 | 2292 | "niCategory" : {
|
2283 |
| - "type" : "string", |
2284 |
| - "description" : "The NI Category of the employee", |
2285 |
| - "example" : "A", |
2286 |
| - "enum" : [ "A", "B", "C", "F", "H", "I", "J", "L", "M", "S", "V", "X", "Z" ] |
| 2293 | + "$ref" : "#/components/schemas/NICategoryLetter" |
| 2294 | + }, |
| 2295 | + "niCategories" : { |
| 2296 | + "type" : "array", |
| 2297 | + "description" : "The employee's NI categories", |
| 2298 | + "items" : { |
| 2299 | + "$ref" : "#/components/schemas/NICategory" |
| 2300 | + } |
2287 | 2301 | }
|
2288 | 2302 | },
|
2289 | 2303 | "description" : ""
|
|
2500 | 2514 | }
|
2501 | 2515 | },
|
2502 | 2516 | "description" : ""
|
| 2517 | +}; |
| 2518 | + defs["NICategory"] = { |
| 2519 | + "title" : "", |
| 2520 | + "required" : [ "niCategory", "workplacePostcode" ], |
| 2521 | + "type" : "object", |
| 2522 | + "properties" : { |
| 2523 | + "startDate" : { |
| 2524 | + "type" : "string", |
| 2525 | + "description" : "The start date of the NI category (YYYY-MM-DD)", |
| 2526 | + "format" : "date", |
| 2527 | + "example" : "2024-12-02", |
| 2528 | + "x-is-date" : true |
| 2529 | + }, |
| 2530 | + "niCategory" : { |
| 2531 | + "$ref" : "#/components/schemas/NICategoryLetter" |
| 2532 | + }, |
| 2533 | + "niCategoryID" : { |
| 2534 | + "type" : "number", |
| 2535 | + "description" : "Xero unique identifier for the NI category", |
| 2536 | + "example" : 15 |
| 2537 | + }, |
| 2538 | + "dateFirstEmployedAsCivilian" : { |
| 2539 | + "type" : "string", |
| 2540 | + "description" : "The date in which the employee was first employed as a civilian (YYYY-MM-DD)", |
| 2541 | + "format" : "date", |
| 2542 | + "example" : "2024-12-02", |
| 2543 | + "x-is-date" : true |
| 2544 | + }, |
| 2545 | + "workplacePostcode" : { |
| 2546 | + "type" : "string", |
| 2547 | + "description" : "The workplace postcode", |
| 2548 | + "example" : "SW1A 1AA" |
| 2549 | + } |
| 2550 | + }, |
| 2551 | + "description" : "", |
| 2552 | + "oneOf" : [ { |
| 2553 | + "$ref" : "#/components/schemas/NICategory_oneOf" |
| 2554 | + }, { |
| 2555 | + "$ref" : "#/components/schemas/NICategory_oneOf_1" |
| 2556 | + } ] |
| 2557 | +}; |
| 2558 | + defs["NICategoryLetter"] = { |
| 2559 | + "title" : "", |
| 2560 | + "type" : "string", |
| 2561 | + "description" : "The employee's NI Category letter.", |
| 2562 | + "example" : "I", |
| 2563 | + "enum" : [ "A", "B", "C", "D", "E", "F", "H", "I", "J", "K", "L", "M", "N", "S", "V", "X", "Z" ] |
| 2564 | +}; |
| 2565 | + defs["NICategory_oneOf"] = { |
| 2566 | + "title" : "", |
| 2567 | + "required" : [ "workplacePostcode" ], |
| 2568 | + "properties" : { |
| 2569 | + "niCategory" : { |
| 2570 | + "type" : "string", |
| 2571 | + "enum" : [ "F", "I", "L", "S", "N", "E", "D", "K" ] |
| 2572 | + } |
| 2573 | + }, |
| 2574 | + "description" : "" |
| 2575 | +}; |
| 2576 | + defs["NICategory_oneOf_1"] = { |
| 2577 | + "title" : "", |
| 2578 | + "required" : [ "dateFirstEmployedAsCivilian" ], |
| 2579 | + "properties" : { |
| 2580 | + "niCategory" : { |
| 2581 | + "type" : "string", |
| 2582 | + "enum" : [ "V" ] |
| 2583 | + } |
| 2584 | + }, |
| 2585 | + "description" : "" |
2503 | 2586 | };
|
2504 | 2587 | defs["Pagination"] = {
|
2505 | 2588 | "title" : "",
|
@@ -5872,6 +5955,8 @@ <h3>Usage and SDK Samples</h3>
|
5872 | 5955 | Employment employment = new Employment();
|
5873 | 5956 | employment.setPayrollCalendarID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
|
5874 | 5957 | employment.setStartDate(startDate);
|
| 5958 | + |
| 5959 | + NICategories niCategories = new NICategories(); |
5875 | 5960 |
|
5876 | 5961 | try {
|
5877 | 5962 | EmploymentObject result = apiInstance.createEmployment(accessToken, xeroTenantId, employeeID, employment, idempotencyKey);
|
@@ -6006,7 +6091,7 @@ <h2>Parameters</h2>
|
6006 | 6091 | "schema" : {
|
6007 | 6092 | "$ref" : "#/components/schemas/Employment"
|
6008 | 6093 | },
|
6009 |
| - "example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"EmployeeNumber\": \"123ABC\", \"NICategory\": \"A\" }" |
| 6094 | + "example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"NICategories\": [ { \"NICategory\": \"A\", \"StartDate\": \"2020-05-01\" } ], \"EmployeeNumber\": \"123ABC\" }" |
6010 | 6095 | }
|
6011 | 6096 | },
|
6012 | 6097 | "required" : true
|
|
0 commit comments