Skip to content

Commit 6cdd7c6

Browse files
GiovanniGogiovanni-gothe-chris-mitchell
authored
feat: SDK update for adding contracts to employee and employment object and its relevant endpoints
* [POB-3907] SDK update for adding contracts to employee and employment object and its relevant endpoints * [POB-3907] Fix linting error Co-authored-by: Chris Mitchell <[email protected]> * [POB-3907] Fix linting error Co-authored-by: Chris Mitchell <[email protected]> --------- Co-authored-by: Giovanni Go <[email protected]> Co-authored-by: Chris Mitchell <[email protected]>
1 parent 709b01d commit 6cdd7c6

File tree

1 file changed

+128
-2
lines changed

1 file changed

+128
-2
lines changed

xero-payroll-uk.yaml

Lines changed: 128 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ paths:
7777
updatedDateUTC: 2020-02-13T16:23:31
7878
createdDateUTC: 2020-02-10T10:00:24
7979
isOffPayrollWorker: false
80+
contracts: []
8081
- employeeID: 67e545d4-e8a6-4f98-9f63-85c2383dfe12
8182
firstName: Charlotte
8283
lastName: Danes
@@ -95,14 +96,21 @@ paths:
9596
updatedDateUTC: 2020-02-13T16:48:51
9697
createdDateUTC: 2020-02-13T16:32:12
9798
isOffPayrollWorker: false
99+
contracts:
100+
- publicKey: b4d71548-2800-4fb9-be6c-d496a617428c
101+
isFixedTerm: false
102+
employmentStatus: Employee
103+
contractType: PartTime
104+
startDate: 2020-02-03T00:00:00
105+
fixedTermEndDate: null
98106
- employeeID: eb4a0c3b-b0d6-440d-bccc-348b7dc92321
99107
firstName: Chelsea
100108
lastName: Serati
101109
dateOfBirth: 1976-02-16T00:00:00Z
102110
gender: F
103111
email: null
104112
phoneNumber: null
105-
startDate: 2019-07-02T00:00:00
113+
startDate: 2019-07-01T00:00:00
106114
address:
107115
addressLine1: 171 Midsummer Boulevard
108116
city: Milton Keynes
@@ -113,6 +121,24 @@ paths:
113121
updatedDateUTC: 2020-02-13T16:53:12
114122
createdDateUTC: 2020-02-13T16:46:41
115123
isOffPayrollWorker: false
124+
contracts:
125+
- publicKey: 3a8243d5-a14a-4c06-a71b-930194928ee9
126+
isFixedTerm: false
127+
employmentStatus: Worker
128+
contractType: PartTime
129+
startDate: 2019-07-01T00:00:00
130+
fixedTermEndDate: null
131+
- publicKey: ce4fe24d-bb85-4b17-a461-3e56917457d6
132+
isFixedTerm: true
133+
employmentStatus: Employee
134+
contractType: FullTime
135+
startDate: 2020-07-01T00:00:00
136+
fixedTermEndDate: 2026-08-01T00:00:00
137+
developmentalRoleDetails:
138+
developmentalRolePublicKey: 05bceb91-89c0-4ecc-864c-32a874143770
139+
startDate: 2020-07-01T00:00:00
140+
endDate: 2026-06-30T00:00:00
141+
developmentalRole: Apprentice
116142
"400":
117143
description: validation error for a bad request
118144
content:
@@ -339,6 +365,13 @@ paths:
339365
dateFirstEmployedAsCivilian: "2020-05-01"
340366
workplacePostcode: SW1A 1AA
341367
employeeNumber: "2"
368+
contracts:
369+
- publicKey: a3d71548-2800-4fb9-be6c-d496a617428c
370+
isFixedTerm: false
371+
employmentStatus: Employee
372+
contractType: PartTime
373+
startDate: 2020-05-01T00:00:00
374+
fixedTermEndDate: null
342375
put:
343376
security:
344377
- OAuth2:
@@ -593,6 +626,13 @@ paths:
593626
dateFirstEmployedAsCivilian: "2020-05-01"
594627
workplacePostcode: SW1A 1AA
595628
employeeNumber: 123ABC
629+
contracts:
630+
- publicKey: ddd71548-2800-4fb9-be6c-d496a617428c
631+
isFixedTerm: false
632+
employmentStatus: Employee
633+
contractType: FullTime
634+
startDate: 2020-04-01T00:00:00
635+
fixedTermEndDate: null
596636
"400":
597637
description: validation error for a bad request
598638
content:
@@ -5611,6 +5651,11 @@ components:
56115651
isOffPayrollWorker:
56125652
description: Whether the employee is an off payroll worker
56135653
type: boolean
5654+
contracts:
5655+
description: The employee's contracts
5656+
type: array
5657+
items:
5658+
$ref: '#/components/schemas/Contracts'
56145659
EmploymentObject:
56155660
type: object
56165661
properties:
@@ -5648,7 +5693,12 @@ components:
56485693
description: The employee's NI categories
56495694
type: array
56505695
items:
5651-
$ref: "#/components/schemas/NICategory"
5696+
$ref: '#/components/schemas/NICategory'
5697+
contracts:
5698+
description: The employee's contracts
5699+
type: array
5700+
items:
5701+
$ref: '#/components/schemas/Contracts'
56525702
EmployeeTaxObject:
56535703
type: object
56545704
properties:
@@ -7537,3 +7587,79 @@ components:
75377587
niCategory:
75387588
enum:
75397589
- V
7590+
EmploymentStatus:
7591+
description: The employment status of the employee.
7592+
type: string
7593+
example: Employee
7594+
enum:
7595+
- Employee
7596+
- Worker
7597+
- Unspecified
7598+
ContractType:
7599+
description: The contract type of the employee.
7600+
type: string
7601+
example: FullTime
7602+
enum:
7603+
- FullTime
7604+
- PartTime
7605+
- ZeroHour
7606+
- Unspecified
7607+
DevelopmentalRoleDetails:
7608+
type: object
7609+
required:
7610+
- startDate
7611+
- endDate
7612+
- developmentalRole
7613+
properties:
7614+
startDate:
7615+
description: The start date of the developmental role
7616+
type: string
7617+
format: date
7618+
example: 2024-12-02
7619+
x-is-date: true
7620+
endDate:
7621+
description: The end date of the developmental role
7622+
type: string
7623+
format: date
7624+
example: 2024-12-02
7625+
x-is-date: true
7626+
developmentalRole:
7627+
description: The developmental role type - "Apprentice" is the only supported role currently
7628+
type: string
7629+
example: Apprentice
7630+
publicKey:
7631+
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
7632+
type: string
7633+
format: uuid
7634+
Contracts:
7635+
type: object
7636+
required:
7637+
- startDate
7638+
- employmentStatus
7639+
- contractType
7640+
properties:
7641+
startDate:
7642+
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)
7643+
type: string
7644+
format: date
7645+
example: 2024-12-02
7646+
x-is-date: true
7647+
employmentStatus:
7648+
$ref: '#/components/schemas/EmploymentStatus'
7649+
contractType:
7650+
$ref: '#/components/schemas/ContractType'
7651+
publicKey:
7652+
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
7653+
type: string
7654+
format: uuid
7655+
isFixedTerm:
7656+
description: describes whether the contract is fixed term (required if trying to create Fixed term contract)
7657+
type: boolean
7658+
fixedTermEndDate:
7659+
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)
7660+
type: string
7661+
format: date
7662+
example: 2025-11-01
7663+
x-is-date: true
7664+
developmentalRoleDetails:
7665+
$ref: '#/components/schemas/DevelopmentalRoleDetails'

0 commit comments

Comments
 (0)