From 28fecb0a11486f0547b5504e0667593fd319d7c3 Mon Sep 17 00:00:00 2001 From: Riley James Date: Wed, 1 Sep 2021 15:13:28 +1200 Subject: [PATCH 1/2] Breaking change: removes pluralisation of getEmployeePayTemplates (to getEmployeePayTemplate) in NZ Payroll API. Aligns the convention between UK & NZ Payroll, and the naming convention for other methods (endpoints are pluralised, methods are singular) Issue: https://github.com/XeroAPI/xero-ruby/issues/173 --- xero-payroll-nz.yaml | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/xero-payroll-nz.yaml b/xero-payroll-nz.yaml index 6c6486876..ea71b8d09 100644 --- a/xero-payroll-nz.yaml +++ b/xero-payroll-nz.yaml @@ -1941,6 +1941,62 @@ paths: application/json: schema: $ref: '#/components/schemas/Problem' + get: + security: + - OAuth2: [payroll.employees, payroll.employees.read] + tags: + - PayrollNz + operationId: getEmployeePayTemplate + x-hasPayrollUkProblem: true + summary: Retrieves pay templates for a specific employee + parameters: + - name: EmployeeID + in: path + required: true + description: Employee id for single object + schema: + type: string + format: uuid + example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c + responses: + '200': + description: search results matching criteria + content: + application/json: + schema: + $ref: '#/components/schemas/EmployeePayTemplates' + example: '{ + "id": "00000000-0000-0000-0000-000000000000", + "providerName": "provider-name", + "dateTimeUTC": "2020-08-27T15:09:19.0627389", + "httpStatusCode": "OK", + "pagination": { + "page": 1, + "pageSize": 100, + "pageCount": 0, + "itemCount": 0 + }, + "problem": null, + "payTemplate": { + "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", + "earningTemplates": [ + { + "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", + "ratePerUnit": 20, + "numberOfUnits": 8, + "fixedAmount": null, + "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", + "name": "Ordinary Time" + } + ] + } + }' + '400': + description: validation error for a bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Problem' /Employees/{EmployeeID}/PayTemplates/earnings: parameters: - $ref: '#/components/parameters/requiredHeader' From c5e8c7146ee4a7716b781cd1be3bbff6beb5f46b Mon Sep 17 00:00:00 2001 From: Riley James Date: Wed, 1 Sep 2021 15:20:28 +1200 Subject: [PATCH 2/2] --amend --- xero-payroll-nz.yaml | 56 -------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/xero-payroll-nz.yaml b/xero-payroll-nz.yaml index ea71b8d09..79aec1508 100644 --- a/xero-payroll-nz.yaml +++ b/xero-payroll-nz.yaml @@ -1885,62 +1885,6 @@ paths: /Employees/{EmployeeID}/PayTemplates: parameters: - $ref: '#/components/parameters/requiredHeader' - get: - security: - - OAuth2: [payroll.employees, payroll.employees.read] - tags: - - PayrollNz - operationId: getEmployeePayTemplates - x-hasPayrollUkProblem: true - summary: Retrieves pay templates for a specific employee - parameters: - - name: EmployeeID - in: path - required: true - description: Employee id for single object - schema: - type: string - format: uuid - example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c - responses: - '200': - description: search results matching criteria - content: - application/json: - schema: - $ref: '#/components/schemas/EmployeePayTemplates' - example: '{ - "id": "00000000-0000-0000-0000-000000000000", - "providerName": "provider-name", - "dateTimeUTC": "2020-08-27T15:09:19.0627389", - "httpStatusCode": "OK", - "pagination": { - "page": 1, - "pageSize": 100, - "pageCount": 0, - "itemCount": 0 - }, - "problem": null, - "payTemplate": { - "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", - "earningTemplates": [ - { - "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499", - "ratePerUnit": 20, - "numberOfUnits": 8, - "fixedAmount": null, - "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", - "name": "Ordinary Time" - } - ] - } - }' - '400': - description: validation error for a bad request - content: - application/json: - schema: - $ref: '#/components/schemas/Problem' get: security: - OAuth2: [payroll.employees, payroll.employees.read]