From 8f6930aeb6ecd405e49349cbb9d8d0a62131f2b2 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Tue, 1 Apr 2025 14:54:49 +0530 Subject: [PATCH 1/3] PETOSS-712 | Ni category updates from OpenAPI --- docs/v1/payroll-uk/index.html | 97 ++++++++- xero_python/payrolluk/__init__.py | 4 + xero_python/payrolluk/docs/Employee.md | 2 + xero_python/payrolluk/docs/Employment.md | 3 +- xero_python/payrolluk/docs/NICategory.md | 14 ++ .../payrolluk/docs/NICategoryLetter.md | 9 + xero_python/payrolluk/docs/NICategoryOneOf.md | 10 + .../payrolluk/docs/NICategoryOneOf1.md | 10 + xero_python/payrolluk/docs/PayrollUkApi.md | 2 +- xero_python/payrolluk/models/__init__.py | 4 + xero_python/payrolluk/models/employee.py | 56 +++++ xero_python/payrolluk/models/employment.py | 61 +++--- xero_python/payrolluk/models/ni_category.py | 193 ++++++++++++++++++ .../payrolluk/models/ni_category_letter.py | 43 ++++ .../payrolluk/models/ni_category_one_of.py | 73 +++++++ .../payrolluk/models/ni_category_one_of1.py | 73 +++++++ 16 files changed, 617 insertions(+), 37 deletions(-) create mode 100644 xero_python/payrolluk/docs/NICategory.md create mode 100644 xero_python/payrolluk/docs/NICategoryLetter.md create mode 100644 xero_python/payrolluk/docs/NICategoryOneOf.md create mode 100644 xero_python/payrolluk/docs/NICategoryOneOf1.md create mode 100644 xero_python/payrolluk/models/ni_category.py create mode 100644 xero_python/payrolluk/models/ni_category_letter.py create mode 100644 xero_python/payrolluk/models/ni_category_one_of.py create mode 100644 xero_python/payrolluk/models/ni_category_one_of1.py diff --git a/docs/v1/payroll-uk/index.html b/docs/v1/payroll-uk/index.html index 7a6c91d4..e2177936 100644 --- a/docs/v1/payroll-uk/index.html +++ b/docs/v1/payroll-uk/index.html @@ -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", @@ -2262,7 +2272,7 @@ }; defs["Employment"] = { "title" : "", - "required" : [ "EmployeeNumber", "NICategory", "PayrollCalendarID", "StartDate" ], + "required" : [ "EmployeeNumber", "NICategories", "PayrollCalendarID", "StartDate" ], "type" : "object", "properties" : { "payrollCalendarID" : { @@ -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" : "" @@ -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" : "", @@ -5846,6 +5929,8 @@

Usage and SDK Samples

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) @@ -5976,7 +6061,7 @@

Parameters

