Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 91 additions & 6 deletions docs/v1/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,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",
Expand Down Expand Up @@ -2262,7 +2272,7 @@
};
defs["Employment"] = {
"title" : "",
"required" : [ "EmployeeNumber", "NICategory", "PayrollCalendarID", "StartDate" ],
"required" : [ "EmployeeNumber", "NICategories", "PayrollCalendarID", "StartDate" ],
"type" : "object",
"properties" : {
"payrollCalendarID" : {
Expand All @@ -2282,10 +2292,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" : ""
Expand Down Expand Up @@ -2502,6 +2516,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" : "",
Expand Down Expand Up @@ -5846,6 +5929,8 @@ <h3>Usage and SDK Samples</h3>
employment = Employment(
payroll_calendar_id = "00000000-0000-0000-0000-000000000000",
start_date = start_date)

ni_categories = NICategories(

try:
api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment, idempotency_key)
Expand Down Expand Up @@ -5976,7 +6061,7 @@ <h2>Parameters</h2>
"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
Expand Down
4 changes: 4 additions & 0 deletions xero_python/payrolluk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
from xero_python.payrolluk.models.leave_type import LeaveType
from xero_python.payrolluk.models.leave_type_object import LeaveTypeObject
from xero_python.payrolluk.models.leave_types import LeaveTypes
from xero_python.payrolluk.models.ni_category import NICategory
from xero_python.payrolluk.models.ni_category_letter import NICategoryLetter
from xero_python.payrolluk.models.ni_category_one_of import NICategoryOneOf
from xero_python.payrolluk.models.ni_category_one_of1 import NICategoryOneOf1
from xero_python.payrolluk.models.pagination import Pagination
from xero_python.payrolluk.models.pay_run import PayRun
from xero_python.payrolluk.models.pay_run_calendar import PayRunCalendar
Expand Down
2 changes: 2 additions & 0 deletions xero_python/payrolluk/docs/Employee.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Name | Type | Description | Notes
**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | [optional]
**updated_date_utc** | **datetime** | UTC timestamp of last update to the employee | [optional]
**created_date_utc** | **datetime** | UTC timestamp when the employee was created in Xero | [optional]
**ni_category** | [**NICategoryLetter**](NICategoryLetter.md) | | [optional]
**ni_categories** | [**list[NICategory]**](NICategory.md) | The employee&#39;s NI categories | [optional]
**national_insurance_number** | **str** | National insurance number of the employee | [optional]
**is_off_payroll_worker** | **bool** | Whether the employee is an off payroll worker | [optional]

Expand Down
3 changes: 2 additions & 1 deletion xero_python/payrolluk/docs/Employment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Name | Type | Description | Notes
**payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | [optional]
**start_date** | **date** | Start date of the employment (YYYY-MM-DD) | [optional]
**employee_number** | **str** | The employment number of the employee | [optional]
**ni_category** | **str** | The NI Category of the employee | [optional]
**ni_category** | [**NICategoryLetter**](NICategoryLetter.md) | | [optional]
**ni_categories** | [**list[NICategory]**](NICategory.md) | The employee&#39;s NI categories | [optional]

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

Expand Down
14 changes: 14 additions & 0 deletions xero_python/payrolluk/docs/NICategory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# NICategory

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**start_date** | **date** | The start date of the NI category (YYYY-MM-DD) | [optional]
**ni_category** | [**NICategoryLetter**](NICategoryLetter.md) | |
**ni_category_id** | **float** | Xero unique identifier for the NI category | [optional]
**date_first_employed_as_civilian** | **date** | The date in which the employee was first employed as a civilian (YYYY-MM-DD) | [optional]
**workplace_postcode** | **str** | The workplace postcode |

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


9 changes: 9 additions & 0 deletions xero_python/payrolluk/docs/NICategoryLetter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NICategoryLetter

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

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


10 changes: 10 additions & 0 deletions xero_python/payrolluk/docs/NICategoryOneOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NICategoryOneOf

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ni_category** | **str** | | [optional]

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


10 changes: 10 additions & 0 deletions xero_python/payrolluk/docs/NICategoryOneOf1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NICategoryOneOf1

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ni_category** | **str** | | [optional]

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


2 changes: 1 addition & 1 deletion xero_python/payrolluk/docs/PayrollUkApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ api_instance = PayrollUkApi(api_client)

xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object
employment = { "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", "StartDate": "2020-04-01", "EmployeeNumber": "123ABC", "NICategory": "A" } # Employment |
employment = { "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", "StartDate": "2020-04-01", "NICategories": [ { "NICategory": "A", "StartDate": "2020-05-01" } ], "EmployeeNumber": "123ABC" } # Employment |
idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional)
try:
# Creates employment detail for a specific employee using a unique employee ID
Expand Down
4 changes: 4 additions & 0 deletions xero_python/payrolluk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
from xero_python.payrolluk.models.leave_type import LeaveType
from xero_python.payrolluk.models.leave_type_object import LeaveTypeObject
from xero_python.payrolluk.models.leave_types import LeaveTypes
from xero_python.payrolluk.models.ni_category import NICategory
from xero_python.payrolluk.models.ni_category_letter import NICategoryLetter
from xero_python.payrolluk.models.ni_category_one_of import NICategoryOneOf
from xero_python.payrolluk.models.ni_category_one_of1 import NICategoryOneOf1
from xero_python.payrolluk.models.pagination import Pagination
from xero_python.payrolluk.models.pay_run import PayRun
from xero_python.payrolluk.models.pay_run_calendar import PayRunCalendar
Expand Down
56 changes: 56 additions & 0 deletions xero_python/payrolluk/models/employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Employee(BaseModel):
"payroll_calendar_id": "str",
"updated_date_utc": "datetime",
"created_date_utc": "datetime",
"ni_category": "NICategoryLetter",
"ni_categories": "list[NICategory]",
"national_insurance_number": "str",
"is_off_payroll_worker": "bool",
}
Expand All @@ -63,6 +65,8 @@ class Employee(BaseModel):
"payroll_calendar_id": "payrollCalendarID",
"updated_date_utc": "updatedDateUTC",
"created_date_utc": "createdDateUTC",
"ni_category": "niCategory",
"ni_categories": "niCategories",
"national_insurance_number": "nationalInsuranceNumber",
"is_off_payroll_worker": "isOffPayrollWorker",
}
Expand All @@ -83,6 +87,8 @@ def __init__(
payroll_calendar_id=None,
updated_date_utc=None,
created_date_utc=None,
ni_category=None,
ni_categories=None,
national_insurance_number=None,
is_off_payroll_worker=None,
): # noqa: E501
Expand All @@ -102,6 +108,8 @@ def __init__(
self._payroll_calendar_id = None
self._updated_date_utc = None
self._created_date_utc = None
self._ni_category = None
self._ni_categories = None
self._national_insurance_number = None
self._is_off_payroll_worker = None
self.discriminator = None
Expand Down Expand Up @@ -134,6 +142,10 @@ def __init__(
self.updated_date_utc = updated_date_utc
if created_date_utc is not None:
self.created_date_utc = created_date_utc
if ni_category is not None:
self.ni_category = ni_category
if ni_categories is not None:
self.ni_categories = ni_categories
if national_insurance_number is not None:
self.national_insurance_number = national_insurance_number
if is_off_payroll_worker is not None:
Expand Down Expand Up @@ -468,6 +480,50 @@ def created_date_utc(self, created_date_utc):

self._created_date_utc = created_date_utc

@property
def ni_category(self):
"""Gets the ni_category of this Employee. # noqa: E501


:return: The ni_category of this Employee. # noqa: E501
:rtype: NICategoryLetter
"""
return self._ni_category

@ni_category.setter
def ni_category(self, ni_category):
"""Sets the ni_category of this Employee.


:param ni_category: The ni_category of this Employee. # noqa: E501
:type: NICategoryLetter
"""

self._ni_category = ni_category

@property
def ni_categories(self):
"""Gets the ni_categories of this Employee. # noqa: E501

The employee's NI categories # noqa: E501

:return: The ni_categories of this Employee. # noqa: E501
:rtype: list[NICategory]
"""
return self._ni_categories

@ni_categories.setter
def ni_categories(self, ni_categories):
"""Sets the ni_categories of this Employee.

The employee's NI categories # noqa: E501

:param ni_categories: The ni_categories of this Employee. # noqa: E501
:type: list[NICategory]
"""

self._ni_categories = ni_categories

@property
def national_insurance_number(self):
"""Gets the national_insurance_number of this Employee. # noqa: E501
Expand Down
Loading