Skip to content

Commit 4df3cf4

Browse files
author
sangeet-joy_xero
committed
new updates from codegen
1 parent 7e9fa33 commit 4df3cf4

File tree

4 files changed

+40
-19
lines changed

4 files changed

+40
-19
lines changed

docs/v1/payroll-uk/index.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,7 @@
22722272
};
22732273
defs["Employment"] = {
22742274
"title" : "",
2275-
"required" : [ "EmployeeNumber", "NICategories", "PayrollCalendarID", "StartDate" ],
2275+
"required" : [ "employeeNumber", "niCategories", "payrollCalendarID", "startDate" ],
22762276
"type" : "object",
22772277
"properties" : {
22782278
"payrollCalendarID" : {
@@ -4607,7 +4607,7 @@ <h2>Parameters</h2>
46074607
"title" : "Mr",
46084608
"firstName" : "Mike",
46094609
"lastName" : "Fancy",
4610-
"dateOfBirth" : "1999-01-01T00:00:00",
4610+
"dateOfBirth" : "1999-01-01T00:00:00Z",
46114611
"gender" : "M",
46124612
"email" : "[email protected]",
46134613
"isOffPayrollWorker" : false,
@@ -6133,7 +6133,16 @@ <h2>Parameters</h2>
61336133
"schema" : {
61346134
"$ref" : "#/components/schemas/Employment"
61356135
},
6136-
"example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"NICategories\": [ { \"NICategory\": \"A\", \"StartDate\": \"2020-05-01\" } ], \"EmployeeNumber\": \"123ABC\" }"
6136+
"example" : {
6137+
"payrollCalendarID" : "cdfb8371-0b21-4b8a-8903-1024df6c391e",
6138+
"startDate" : "2024-04-01",
6139+
"niCategories" : [ {
6140+
"niCategory" : "I",
6141+
"startDate" : "2020-05-01",
6142+
"workplacePostcode" : "SW1A 1AA"
6143+
} ],
6144+
"employeeNumber" : "123ABC"
6145+
}
61376146
}
61386147
},
61396148
"required" : true
@@ -13393,7 +13402,7 @@ <h2>Parameters</h2>
1339313402
"title" : "Mr.",
1339413403
"firstName" : "TestDataUK",
1339513404
"lastName" : "Tester",
13396-
"dateOfBirth" : "1992-11-22T00:00:00",
13405+
"dateOfBirth" : "1992-11-22T00:00:00Z",
1339713406
"gender" : "M",
1339813407
"email" : "[email protected]",
1339913408
"phoneNumber" : "0400123456",

xero_python/payrolluk/docs/Employment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | [optional]
7-
**start_date** | **date** | Start date of the employment (YYYY-MM-DD) | [optional]
8-
**employee_number** | **str** | The employment number of the employee | [optional]
6+
**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee |
7+
**start_date** | **date** | Start date of the employment (YYYY-MM-DD) |
8+
**employee_number** | **str** | The employment number of the employee |
99
**ni_category** | [**NICategoryLetter**](NICategoryLetter.md) | | [optional]
10-
**ni_categories** | [**list[NICategory]**](NICategory.md) | The employee&#39;s NI categories | [optional]
10+
**ni_categories** | [**list[NICategory]**](NICategory.md) | The employee&#39;s NI categories |
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1313

xero_python/payrolluk/docs/PayrollUkApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ api_client = ApiClient(
368368
api_instance = PayrollUkApi(api_client)
369369

370370
xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant
371-
employee = {"title":"Mr","firstName":"Mike","lastName":"Fancy","dateOfBirth":"1999-01-01T00:00:00","gender":"M","email":"[email protected]","isOffPayrollWorker":false,"address":{"addressLine1":"171 Midsummer","city":"Milton Keyness","postCode":"MK9 1EB"}} # Employee |
371+
employee = {"title":"Mr","firstName":"Mike","lastName":"Fancy","dateOfBirth":"1999-01-01T00:00:00Z","gender":"M","email":"[email protected]","isOffPayrollWorker":false,"address":{"addressLine1":"171 Midsummer","city":"Milton Keyness","postCode":"MK9 1EB"}} # Employee |
372372
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
373373
try:
374374
# Creates employees
@@ -901,7 +901,7 @@ api_instance = PayrollUkApi(api_client)
901901

902902
xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant
903903
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object
904-
employment = { "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", "StartDate": "2020-04-01", "NICategories": [ { "NICategory": "A", "StartDate": "2020-05-01" } ], "EmployeeNumber": "123ABC" } # Employment |
904+
employment = {"payrollCalendarID":"cdfb8371-0b21-4b8a-8903-1024df6c391e","startDate":"2024-04-01","niCategories":[{"niCategory":"I","startDate":"2020-05-01","workplacePostcode":"SW1A 1AA"}],"employeeNumber":"123ABC"} # Employment |
905905
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
906906
try:
907907
# Creates employment detail for a specific employee using a unique employee ID
@@ -4172,7 +4172,7 @@ api_instance = PayrollUkApi(api_client)
41724172

41734173
xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant
41744174
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object
4175-
employee = {"title":"Mr.","firstName":"TestDataUK","lastName":"Tester","dateOfBirth":"1992-11-22T00:00:00","gender":"M","email":"[email protected]","phoneNumber":"0400123456","isOffPayrollWorker":false,"address":{"addressLine1":"171 Midsummer","city":"Milton Keyness","postCode":"MK9 1EB"}} # Employee |
4175+
employee = {"title":"Mr.","firstName":"TestDataUK","lastName":"Tester","dateOfBirth":"1992-11-22T00:00:00Z","gender":"M","email":"[email protected]","phoneNumber":"0400123456","isOffPayrollWorker":false,"address":{"addressLine1":"171 Midsummer","city":"Milton Keyness","postCode":"MK9 1EB"}} # Employee |
41764176
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
41774177
try:
41784178
# Updates a specific employee's detail

xero_python/payrolluk/models/employment.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,12 @@ def __init__(
6262
self._ni_categories = None
6363
self.discriminator = None
6464

65-
if payroll_calendar_id is not None:
66-
self.payroll_calendar_id = payroll_calendar_id
67-
if start_date is not None:
68-
self.start_date = start_date
69-
if employee_number is not None:
70-
self.employee_number = employee_number
65+
self.payroll_calendar_id = payroll_calendar_id
66+
self.start_date = start_date
67+
self.employee_number = employee_number
7168
if ni_category is not None:
7269
self.ni_category = ni_category
73-
if ni_categories is not None:
74-
self.ni_categories = ni_categories
70+
self.ni_categories = ni_categories
7571

7672
@property
7773
def payroll_calendar_id(self):
@@ -93,6 +89,10 @@ def payroll_calendar_id(self, payroll_calendar_id):
9389
:param payroll_calendar_id: The payroll_calendar_id of this Employment. # noqa: E501
9490
:type: str
9591
"""
92+
if payroll_calendar_id is None:
93+
raise ValueError(
94+
"Invalid value for `payroll_calendar_id`, must not be `None`"
95+
) # noqa: E501
9696

9797
self._payroll_calendar_id = payroll_calendar_id
9898

@@ -116,6 +116,10 @@ def start_date(self, start_date):
116116
:param start_date: The start_date of this Employment. # noqa: E501
117117
:type: date
118118
"""
119+
if start_date is None:
120+
raise ValueError(
121+
"Invalid value for `start_date`, must not be `None`"
122+
) # noqa: E501
119123

120124
self._start_date = start_date
121125

@@ -139,6 +143,10 @@ def employee_number(self, employee_number):
139143
:param employee_number: The employee_number of this Employment. # noqa: E501
140144
:type: str
141145
"""
146+
if employee_number is None:
147+
raise ValueError(
148+
"Invalid value for `employee_number`, must not be `None`"
149+
) # noqa: E501
142150

143151
self._employee_number = employee_number
144152

@@ -183,5 +191,9 @@ def ni_categories(self, ni_categories):
183191
:param ni_categories: The ni_categories of this Employment. # noqa: E501
184192
:type: list[NICategory]
185193
"""
194+
if ni_categories is None:
195+
raise ValueError(
196+
"Invalid value for `ni_categories`, must not be `None`"
197+
) # noqa: E501
186198

187199
self._ni_categories = ni_categories

0 commit comments

Comments
 (0)