"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 diff --git a/xero_python/payrolluk/__init__.py b/xero_python/payrolluk/__init__.py index 05497b10..2a170048 100644 --- a/xero_python/payrolluk/__init__.py +++ b/xero_python/payrolluk/__init__.py @@ -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 diff --git a/xero_python/payrolluk/docs/Employee.md b/xero_python/payrolluk/docs/Employee.md index 1e709554..ccbab019 100644 --- a/xero_python/payrolluk/docs/Employee.md +++ b/xero_python/payrolluk/docs/Employee.md @@ -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'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] diff --git a/xero_python/payrolluk/docs/Employment.md b/xero_python/payrolluk/docs/Employment.md index 596e2c8b..3a364df2 100644 --- a/xero_python/payrolluk/docs/Employment.md +++ b/xero_python/payrolluk/docs/Employment.md @@ -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'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) diff --git a/xero_python/payrolluk/docs/NICategory.md b/xero_python/payrolluk/docs/NICategory.md new file mode 100644 index 00000000..a6e44ac7 --- /dev/null +++ b/xero_python/payrolluk/docs/NICategory.md @@ -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) + + diff --git a/xero_python/payrolluk/docs/NICategoryLetter.md b/xero_python/payrolluk/docs/NICategoryLetter.md new file mode 100644 index 00000000..971bdc23 --- /dev/null +++ b/xero_python/payrolluk/docs/NICategoryLetter.md @@ -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) + + diff --git a/xero_python/payrolluk/docs/NICategoryOneOf.md b/xero_python/payrolluk/docs/NICategoryOneOf.md new file mode 100644 index 00000000..3157451c --- /dev/null +++ b/xero_python/payrolluk/docs/NICategoryOneOf.md @@ -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) + + diff --git a/xero_python/payrolluk/docs/NICategoryOneOf1.md b/xero_python/payrolluk/docs/NICategoryOneOf1.md new file mode 100644 index 00000000..1a2cc3a4 --- /dev/null +++ b/xero_python/payrolluk/docs/NICategoryOneOf1.md @@ -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) + + diff --git a/xero_python/payrolluk/docs/PayrollUkApi.md b/xero_python/payrolluk/docs/PayrollUkApi.md index e2c0621b..9f8e4fce 100644 --- a/xero_python/payrolluk/docs/PayrollUkApi.md +++ b/xero_python/payrolluk/docs/PayrollUkApi.md @@ -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 diff --git a/xero_python/payrolluk/models/__init__.py b/xero_python/payrolluk/models/__init__.py index ad69d57c..f2954781 100644 --- a/xero_python/payrolluk/models/__init__.py +++ b/xero_python/payrolluk/models/__init__.py @@ -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 diff --git a/xero_python/payrolluk/models/employee.py b/xero_python/payrolluk/models/employee.py index 6cfe8136..cd5fa99f 100644 --- a/xero_python/payrolluk/models/employee.py +++ b/xero_python/payrolluk/models/employee.py @@ -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", } @@ -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", } @@ -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 @@ -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 @@ -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: @@ -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 diff --git a/xero_python/payrolluk/models/employment.py b/xero_python/payrolluk/models/employment.py index 4649bc3e..55318420 100644 --- a/xero_python/payrolluk/models/employment.py +++ b/xero_python/payrolluk/models/employment.py @@ -33,7 +33,8 @@ class Employment(BaseModel): "payroll_calendar_id": "str", "start_date": "date", "employee_number": "str", - "ni_category": "str", + "ni_category": "NICategoryLetter", + "ni_categories": "list[NICategory]", } attribute_map = { @@ -41,6 +42,7 @@ class Employment(BaseModel): "start_date": "startDate", "employee_number": "employeeNumber", "ni_category": "niCategory", + "ni_categories": "niCategories", } def __init__( @@ -49,6 +51,7 @@ def __init__( start_date=None, employee_number=None, ni_category=None, + ni_categories=None, ): # noqa: E501 """Employment - a model defined in OpenAPI""" # noqa: E501 @@ -56,6 +59,7 @@ def __init__( self._start_date = None self._employee_number = None self._ni_category = None + self._ni_categories = None self.discriminator = None if payroll_calendar_id is not None: @@ -66,6 +70,8 @@ def __init__( self.employee_number = employee_number if ni_category is not None: self.ni_category = ni_category + if ni_categories is not None: + self.ni_categories = ni_categories @property def payroll_calendar_id(self): @@ -140,10 +146,9 @@ def employee_number(self, employee_number): def ni_category(self): """Gets the ni_category of this Employment. # noqa: E501 - The NI Category of the employee # noqa: E501 :return: The ni_category of this Employment. # noqa: E501 - :rtype: str + :rtype: NICategoryLetter """ return self._ni_category @@ -151,34 +156,32 @@ def ni_category(self): def ni_category(self, ni_category): """Sets the ni_category of this Employment. - The NI Category of the employee # noqa: E501 :param ni_category: The ni_category of this Employment. # noqa: E501 - :type: str + :type: NICategoryLetter """ - allowed_values = [ - "A", - "B", - "C", - "F", - "H", - "I", - "J", - "L", - "M", - "S", - "V", - "X", - "Z", - "None", - ] # noqa: E501 - - if ni_category: - if ni_category not in allowed_values: - raise ValueError( - "Invalid value for `ni_category` ({0}), must be one of {1}".format( # noqa: E501 - ni_category, allowed_values - ) - ) self._ni_category = ni_category + + @property + def ni_categories(self): + """Gets the ni_categories of this Employment. # noqa: E501 + + The employee's NI categories # noqa: E501 + + :return: The ni_categories of this Employment. # noqa: E501 + :rtype: list[NICategory] + """ + return self._ni_categories + + @ni_categories.setter + def ni_categories(self, ni_categories): + """Sets the ni_categories of this Employment. + + The employee's NI categories # noqa: E501 + + :param ni_categories: The ni_categories of this Employment. # noqa: E501 + :type: list[NICategory] + """ + + self._ni_categories = ni_categories diff --git a/xero_python/payrolluk/models/ni_category.py b/xero_python/payrolluk/models/ni_category.py new file mode 100644 index 00000000..3d35a7d8 --- /dev/null +++ b/xero_python/payrolluk/models/ni_category.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Xero Payroll UK + + This is the Xero Payroll API for orgs in the UK region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class NICategory(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "start_date": "date", + "ni_category": "NICategoryLetter", + "ni_category_id": "float", + "date_first_employed_as_civilian": "date", + "workplace_postcode": "str", + } + + attribute_map = { + "start_date": "startDate", + "ni_category": "niCategory", + "ni_category_id": "niCategoryID", + "date_first_employed_as_civilian": "dateFirstEmployedAsCivilian", + "workplace_postcode": "workplacePostcode", + } + + def __init__( + self, + start_date=None, + ni_category=None, + ni_category_id=None, + date_first_employed_as_civilian=None, + workplace_postcode=None, + ): # noqa: E501 + """NICategory - a model defined in OpenAPI""" # noqa: E501 + + self._start_date = None + self._ni_category = None + self._ni_category_id = None + self._date_first_employed_as_civilian = None + self._workplace_postcode = None + self.discriminator = None + + if start_date is not None: + self.start_date = start_date + self.ni_category = ni_category + if ni_category_id is not None: + self.ni_category_id = ni_category_id + if date_first_employed_as_civilian is not None: + self.date_first_employed_as_civilian = date_first_employed_as_civilian + self.workplace_postcode = workplace_postcode + + @property + def start_date(self): + """Gets the start_date of this NICategory. # noqa: E501 + + The start date of the NI category (YYYY-MM-DD) # noqa: E501 + + :return: The start_date of this NICategory. # noqa: E501 + :rtype: date + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this NICategory. + + The start date of the NI category (YYYY-MM-DD) # noqa: E501 + + :param start_date: The start_date of this NICategory. # noqa: E501 + :type: date + """ + + self._start_date = start_date + + @property + def ni_category(self): + """Gets the ni_category of this NICategory. # noqa: E501 + + + :return: The ni_category of this NICategory. # noqa: E501 + :rtype: NICategoryLetter + """ + return self._ni_category + + @ni_category.setter + def ni_category(self, ni_category): + """Sets the ni_category of this NICategory. + + + :param ni_category: The ni_category of this NICategory. # noqa: E501 + :type: NICategoryLetter + """ + if ni_category is None: + raise ValueError( + "Invalid value for `ni_category`, must not be `None`" + ) # noqa: E501 + + self._ni_category = ni_category + + @property + def ni_category_id(self): + """Gets the ni_category_id of this NICategory. # noqa: E501 + + Xero unique identifier for the NI category # noqa: E501 + + :return: The ni_category_id of this NICategory. # noqa: E501 + :rtype: float + """ + return self._ni_category_id + + @ni_category_id.setter + def ni_category_id(self, ni_category_id): + """Sets the ni_category_id of this NICategory. + + Xero unique identifier for the NI category # noqa: E501 + + :param ni_category_id: The ni_category_id of this NICategory. # noqa: E501 + :type: float + """ + + self._ni_category_id = ni_category_id + + @property + def date_first_employed_as_civilian(self): + """Gets the date_first_employed_as_civilian of this NICategory. # noqa: E501 + + The date in which the employee was first employed as a civilian (YYYY-MM-DD) # noqa: E501 + + :return: The date_first_employed_as_civilian of this NICategory. # noqa: E501 + :rtype: date + """ + return self._date_first_employed_as_civilian + + @date_first_employed_as_civilian.setter + def date_first_employed_as_civilian(self, date_first_employed_as_civilian): + """Sets the date_first_employed_as_civilian of this NICategory. + + The date in which the employee was first employed as a civilian (YYYY-MM-DD) # noqa: E501 + + :param date_first_employed_as_civilian: The date_first_employed_as_civilian of this NICategory. # noqa: E501 + :type: date + """ + + self._date_first_employed_as_civilian = date_first_employed_as_civilian + + @property + def workplace_postcode(self): + """Gets the workplace_postcode of this NICategory. # noqa: E501 + + The workplace postcode # noqa: E501 + + :return: The workplace_postcode of this NICategory. # noqa: E501 + :rtype: str + """ + return self._workplace_postcode + + @workplace_postcode.setter + def workplace_postcode(self, workplace_postcode): + """Sets the workplace_postcode of this NICategory. + + The workplace postcode # noqa: E501 + + :param workplace_postcode: The workplace_postcode of this NICategory. # noqa: E501 + :type: str + """ + if workplace_postcode is None: + raise ValueError( + "Invalid value for `workplace_postcode`, must not be `None`" + ) # noqa: E501 + + self._workplace_postcode = workplace_postcode diff --git a/xero_python/payrolluk/models/ni_category_letter.py b/xero_python/payrolluk/models/ni_category_letter.py new file mode 100644 index 00000000..ad3c1ee7 --- /dev/null +++ b/xero_python/payrolluk/models/ni_category_letter.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Xero Payroll UK + + This is the Xero Payroll API for orgs in the UK region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from enum import Enum + + +class NICategoryLetter(Enum): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + allowed enum values + """ + + A = "A" + B = "B" + C = "C" + D = "D" + E = "E" + F = "F" + H = "H" + I = "I" + J = "J" + K = "K" + L = "L" + M = "M" + N = "N" + S = "S" + V = "V" + X = "X" + Z = "Z" diff --git a/xero_python/payrolluk/models/ni_category_one_of.py b/xero_python/payrolluk/models/ni_category_one_of.py new file mode 100644 index 00000000..e30cb161 --- /dev/null +++ b/xero_python/payrolluk/models/ni_category_one_of.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Xero Payroll UK + + This is the Xero Payroll API for orgs in the UK region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class NICategoryOneOf(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"ni_category": "str"} + + attribute_map = {"ni_category": "niCategory"} + + def __init__(self, ni_category=None): # noqa: E501 + """NICategoryOneOf - a model defined in OpenAPI""" # noqa: E501 + + self._ni_category = None + self.discriminator = None + + if ni_category is not None: + self.ni_category = ni_category + + @property + def ni_category(self): + """Gets the ni_category of this NICategoryOneOf. # noqa: E501 + + + :return: The ni_category of this NICategoryOneOf. # noqa: E501 + :rtype: str + """ + return self._ni_category + + @ni_category.setter + def ni_category(self, ni_category): + """Sets the ni_category of this NICategoryOneOf. + + + :param ni_category: The ni_category of this NICategoryOneOf. # noqa: E501 + :type: str + """ + allowed_values = ["F", "I", "L", "S", "N", "E", "D", "K", "None"] # noqa: E501 + + if ni_category: + if ni_category not in allowed_values: + raise ValueError( + "Invalid value for `ni_category` ({0}), must be one of {1}".format( # noqa: E501 + ni_category, allowed_values + ) + ) + + self._ni_category = ni_category diff --git a/xero_python/payrolluk/models/ni_category_one_of1.py b/xero_python/payrolluk/models/ni_category_one_of1.py new file mode 100644 index 00000000..1112b756 --- /dev/null +++ b/xero_python/payrolluk/models/ni_category_one_of1.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Xero Payroll UK + + This is the Xero Payroll API for orgs in the UK region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class NICategoryOneOf1(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"ni_category": "str"} + + attribute_map = {"ni_category": "niCategory"} + + def __init__(self, ni_category=None): # noqa: E501 + """NICategoryOneOf1 - a model defined in OpenAPI""" # noqa: E501 + + self._ni_category = None + self.discriminator = None + + if ni_category is not None: + self.ni_category = ni_category + + @property + def ni_category(self): + """Gets the ni_category of this NICategoryOneOf1. # noqa: E501 + + + :return: The ni_category of this NICategoryOneOf1. # noqa: E501 + :rtype: str + """ + return self._ni_category + + @ni_category.setter + def ni_category(self, ni_category): + """Sets the ni_category of this NICategoryOneOf1. + + + :param ni_category: The ni_category of this NICategoryOneOf1. # noqa: E501 + :type: str + """ + allowed_values = ["V", "None"] # noqa: E501 + + if ni_category: + if ni_category not in allowed_values: + raise ValueError( + "Invalid value for `ni_category` ({0}), must be one of {1}".format( # noqa: E501 + ni_category, allowed_values + ) + ) + + self._ni_category = ni_category From 01e9e14e27032c8e1c3b0026ba3dc4413d98537d Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Wed, 9 Apr 2025 16:44:53 +0530 Subject: [PATCH 2/3] version update OAS 8.0.0 --- docs/v1/accounting/index.html | 2 +- docs/v1/appstore/index.html | 2 +- docs/v1/assets/index.html | 2 +- docs/v1/files/index.html | 2 +- docs/v1/finance/index.html | 2 +- docs/v1/payroll-au/index.html | 2 +- docs/v1/payroll-nz/index.html | 2 +- docs/v1/payroll-uk/index.html | 2 +- docs/v1/projects/index.html | 2 +- setup.py | 2 +- xero_python/__init__.py | 2 +- xero_python/accounting/api/accounting_api.py | 2 +- xero_python/appstore/api/app_store_api.py | 2 +- xero_python/assets/api/asset_api.py | 2 +- xero_python/docs/README.md | 4 ++-- xero_python/file/api/files_api.py | 2 +- xero_python/finance/api/finance_api.py | 2 +- xero_python/identity/api/identity_api.py | 2 +- xero_python/payrollau/api/payroll_au_api.py | 2 +- xero_python/payrollnz/api/payroll_nz_api.py | 2 +- xero_python/payrolluk/api/payroll_uk_api.py | 2 +- xero_python/project/api/project_api.py | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index 8ae7c317..2c6ddb94 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -6339,7 +6339,7 @@