Skip to content

Commit 76738df

Browse files
author
sangeet-joy_xero
committed
latest from codegen 2
1 parent e6b6f4f commit 76738df

File tree

4 files changed

+40
-11
lines changed

4 files changed

+40
-11
lines changed

docs/payroll_uk/Employment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**payroll_calendar_id** | **String** | Xero unique identifier for the payroll calendar of the employee | [optional]
8-
**start_date** | **Date** | Start date of the employment (YYYY-MM-DD) | [optional]
9-
**employee_number** | **String** | The employment number of the employee | [optional]
7+
**payroll_calendar_id** | **String** | Xero unique identifier for the payroll calendar of the employee |
8+
**start_date** | **Date** | Start date of the employment (YYYY-MM-DD) |
9+
**employee_number** | **String** | The employment number of the employee |
1010
**ni_category** | [**NICategoryLetter**](NICategoryLetter.md) | | [optional]
11-
**ni_categories** | [**Array<NICategory>**](NICategory.md) | The employee's NI categories | [optional]
11+
**ni_categories** | [**Array<NICategory>**](NICategory.md) | The employee's NI categories |
1212

1313
## Code Sample
1414

docs/payroll_uk/PayrollUkApi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ api_instance = xero_client.<api_set>
385385

386386

387387
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
388-
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 |
388+
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 |
389389
opts = {
390390
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
391391
}
@@ -950,7 +950,7 @@ api_instance = xero_client.<api_set>
950950

951951
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
952952
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
953-
employment = { "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe", "StartDate": "2020-04-01", "NICategories": [ { "NICategory": "A", "StartDate": "2020-05-01" } ], "EmployeeNumber": "123ABC" } # Employment |
953+
employment = {"payrollCalendarID":"cdfb8371-0b21-4b8a-8903-1024df6c391e","startDate":"2024-04-01","niCategories":[{"niCategory":"I","startDate":"2020-05-01","workplacePostcode":"SW1A 1AA"}],"employeeNumber":"123ABC"} # Employment |
954954
opts = {
955955
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
956956
}
@@ -4351,7 +4351,7 @@ api_instance = xero_client.<api_set>
43514351

43524352
xero_tenant_id = 'xero_tenant_id_example' # String | Xero identifier for Tenant
43534353
employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # String | Employee id for single object
4354-
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 |
4354+
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 |
43554355
opts = {
43564356
idempotency_key: 'KEY_VALUE' # String | This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
43574357
}

docs/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" : {
@@ -4557,7 +4557,7 @@ <h2>Parameters</h2>
45574557
"title" : "Mr",
45584558
"firstName" : "Mike",
45594559
"lastName" : "Fancy",
4560-
"dateOfBirth" : "1999-01-01T00:00:00",
4560+
"dateOfBirth" : "1999-01-01T00:00:00Z",
45614561
"gender" : "M",
45624562
"email" : "[email protected]",
45634563
"isOffPayrollWorker" : false,
@@ -6002,7 +6002,16 @@ <h2>Parameters</h2>
60026002
"schema" : {
60036003
"$ref" : "#/components/schemas/Employment"
60046004
},
6005-
"example" : "{ \"PayrollCalendarID\": \"216d80e6-af55-47b1-b718-9457c3f5d2fe\", \"StartDate\": \"2020-04-01\", \"NICategories\": [ { \"NICategory\": \"A\", \"StartDate\": \"2020-05-01\" } ], \"EmployeeNumber\": \"123ABC\" }"
6005+
"example" : {
6006+
"payrollCalendarID" : "cdfb8371-0b21-4b8a-8903-1024df6c391e",
6007+
"startDate" : "2024-04-01",
6008+
"niCategories" : [ {
6009+
"niCategory" : "I",
6010+
"startDate" : "2020-05-01",
6011+
"workplacePostcode" : "SW1A 1AA"
6012+
} ],
6013+
"employeeNumber" : "123ABC"
6014+
}
60066015
}
60076016
},
60086017
"required" : true
@@ -12722,7 +12731,7 @@ <h2>Parameters</h2>
1272212731
"title" : "Mr.",
1272312732
"firstName" : "TestDataUK",
1272412733
"lastName" : "Tester",
12725-
"dateOfBirth" : "1992-11-22T00:00:00",
12734+
"dateOfBirth" : "1992-11-22T00:00:00Z",
1272612735
"gender" : "M",
1272712736
"email" : "[email protected]",
1272812737
"phoneNumber" : "0400123456",

lib/xero-ruby/models/payroll_uk/employment.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,32 @@ def initialize(attributes = {})
9595
# @return Array for valid properties with the reasons
9696
def list_invalid_properties
9797
invalid_properties = Array.new
98+
if @payroll_calendar_id.nil?
99+
invalid_properties.push('invalid value for "payroll_calendar_id", payroll_calendar_id cannot be nil.')
100+
end
101+
102+
if @start_date.nil?
103+
invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
104+
end
105+
106+
if @employee_number.nil?
107+
invalid_properties.push('invalid value for "employee_number", employee_number cannot be nil.')
108+
end
109+
110+
if @ni_categories.nil?
111+
invalid_properties.push('invalid value for "ni_categories", ni_categories cannot be nil.')
112+
end
113+
98114
invalid_properties
99115
end
100116

101117
# Check to see if the all the properties in the model are valid
102118
# @return true if the model is valid
103119
def valid?
120+
return false if @payroll_calendar_id.nil?
121+
return false if @start_date.nil?
122+
return false if @employee_number.nil?
123+
return false if @ni_categories.nil?
104124
true
105125
end
106126

0 commit comments

Comments
 (0)