Skip to content

Commit 3d018e8

Browse files
authored
Merge pull request #269 from XeroAPI/sid-development
Correct UK Payroll unit test
2 parents 5adec47 + 9481e93 commit 3d018e8

File tree

14 files changed

+144
-101
lines changed

14 files changed

+144
-101
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>xero-java</artifactId>
66
<packaging>jar</packaging>
77
<name>xero-java</name>
8-
<version>4.8.0</version>
8+
<version>4.8.1</version>
99
<url>https://github.com/XeroAPI/Xero-Java</url>
1010
<description>This is the official Java SDK for Xero API</description>
1111
<licenses>

src/main/java/com/xero/api/client/AccountingApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Accounting API
33
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -98,7 +98,7 @@ public class AccountingApi {
9898
private ApiClient apiClient;
9999
private static AccountingApi instance = null;
100100
private String userAgent = "Default";
101-
private String version = "4.8.0";
101+
private String version = "4.8.1";
102102
static final Logger logger = LoggerFactory.getLogger(AccountingApi.class);
103103

104104
/** AccountingApi */

src/main/java/com/xero/api/client/AssetApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Assets API
33
* The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -48,7 +48,7 @@ public class AssetApi {
4848
private ApiClient apiClient;
4949
private static AssetApi instance = null;
5050
private String userAgent = "Default";
51-
private String version = "4.8.0";
51+
private String version = "4.8.1";
5252
static final Logger logger = LoggerFactory.getLogger(AssetApi.class);
5353

5454
/** AssetApi */

src/main/java/com/xero/api/client/BankFeedsApi.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Bank Feeds API
33
* The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you're an existing financial services partner that wants access, contact your local Partner Manager. If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,7 +46,7 @@ public class BankFeedsApi {
4646
private ApiClient apiClient;
4747
private static BankFeedsApi instance = null;
4848
private String userAgent = "Default";
49-
private String version = "4.8.0";
49+
private String version = "4.8.1";
5050
static final Logger logger = LoggerFactory.getLogger(BankFeedsApi.class);
5151

5252
/** BankFeedsApi */
@@ -116,7 +116,7 @@ public String getUserAgent() {
116116
* Create one or more new feed connection By passing in the FeedConnections array object in the
117117
* body, you can create one or more new feed connections
118118
*
119-
* <p><b>201</b> - success new feed connection(s)response
119+
* <p><b>202</b> - success new feed connection(s)response
120120
*
121121
* <p><b>400</b> - invalid input, object invalid
122122
*
@@ -162,7 +162,7 @@ public FeedConnections createFeedConnections(
162162
* Create one or more new feed connection By passing in the FeedConnections array object in the
163163
* body, you can create one or more new feed connections
164164
*
165-
* <p><b>201</b> - success new feed connection(s)response
165+
* <p><b>202</b> - success new feed connection(s)response
166166
*
167167
* <p><b>400</b> - invalid input, object invalid
168168
*
@@ -518,7 +518,7 @@ public HttpResponse getFeedConnectionForHttpResponse(
518518
* Searches for feed connections By passing in the appropriate options, you can search for
519519
* available feed connections in the system.
520520
*
521-
* <p><b>201</b> - search results matching criteria returned with pagination and items array
521+
* <p><b>202</b> - search results matching criteria returned with pagination and items array
522522
*
523523
* <p><b>400</b> - validation error response
524524
*
@@ -562,7 +562,7 @@ public FeedConnections getFeedConnections(
562562
* Searches for feed connections By passing in the appropriate options, you can search for
563563
* available feed connections in the system.
564564
*
565-
* <p><b>201</b> - search results matching criteria returned with pagination and items array
565+
* <p><b>202</b> - search results matching criteria returned with pagination and items array
566566
*
567567
* <p><b>400</b> - validation error response
568568
*
@@ -710,7 +710,7 @@ public HttpResponse getStatementForHttpResponse(
710710
uriVariables.put("statementId", statementId);
711711

712712
UriBuilder uriBuilder =
713-
UriBuilder.fromUri(apiClient.getBasePath() + "/Statements/{statementID}");
713+
UriBuilder.fromUri(apiClient.getBasePath() + "/Statements/{statementId}");
714714
String url = uriBuilder.buildFromMap(uriVariables).toString();
715715
GenericUrl genericUrl = new GenericUrl(url);
716716
if (logger.isDebugEnabled()) {

src/main/java/com/xero/api/client/FilesApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Files API
33
* These endpoints are specific to Xero Files API
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -53,7 +53,7 @@ public class FilesApi {
5353
private ApiClient apiClient;
5454
private static FilesApi instance = null;
5555
private String userAgent = "Default";
56-
private String version = "4.8.0";
56+
private String version = "4.8.1";
5757
static final Logger logger = LoggerFactory.getLogger(FilesApi.class);
5858

5959
/** FilesApi */

src/main/java/com/xero/api/client/IdentityApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero OAuth 2 Identity Service API
33
* These endpoints are related to managing authentication tokens and identity for Xero API
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -44,7 +44,7 @@ public class IdentityApi {
4444
private ApiClient apiClient;
4545
private static IdentityApi instance = null;
4646
private String userAgent = "Default";
47-
private String version = "4.8.0";
47+
private String version = "4.8.1";
4848
static final Logger logger = LoggerFactory.getLogger(IdentityApi.class);
4949

5050
/** IdentityApi */

src/main/java/com/xero/api/client/PayrollAuApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Payroll AU API
33
* This is the Xero Payroll API for orgs in Australia region.
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -63,7 +63,7 @@ public class PayrollAuApi {
6363
private ApiClient apiClient;
6464
private static PayrollAuApi instance = null;
6565
private String userAgent = "Default";
66-
private String version = "4.8.0";
66+
private String version = "4.8.1";
6767
static final Logger logger = LoggerFactory.getLogger(PayrollAuApi.class);
6868

6969
/** PayrollAuApi */

src/main/java/com/xero/api/client/PayrollNzApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Payroll NZ
33
* This is the Xero Payroll API for orgs in the NZ region.
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -105,7 +105,7 @@ public class PayrollNzApi {
105105
private ApiClient apiClient;
106106
private static PayrollNzApi instance = null;
107107
private String userAgent = "Default";
108-
private String version = "4.8.0";
108+
private String version = "4.8.1";
109109
static final Logger logger = LoggerFactory.getLogger(PayrollNzApi.class);
110110

111111
/** PayrollNzApi */

src/main/java/com/xero/api/client/PayrollUkApi.java

Lines changed: 18 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Payroll UK
33
* This is the Xero Payroll API for orgs in the UK region.
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -105,7 +105,7 @@ public class PayrollUkApi {
105105
private ApiClient apiClient;
106106
private static PayrollUkApi instance = null;
107107
private String userAgent = "Default";
108-
private String version = "4.8.0";
108+
private String version = "4.8.1";
109109
static final Logger logger = LoggerFactory.getLogger(PayrollUkApi.class);
110110

111111
/** PayrollUkApi */
@@ -4957,21 +4957,18 @@ public HttpResponse getEmployeeTaxForHttpResponse(
49574957
* <p><b>400</b> - validation error for a bad request
49584958
*
49594959
* @param xeroTenantId Xero identifier for Tenant
4960-
* @param firstName Filter by first name
4961-
* @param lastName Filter by last name
4960+
* @param filter Filter by first name and/or lastname
49624961
* @param page Page number which specifies the set of records to retrieve. By default the number
49634962
* of the records per set is 100.
49644963
* @param accessToken Authorization token for user set in header of each request
49654964
* @return Employees
49664965
* @throws IOException if an error occurs while attempting to invoke the API *
49674966
*/
49684967
public Employees getEmployees(
4969-
String accessToken, String xeroTenantId, String firstName, String lastName, Integer page)
4970-
throws IOException {
4968+
String accessToken, String xeroTenantId, String filter, Integer page) throws IOException {
49714969
try {
49724970
TypeReference<Employees> typeRef = new TypeReference<Employees>() {};
4973-
HttpResponse response =
4974-
getEmployeesForHttpResponse(accessToken, xeroTenantId, firstName, lastName, page);
4971+
HttpResponse response = getEmployeesForHttpResponse(accessToken, xeroTenantId, filter, page);
49754972
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
49764973
} catch (HttpResponseException e) {
49774974
if (logger.isDebugEnabled()) {
@@ -5003,17 +5000,15 @@ public Employees getEmployees(
50035000
* <p><b>400</b> - validation error for a bad request
50045001
*
50055002
* @param xeroTenantId Xero identifier for Tenant
5006-
* @param firstName Filter by first name
5007-
* @param lastName Filter by last name
5003+
* @param filter Filter by first name and/or lastname
50085004
* @param page Page number which specifies the set of records to retrieve. By default the number
50095005
* of the records per set is 100.
50105006
* @param accessToken Authorization token for user set in header of each request
50115007
* @return HttpResponse
50125008
* @throws IOException if an error occurs while attempting to invoke the API
50135009
*/
50145010
public HttpResponse getEmployeesForHttpResponse(
5015-
String accessToken, String xeroTenantId, String firstName, String lastName, Integer page)
5016-
throws IOException {
5011+
String accessToken, String xeroTenantId, String filter, Integer page) throws IOException {
50175012
// verify the required parameter 'xeroTenantId' is set
50185013
if (xeroTenantId == null) {
50195014
throw new IllegalArgumentException(
@@ -5028,20 +5023,9 @@ public HttpResponse getEmployeesForHttpResponse(
50285023
headers.setAccept("application/json");
50295024
headers.setUserAgent(this.getUserAgent());
50305025
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/Employees");
5031-
if (firstName != null) {
5032-
String key = "firstName";
5033-
Object value = firstName;
5034-
if (value instanceof Collection) {
5035-
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
5036-
} else if (value instanceof Object[]) {
5037-
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
5038-
} else {
5039-
uriBuilder = uriBuilder.queryParam(key, value);
5040-
}
5041-
}
5042-
if (lastName != null) {
5043-
String key = "lastName";
5044-
Object value = lastName;
5026+
if (filter != null) {
5027+
String key = "filter";
5028+
Object value = filter;
50455029
if (value instanceof Collection) {
50465030
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
50475031
} else if (value instanceof Object[]) {
@@ -6402,30 +6386,16 @@ public HttpResponse getTimesheetForHttpResponse(
64026386
* @param xeroTenantId Xero identifier for Tenant
64036387
* @param page Page number which specifies the set of records to retrieve. By default the number
64046388
* of the records per set is 100.
6405-
* @param employeeId By default get Timesheets will return the timesheets for all employees in an
6406-
* organization. You can add GET
6407-
* https://…/timesheets?filter&#x3D;employeeId&#x3D;&#x3D;{EmployeeID} to get only the
6408-
* timesheets of a particular employee.
6409-
* @param payrollCalendarId By default get Timesheets will return all the timesheets for an
6410-
* organization. You can add GET
6411-
* https://…/timesheets?filter&#x3D;payrollCalendarId&#x3D;&#x3D;{PayrollCalendarID} to filter
6412-
* the timesheets by payroll calendar id
6389+
* @param filter Filter by first name and/or lastname
64136390
* @param accessToken Authorization token for user set in header of each request
64146391
* @return Timesheets
64156392
* @throws IOException if an error occurs while attempting to invoke the API *
64166393
*/
64176394
public Timesheets getTimesheets(
6418-
String accessToken,
6419-
String xeroTenantId,
6420-
Integer page,
6421-
UUID employeeId,
6422-
UUID payrollCalendarId)
6423-
throws IOException {
6395+
String accessToken, String xeroTenantId, Integer page, String filter) throws IOException {
64246396
try {
64256397
TypeReference<Timesheets> typeRef = new TypeReference<Timesheets>() {};
6426-
HttpResponse response =
6427-
getTimesheetsForHttpResponse(
6428-
accessToken, xeroTenantId, page, employeeId, payrollCalendarId);
6398+
HttpResponse response = getTimesheetsForHttpResponse(accessToken, xeroTenantId, page, filter);
64296399
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
64306400
} catch (HttpResponseException e) {
64316401
if (logger.isDebugEnabled()) {
@@ -6457,25 +6427,13 @@ public Timesheets getTimesheets(
64576427
* @param xeroTenantId Xero identifier for Tenant
64586428
* @param page Page number which specifies the set of records to retrieve. By default the number
64596429
* of the records per set is 100.
6460-
* @param employeeId By default get Timesheets will return the timesheets for all employees in an
6461-
* organization. You can add GET
6462-
* https://…/timesheets?filter&#x3D;employeeId&#x3D;&#x3D;{EmployeeID} to get only the
6463-
* timesheets of a particular employee.
6464-
* @param payrollCalendarId By default get Timesheets will return all the timesheets for an
6465-
* organization. You can add GET
6466-
* https://…/timesheets?filter&#x3D;payrollCalendarId&#x3D;&#x3D;{PayrollCalendarID} to filter
6467-
* the timesheets by payroll calendar id
6430+
* @param filter Filter by first name and/or lastname
64686431
* @param accessToken Authorization token for user set in header of each request
64696432
* @return HttpResponse
64706433
* @throws IOException if an error occurs while attempting to invoke the API
64716434
*/
64726435
public HttpResponse getTimesheetsForHttpResponse(
6473-
String accessToken,
6474-
String xeroTenantId,
6475-
Integer page,
6476-
UUID employeeId,
6477-
UUID payrollCalendarId)
6478-
throws IOException {
6436+
String accessToken, String xeroTenantId, Integer page, String filter) throws IOException {
64796437
// verify the required parameter 'xeroTenantId' is set
64806438
if (xeroTenantId == null) {
64816439
throw new IllegalArgumentException(
@@ -6501,20 +6459,9 @@ public HttpResponse getTimesheetsForHttpResponse(
65016459
uriBuilder = uriBuilder.queryParam(key, value);
65026460
}
65036461
}
6504-
if (employeeId != null) {
6505-
String key = "employeeId";
6506-
Object value = employeeId;
6507-
if (value instanceof Collection) {
6508-
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
6509-
} else if (value instanceof Object[]) {
6510-
uriBuilder = uriBuilder.queryParam(key, (Object[]) value);
6511-
} else {
6512-
uriBuilder = uriBuilder.queryParam(key, value);
6513-
}
6514-
}
6515-
if (payrollCalendarId != null) {
6516-
String key = "payrollCalendarId";
6517-
Object value = payrollCalendarId;
6462+
if (filter != null) {
6463+
String key = "filter";
6464+
Object value = filter;
65186465
if (value instanceof Collection) {
65196466
uriBuilder = uriBuilder.queryParam(key, ((Collection) value).toArray());
65206467
} else if (value instanceof Object[]) {

src/main/java/com/xero/api/client/ProjectApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Xero Projects API
33
* This is the Xero Projects API
44
*
5-
* The version of the OpenAPI document: 2.10.0
5+
* The version of the OpenAPI document: 2.10.1
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -55,7 +55,7 @@ public class ProjectApi {
5555
private ApiClient apiClient;
5656
private static ProjectApi instance = null;
5757
private String userAgent = "Default";
58-
private String version = "4.8.0";
58+
private String version = "4.8.1";
5959
static final Logger logger = LoggerFactory.getLogger(ProjectApi.class);
6060

6161
/** ProjectApi */

0 commit comments

Comments
 (0)