Skip to content

Commit 7b54e26

Browse files
committed
Updates for BankFeeds, Accounting & UK Payroll
ACCOUNTING added validationerror to batchpayment object & remove from batchpayments BANKFEEDS Fixed statementId in path for getStament method Added transactionType to StatementLine Updated a few method return status from 200 to 201 Update Bankfeeds spec to resolve issues 378,379, and 381 UKPAYROLL GET Employees and GET Timesheets was not passing filter params correctly. Get methods for Employees and Timesheets incorrectly defined params to be passed by name for querying the API. Instead it needs to be a single param called "filter" that has named params and values passed together.
1 parent 5adec47 commit 7b54e26

File tree

11 files changed

+130
-87
lines changed

11 files changed

+130
-87
lines changed

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

Lines changed: 1 addition & 1 deletion
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).

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

Lines changed: 1 addition & 1 deletion
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).

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

Lines changed: 6 additions & 6 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).
@@ -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: 1 addition & 1 deletion
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).

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

Lines changed: 1 addition & 1 deletion
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).

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

Lines changed: 1 addition & 1 deletion
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).

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

Lines changed: 1 addition & 1 deletion
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).

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

Lines changed: 17 additions & 70 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).
@@ -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: 1 addition & 1 deletion
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).

src/main/java/com/xero/models/accounting/BatchPayment.java

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public static StatusEnum fromValue(String value) {
178178

179179
@JsonProperty("IsReconciled")
180180
private String isReconciled;
181+
182+
@JsonProperty("ValidationErrors")
183+
private List<ValidationError> validationErrors = new ArrayList<ValidationError>();
181184
/**
182185
* account
183186
*
@@ -749,6 +752,55 @@ public String getIsReconciled() {
749752
return isReconciled;
750753
}
751754

755+
/**
756+
* Displays array of validation error messages from the API
757+
*
758+
* @param validationErrors List&lt;ValidationError&gt;
759+
* @return BatchPayment
760+
*/
761+
public BatchPayment validationErrors(List<ValidationError> validationErrors) {
762+
this.validationErrors = validationErrors;
763+
return this;
764+
}
765+
766+
/**
767+
* Displays array of validation error messages from the API
768+
*
769+
* @param validationErrorsItem ValidationError
770+
* @return BatchPayment
771+
*/
772+
public BatchPayment addValidationErrorsItem(ValidationError validationErrorsItem) {
773+
if (this.validationErrors == null) {
774+
this.validationErrors = new ArrayList<ValidationError>();
775+
}
776+
this.validationErrors.add(validationErrorsItem);
777+
return this;
778+
}
779+
780+
/**
781+
* Displays array of validation error messages from the API
782+
*
783+
* @return validationErrors
784+
*/
785+
@ApiModelProperty(value = "Displays array of validation error messages from the API")
786+
/**
787+
* Displays array of validation error messages from the API
788+
*
789+
* @return validationErrors List<ValidationError>
790+
*/
791+
public List<ValidationError> getValidationErrors() {
792+
return validationErrors;
793+
}
794+
795+
/**
796+
* Displays array of validation error messages from the API
797+
*
798+
* @param validationErrors List&lt;ValidationError&gt;
799+
*/
800+
public void setValidationErrors(List<ValidationError> validationErrors) {
801+
this.validationErrors = validationErrors;
802+
}
803+
752804
@Override
753805
public boolean equals(java.lang.Object o) {
754806
if (this == o) {
@@ -773,7 +825,8 @@ public boolean equals(java.lang.Object o) {
773825
&& Objects.equals(this.status, batchPayment.status)
774826
&& Objects.equals(this.totalAmount, batchPayment.totalAmount)
775827
&& Objects.equals(this.updatedDateUTC, batchPayment.updatedDateUTC)
776-
&& Objects.equals(this.isReconciled, batchPayment.isReconciled);
828+
&& Objects.equals(this.isReconciled, batchPayment.isReconciled)
829+
&& Objects.equals(this.validationErrors, batchPayment.validationErrors);
777830
}
778831

779832
@Override
@@ -794,7 +847,8 @@ public int hashCode() {
794847
status,
795848
totalAmount,
796849
updatedDateUTC,
797-
isReconciled);
850+
isReconciled,
851+
validationErrors);
798852
}
799853

800854
@Override
@@ -817,6 +871,7 @@ public String toString() {
817871
sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n");
818872
sb.append(" updatedDateUTC: ").append(toIndentedString(updatedDateUTC)).append("\n");
819873
sb.append(" isReconciled: ").append(toIndentedString(isReconciled)).append("\n");
874+
sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n");
820875
sb.append("}");
821876
return sb.toString();
822877
}

0 commit comments

Comments
 (0)