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/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 @@ -5715,6 +5798,8 @@ <h3>Usage and SDK Samples</h3>
startDate: startDate
};

const niCategories: NICategories = {

try {
const response = await xero.accountingApi.createEmployment(xeroTenantId, employeeID, employment, idempotencyKey);
console.log(response.body || response.response.statusCode)
Expand Down Expand Up @@ -5846,7 +5931,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
17 changes: 17 additions & 0 deletions src/gen/model/payroll-uk/employee.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Address } from '././address';
import { NICategory } from '././nICategory';
import { NICategoryLetter } from '././nICategoryLetter';

export class Employee {
/**
Expand Down Expand Up @@ -54,6 +56,11 @@ export class Employee {
* UTC timestamp when the employee was created in Xero
*/
'createdDateUTC'?: Date;
'niCategory'?: NICategoryLetter;
/**
* The employee\'s NI categories
*/
'niCategories'?: Array<NICategory>;
/**
* National insurance number of the employee
*/
Expand Down Expand Up @@ -136,6 +143,16 @@ export class Employee {
"baseName": "createdDateUTC",
"type": "Date"
},
{
"name": "niCategory",
"baseName": "niCategory",
"type": "NICategoryLetter"
},
{
"name": "niCategories",
"baseName": "niCategories",
"type": "Array<NICategory>"
},
{
"name": "nationalInsuranceNumber",
"baseName": "nationalInsuranceNumber",
Expand Down
31 changes: 11 additions & 20 deletions src/gen/model/payroll-uk/employment.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { NICategory } from '././nICategory';
import { NICategoryLetter } from '././nICategoryLetter';

export class Employment {
/**
Expand All @@ -12,10 +14,11 @@ export class Employment {
* The employment number of the employee
*/
'employeeNumber'?: string;
'niCategory'?: NICategoryLetter;
/**
* The NI Category of the employee
* The employee\'s NI categories
*/
'niCategory'?: Employment.NiCategoryEnum;
'niCategories'?: Array<NICategory>;

static discriminator: string | undefined = undefined;

Expand All @@ -38,28 +41,16 @@ export class Employment {
{
"name": "niCategory",
"baseName": "niCategory",
"type": "Employment.NiCategoryEnum"
"type": "NICategoryLetter"
},
{
"name": "niCategories",
"baseName": "niCategories",
"type": "Array<NICategory>"
} ];

static getAttributeTypeMap() {
return Employment.attributeTypeMap;
}
}

export namespace Employment {
export enum NiCategoryEnum {
A = <any> 'A',
B = <any> 'B',
C = <any> 'C',
F = <any> 'F',
H = <any> 'H',
I = <any> 'I',
J = <any> 'J',
L = <any> 'L',
M = <any> 'M',
S = <any> 'S',
V = <any> 'V',
X = <any> 'X',
Z = <any> 'Z'
}
}
15 changes: 14 additions & 1 deletion src/gen/model/payroll-uk/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export * from '././leavePeriods';
export * from '././leaveType';
export * from '././leaveTypeObject';
export * from '././leaveTypes';
export * from '././nICategory';
export * from '././nICategoryLetter';
export * from '././nICategoryOneOf';
export * from '././nICategoryOneOf1';
export * from '././pagination';
export * from '././payRun';
export * from '././payRunCalendar';
Expand Down Expand Up @@ -146,6 +150,10 @@ import { LeavePeriods } from '././leavePeriods';
import { LeaveType } from '././leaveType';
import { LeaveTypeObject } from '././leaveTypeObject';
import { LeaveTypes } from '././leaveTypes';
import { NICategory } from '././nICategory';
import { NICategoryLetter } from '././nICategoryLetter';
import { NICategoryOneOf } from '././nICategoryOneOf';
import { NICategoryOneOf1 } from '././nICategoryOneOf1';
import { Pagination } from '././pagination';
import { PayRun } from '././payRun';
import { PayRunCalendar } from '././payRunCalendar';
Expand Down Expand Up @@ -207,8 +215,10 @@ let enumsMap: {[index: string]: any} = {
"EmployeeStatutoryLeaveSummary.TypeEnum": EmployeeStatutoryLeaveSummary.TypeEnum,
"EmployeeStatutoryLeaveSummary.StatusEnum": EmployeeStatutoryLeaveSummary.StatusEnum,
"EmployeeStatutorySickLeave.EntitlementFailureReasonsEnum": EmployeeStatutorySickLeave.EntitlementFailureReasonsEnum,
"Employment.NiCategoryEnum": Employment.NiCategoryEnum,
"LeavePeriod.PeriodStatusEnum": LeavePeriod.PeriodStatusEnum,
"NICategoryLetter": NICategoryLetter,
"NICategoryOneOf.NiCategoryEnum": NICategoryOneOf.NiCategoryEnum,
"NICategoryOneOf1.NiCategoryEnum": NICategoryOneOf1.NiCategoryEnum,
"PayRun.PayRunStatusEnum": PayRun.PayRunStatusEnum,
"PayRun.PayRunTypeEnum": PayRun.PayRunTypeEnum,
"PayRun.CalendarTypeEnum": PayRun.CalendarTypeEnum,
Expand Down Expand Up @@ -279,6 +289,9 @@ let typeMap: {[index: string]: any} = {
"LeaveType": LeaveType,
"LeaveTypeObject": LeaveTypeObject,
"LeaveTypes": LeaveTypes,
"NICategory": NICategory,
"NICategoryOneOf": NICategoryOneOf,
"NICategoryOneOf1": NICategoryOneOf1,
"Pagination": Pagination,
"PayRun": PayRun,
"PayRunCalendar": PayRunCalendar,
Expand Down
59 changes: 59 additions & 0 deletions src/gen/model/payroll-uk/nICategory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { NICategoryLetter } from '././nICategoryLetter';
import { NICategoryOneOf } from '././nICategoryOneOf';
import { NICategoryOneOf1 } from '././nICategoryOneOf1';

export class NICategory {
/**
* The start date of the NI category (YYYY-MM-DD)
*/
'startDate'?: string;
'niCategory': NICategoryLetter;
/**
* Xero unique identifier for the NI category
*/
'niCategoryID'?: number;
/**
* The date in which the employee was first employed as a civilian (YYYY-MM-DD)
*/
'dateFirstEmployedAsCivilian'?: string;
/**
* The workplace postcode
*/
'workplacePostcode': string;

static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "startDate",
"baseName": "startDate",
"type": "string"
},
{
"name": "niCategory",
"baseName": "niCategory",
"type": "NICategoryLetter"
},
{
"name": "niCategoryID",
"baseName": "niCategoryID",
"type": "number"
},
{
"name": "dateFirstEmployedAsCivilian",
"baseName": "dateFirstEmployedAsCivilian",
"type": "string"
},
{
"name": "workplacePostcode",
"baseName": "workplacePostcode",
"type": "string"
} ];

static getAttributeTypeMap() {
return NICategory.attributeTypeMap;
}
}

export namespace NICategory {
}
23 changes: 23 additions & 0 deletions src/gen/model/payroll-uk/nICategoryLetter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/**
* The employee\'s NI Category letter.
*/
export enum NICategoryLetter {
A = <any> 'A',
B = <any> 'B',
C = <any> 'C',
D = <any> 'D',
E = <any> 'E',
F = <any> 'F',
H = <any> 'H',
I = <any> 'I',
J = <any> 'J',
K = <any> 'K',
L = <any> 'L',
M = <any> 'M',
N = <any> 'N',
S = <any> 'S',
V = <any> 'V',
X = <any> 'X',
Z = <any> 'Z'
}
30 changes: 30 additions & 0 deletions src/gen/model/payroll-uk/nICategoryOneOf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

export class NICategoryOneOf {
'niCategory'?: NICategoryOneOf.NiCategoryEnum;

static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "niCategory",
"baseName": "niCategory",
"type": "NICategoryOneOf.NiCategoryEnum"
} ];

static getAttributeTypeMap() {
return NICategoryOneOf.attributeTypeMap;
}
}

export namespace NICategoryOneOf {
export enum NiCategoryEnum {
F = <any> 'F',
I = <any> 'I',
L = <any> 'L',
S = <any> 'S',
N = <any> 'N',
E = <any> 'E',
D = <any> 'D',
K = <any> 'K'
}
}
Loading