From f7f01f70162a70ca55feb7348bb0d4f5292e176b Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:10:06 +0530 Subject: [PATCH 1/7] converts example to object --- xero-payroll-uk.yaml | 84 ++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 46 deletions(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index c73b881f5..90015c71b 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -311,52 +311,44 @@ paths: application/json: schema: $ref: '#/components/schemas/EmployeeObject' - example: '{ - "id": "9414291b-a8c6-08fa-b165-9b30b1e6aab5", - "providerName": "!YLT5Y", - "dateTimeUTC": "2018-04-09T05:15:18.1011141", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employee": { - "employeeID": "d17e008e-3381-45c0-b50c-2fab7757e503", - "title": "Mr.", - "firstName": "Edgar", - "lastName": "Allan Po", - "dateOfBirth": "1985-03-24T00:00:00", - "gender": "M", - "email": "tester1@gmail.com", - "phoneNumber": "0400123456", - "nationalInsuranceNumber": null, - "isOffPayrollWorker": false, - "address": { - "addressLine1": "171 Midsummer", - "addressLine2": null, - "city": "Milton Keyness", - "county": null, - "countryName": null, - "postCode": "MK9 1EB" - }, - "payrollCalendarID": null, - "updatedDateUTC": "2017-05-12T10:00:24", - "createdDateUTC": "2017-05-12T10:00:24", - "niCategories": [ - { - "startDate": "2020-05-01T00:00:00", - "niCategory": "A" - }, - { - "startDate": null, - "niCategory": "F", - "niCategoryID": 1, - "dateFirstEmployedAsCivilian": null, - "workplacePostcode": "SW1A 1AA" - } - ], - "employeeNumber": "2", - "endDate": null - } - }' + example: + id: 9414291b-a8c6-08fa-b165-9b30b1e6aab5 + providerName: "!YLT5Y" + dateTimeUTC: '2018-04-09T05:15:18.1011141' + httpStatusCode: OK + pagination: null + problem: null + employee: + employeeID: d17e008e-3381-45c0-b50c-2fab7757e503 + title: Mr. + firstName: Edgar + lastName: Allan Po + dateOfBirth: '1985-03-24T00:00:00' + gender: M + email: tester1@gmail.com + phoneNumber: '0400123456' + nationalInsuranceNumber: + isOffPayrollWorker: false + address: + addressLine1: 171 Midsummer + addressLine2: null + city: Milton Keyness + county: null + countryName: null + postCode: MK9 1EB + payrollCalendarID: null + updatedDateUTC: '2017-05-12T10:00:24' + createdDateUTC: '2017-05-12T10:00:24' + niCategories: + - startDate: '2020-05-01T00:00:00' + niCategory: A + - startDate: + niCategory: F + niCategoryID: 1 + dateFirstEmployedAsCivilian: + workplacePostcode: SW1A 1AA + employeeNumber: '2' + endDate: null put: security: - OAuth2: From f2323014b653618aa55fb86cf8726802ab80d819 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:14:08 +0530 Subject: [PATCH 2/7] fixes countryname in example --- xero-payroll-uk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 90015c71b..5c333a287 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -249,7 +249,7 @@ paths: addressLine2: null city: Milton Keyness county: null - countryName: null + countryName: UNITED KINGDOM postCode: MK9 1EB payrollCalendarID: null updatedDateUTC: 2020-03-25T03:12:10 From e2c13f686b3a8eff3b0b1382060927ea72b26af3 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:24:09 +0530 Subject: [PATCH 3/7] adds country name --- xero-payroll-uk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 5c333a287..1d7223d18 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -334,7 +334,7 @@ paths: addressLine2: null city: Milton Keyness county: null - countryName: null + countryName: UNITED KINGDOM postCode: MK9 1EB payrollCalendarID: null updatedDateUTC: '2017-05-12T10:00:24' From bb96d9bef770d177164d9196d38a47fe4128b7f5 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:29:16 +0530 Subject: [PATCH 4/7] fixes payroll calendar id --- xero-payroll-uk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 1d7223d18..5d831703f 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -336,7 +336,7 @@ paths: county: null countryName: UNITED KINGDOM postCode: MK9 1EB - payrollCalendarID: null + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe updatedDateUTC: '2017-05-12T10:00:24' createdDateUTC: '2017-05-12T10:00:24' niCategories: From c5fb0d6b49c139ba24c89da05ece0e25e2882c03 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:30:14 +0530 Subject: [PATCH 5/7] fixes national insurance number --- xero-payroll-uk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 5d831703f..73008f5ca 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -327,7 +327,7 @@ paths: gender: M email: tester1@gmail.com phoneNumber: '0400123456' - nationalInsuranceNumber: + nationalInsuranceNumber: AB123456C isOffPayrollWorker: false address: addressLine1: 171 Midsummer From da1c76cd3fe0ee43d903a1647cb0eaa5c6030f32 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Wed, 30 Apr 2025 18:54:55 +0530 Subject: [PATCH 6/7] more fixes --- xero-payroll-uk.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 73008f5ca..c57d388d3 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -62,14 +62,13 @@ paths: - employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 firstName: Jack lastName: Allan - dateOfBirth: 1987-12-23T00:00:00 + dateOfBirth: '1987-12-23T00:00:00' gender: M email: null phoneNumber: null startDate: 2020-02-03T00:00:00 address: addressLine1: 171 Midsummer Boulevard - addressLine2: null city: Milton Keynes county: null countryName: UNITED KINGDOM @@ -89,7 +88,6 @@ paths: startDate: 2020-02-03T00:00:00 address: addressLine1: 171 Midsummer Blvd - addressLine2: null city: Milton Keynes county: null countryName: UNITED KINGDOM @@ -109,7 +107,6 @@ paths: startDate: 2019-07-02T00:00:00 address: addressLine1: 171 Midsummer Boulevard - addressLine2: null city: Milton Keynes county: null countryName: UNITED KINGDOM @@ -246,7 +243,6 @@ paths: isOffPayrollWorker: false address: addressLine1: 171 Midsummer - addressLine2: null city: Milton Keyness county: null countryName: UNITED KINGDOM @@ -327,11 +323,10 @@ paths: gender: M email: tester1@gmail.com phoneNumber: '0400123456' - nationalInsuranceNumber: AB123456C + nationalInsuranceNumber: 'AB123456C' isOffPayrollWorker: false address: addressLine1: 171 Midsummer - addressLine2: null city: Milton Keyness county: null countryName: UNITED KINGDOM @@ -479,7 +474,6 @@ paths: isOffPayrollWorker: false address: addressLine1: 101 Green St - addressLine2: null city: San Francisco county: null countryName: null From 53dd495cf26cb049b16749f4ad9594a8bab22e83 Mon Sep 17 00:00:00 2001 From: manishT72x Date: Mon, 5 May 2025 14:50:16 +0530 Subject: [PATCH 7/7] fixes java unit tests --- xero-payroll-uk.yaml | 106 +++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 60 deletions(-) diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index c57d388d3..c099adcb5 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -62,7 +62,7 @@ paths: - employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0 firstName: Jack lastName: Allan - dateOfBirth: '1987-12-23T00:00:00' + dateOfBirth: 1987-12-23T00:00:00Z gender: M email: null phoneNumber: null @@ -76,12 +76,11 @@ paths: payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe updatedDateUTC: 2020-02-13T16:23:31 createdDateUTC: 2020-02-10T10:00:24 - endDate: null isOffPayrollWorker: false - employeeID: 67e545d4-e8a6-4f98-9f63-85c2383dfe12 firstName: Charlotte lastName: Danes - dateOfBirth: 1993-10-24T00:00:00 + dateOfBirth: 1993-10-24T00:00:00Z gender: F email: null phoneNumber: null @@ -95,12 +94,11 @@ paths: payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254 updatedDateUTC: 2020-02-13T16:48:51 createdDateUTC: 2020-02-13T16:32:12 - endDate: null isOffPayrollWorker: false - employeeID: eb4a0c3b-b0d6-440d-bccc-348b7dc92321 firstName: Chelsea lastName: Serati - dateOfBirth: 1976-02-16T00:00:00 + dateOfBirth: 1976-02-16T00:00:00Z gender: F email: null phoneNumber: null @@ -114,7 +112,6 @@ paths: payrollCalendarID: d45bc68f-59d6-4000-929d-1058dcfa79e1 updatedDateUTC: 2020-02-13T16:53:12 createdDateUTC: 2020-02-13T16:46:41 - endDate: null isOffPayrollWorker: false "400": description: validation error for a bad request @@ -234,7 +231,7 @@ paths: title: Mr firstName: Mike lastName: Fancy - dateOfBirth: 1999-01-01T00:00:00 + dateOfBirth: 1999-01-01 gender: M email: mike@starkindustries.com phoneNumber: null @@ -248,11 +245,10 @@ paths: countryName: UNITED KINGDOM postCode: MK9 1EB payrollCalendarID: null - updatedDateUTC: 2020-03-25T03:12:10 - createdDateUTC: 2020-03-25T03:12:10 + updatedDateUTC: '2020-03-25T03:12:10Z' + createdDateUTC: '2020-03-25T03:12:10Z' niCategory: null employeeNumber: null - endDate: null "400": description: validation error for a bad request content: @@ -269,7 +265,7 @@ paths: title: Mr firstName: Mike lastName: Fancy - dateOfBirth: 1999-01-01T00:00:00 + dateOfBirth: 1999-01-01T00:00:00Z gender: M email: mike@starkindustries.com isOffPayrollWorker: false @@ -313,13 +309,12 @@ paths: dateTimeUTC: '2018-04-09T05:15:18.1011141' httpStatusCode: OK pagination: null - problem: null employee: employeeID: d17e008e-3381-45c0-b50c-2fab7757e503 title: Mr. firstName: Edgar lastName: Allan Po - dateOfBirth: '1985-03-24T00:00:00' + dateOfBirth: '1985-03-24' gender: M email: tester1@gmail.com phoneNumber: '0400123456' @@ -332,18 +327,18 @@ paths: countryName: UNITED KINGDOM postCode: MK9 1EB payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe - updatedDateUTC: '2017-05-12T10:00:24' - createdDateUTC: '2017-05-12T10:00:24' + updatedDateUTC: '2017-05-12T10:00:24Z' + createdDateUTC: '2017-05-12T10:00:24Z' niCategories: - - startDate: '2020-05-01T00:00:00' - niCategory: A - - startDate: + - startDate: '2020-05-01' + niCategory: I + workplacePostcode: SW1A 1AA + - startDate: '2020-05-02' niCategory: F niCategoryID: 1 - dateFirstEmployedAsCivilian: + dateFirstEmployedAsCivilian: '2020-05-01' workplacePostcode: SW1A 1AA employeeNumber: '2' - endDate: null put: security: - OAuth2: @@ -465,7 +460,7 @@ paths: title: Mr firstName: Mike lastName: Johnllsbkrhwopson - dateOfBirth: 1999-01-01T00:00:00 + dateOfBirth: 1999-01-01 gender: M email: 84044@starkindustries.com phoneNumber: "0400123456" @@ -481,7 +476,6 @@ paths: payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe updatedDateUTC: "2020-03-25T17:03:50Z" createdDateUTC: "2020-02-10T10:00:24Z" - endDate: null "400": description: validation error for a bad request content: @@ -498,7 +492,7 @@ paths: title: Mr. firstName: TestDataUK lastName: Tester - dateOfBirth: 1992-11-22T00:00:00 + dateOfBirth: 1992-11-22T00:00:00Z gender: M email: tester@gmail.com phoneNumber: "0400123456" @@ -582,28 +576,23 @@ paths: application/json: schema: $ref: '#/components/schemas/EmploymentObject' - example: '{ - "id": "0160a355-1e6d-4fdc-9532-c0857feaa515", - "providerName": "provider-name", - "dateTimeUTC": "2020-03-26T18:09:11.6235442", - "httpStatusCode": "OK", - "pagination": null, - "problem": null, - "employment": { - "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "startDate": "2020-04-01T00:00:00", - "niCategories": [ - { - "niCategory": "A", - "startDate": "2020-05-01", - "niCategoryID": 594, - "dateFirstEmployedAsCivilian": null, - "workplacePostcode": null - } - ], - "employeeNumber": "123ABC" - } - }' + example: + id: 0160a355-1e6d-4fdc-9532-c0857feaa515 + providerName: provider-name + dateTimeUTC: '2020-03-26T18:09:11.6235442' + httpStatusCode: OK + pagination: + problem: + employment: + payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe + startDate: '2020-04-01T00:00:00' + niCategories: + - niCategory: I + startDate: '2020-05-01' + niCategoryID: 594 + dateFirstEmployedAsCivilian: '2020-05-01' + workplacePostcode: SW1A 1AA + employeeNumber: 123ABC '400': description: validation error for a bad request content: @@ -616,17 +605,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Employment' - example: '{ - "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", - "StartDate": "2020-04-01", - "NICategories": [ - { - "NICategory": "A", - "StartDate": "2020-05-01" - } - ], - "EmployeeNumber": "123ABC" - }' + example: + payrollCalendarID: cdfb8371-0b21-4b8a-8903-1024df6c391e + startDate: '2024-04-01' + niCategories: + - niCategory: I + startDate: '2020-05-01' + workplacePostcode: SW1A 1AA + employeeNumber: 123ABC /Employees/{EmployeeID}/Tax: parameters: - $ref: '#/components/parameters/requiredHeader' @@ -5783,10 +5769,10 @@ components: Employment: type: object required: - - PayrollCalendarID - - StartDate - - EmployeeNumber - - NICategories + - payrollCalendarID + - startDate + - employeeNumber + - niCategories properties: payrollCalendarID: description: Xero unique identifier for the payroll calendar of the employee