27
27
import com .xero .models .payrolluk .EmployeeOpeningBalances ;
28
28
import com .xero .models .payrolluk .EmployeeOpeningBalancesObject ;
29
29
import com .xero .models .payrolluk .EmployeePayTemplateObject ;
30
+ import com .xero .models .payrolluk .EmployeePayTemplates ;
30
31
import com .xero .models .payrolluk .EmployeeStatutoryLeaveBalanceObject ;
31
32
import com .xero .models .payrolluk .EmployeeStatutoryLeavesSummaries ;
32
33
import com .xero .models .payrolluk .EmployeeStatutorySickLeave ;
@@ -104,7 +105,7 @@ public class PayrollUkApi {
104
105
private ApiClient apiClient ;
105
106
private static PayrollUkApi instance = null ;
106
107
private String userAgent = "Default" ;
107
- private String version = "4.0.2 " ;
108
+ private String version = "4.1.0 " ;
108
109
final static Logger logger = LoggerFactory .getLogger (PayrollUkApi .class );
109
110
110
111
public PayrollUkApi () {
@@ -1142,12 +1143,12 @@ public HttpResponse createLeaveTypeForHttpResponse(String accessToken, String x
1142
1143
* @param employeeId Employee id for single object
1143
1144
* @param earningsTemplate The earningsTemplate parameter
1144
1145
* @param accessToken Authorization token for user set in header of each request
1145
- * @return EmployeePayTemplateObject
1146
+ * @return EmployeePayTemplates
1146
1147
* @throws IOException if an error occurs while attempting to invoke the API
1147
1148
**/
1148
- public EmployeePayTemplateObject createMultipleEmployeeEarningsTemplate (String accessToken , String xeroTenantId , UUID employeeId , List <EarningsTemplate > earningsTemplate ) throws IOException {
1149
+ public EmployeePayTemplates createMultipleEmployeeEarningsTemplate (String accessToken , String xeroTenantId , UUID employeeId , List <EarningsTemplate > earningsTemplate ) throws IOException {
1149
1150
try {
1150
- TypeReference <EmployeePayTemplateObject > typeRef = new TypeReference <EmployeePayTemplateObject >() {};
1151
+ TypeReference <EmployeePayTemplates > typeRef = new TypeReference <EmployeePayTemplates >() {};
1151
1152
HttpResponse response = createMultipleEmployeeEarningsTemplateForHttpResponse (accessToken , xeroTenantId , employeeId , earningsTemplate );
1152
1153
return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
1153
1154
} catch (HttpResponseException e ) {
@@ -1157,9 +1158,9 @@ public EmployeePayTemplateObject createMultipleEmployeeEarningsTemplate(String
1157
1158
}
1158
1159
XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
1159
1160
if (e .getStatusCode () == 400 || e .getStatusCode () == 405 ) {
1160
- TypeReference <EmployeePayTemplateObject > errorTypeRef = new TypeReference <EmployeePayTemplateObject >() {};
1161
- EmployeePayTemplateObject object = apiClient .getObjectMapper ().readValue (e .getContent (), errorTypeRef );
1162
- handler .validationError (e .getStatusCode (),"EmployeePayTemplateObject " ,object .getProblem ());
1161
+ TypeReference <EmployeePayTemplates > errorTypeRef = new TypeReference <EmployeePayTemplates >() {};
1162
+ EmployeePayTemplates object = apiClient .getObjectMapper ().readValue (e .getContent (), errorTypeRef );
1163
+ handler .validationError (e .getStatusCode (),"EmployeePayTemplates " ,object .getProblem ());
1163
1164
} else {
1164
1165
handler .execute (e );
1165
1166
}
@@ -2893,14 +2894,14 @@ public HttpResponse getEmployeeOpeningBalancesForHttpResponse(String accessToken
2893
2894
* @return EmployeePayTemplateObject
2894
2895
* @throws IOException if an error occurs while attempting to invoke the API
2895
2896
**/
2896
- public EmployeePayTemplateObject getEmployeePayTemplates (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2897
+ public EmployeePayTemplateObject getEmployeePayTemplate (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2897
2898
try {
2898
2899
TypeReference <EmployeePayTemplateObject > typeRef = new TypeReference <EmployeePayTemplateObject >() {};
2899
- HttpResponse response = getEmployeePayTemplatesForHttpResponse (accessToken , xeroTenantId , employeeId );
2900
+ HttpResponse response = getEmployeePayTemplateForHttpResponse (accessToken , xeroTenantId , employeeId );
2900
2901
return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
2901
2902
} catch (HttpResponseException e ) {
2902
2903
if (logger .isDebugEnabled ()) {
2903
- logger .debug ("------------------ HttpResponseException " + e .getStatusCode () + " : getEmployeePayTemplates -------------------" );
2904
+ logger .debug ("------------------ HttpResponseException " + e .getStatusCode () + " : getEmployeePayTemplate -------------------" );
2904
2905
logger .debug (e .toString ());
2905
2906
}
2906
2907
XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
@@ -2917,16 +2918,16 @@ public EmployeePayTemplateObject getEmployeePayTemplates(String accessToken, St
2917
2918
return null ;
2918
2919
}
2919
2920
2920
- public HttpResponse getEmployeePayTemplatesForHttpResponse (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2921
+ public HttpResponse getEmployeePayTemplateForHttpResponse (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2921
2922
// verify the required parameter 'xeroTenantId' is set
2922
2923
if (xeroTenantId == null ) {
2923
- throw new IllegalArgumentException ("Missing the required parameter 'xeroTenantId' when calling getEmployeePayTemplates " );
2924
+ throw new IllegalArgumentException ("Missing the required parameter 'xeroTenantId' when calling getEmployeePayTemplate " );
2924
2925
}// verify the required parameter 'employeeId' is set
2925
2926
if (employeeId == null ) {
2926
- throw new IllegalArgumentException ("Missing the required parameter 'employeeId' when calling getEmployeePayTemplates " );
2927
+ throw new IllegalArgumentException ("Missing the required parameter 'employeeId' when calling getEmployeePayTemplate " );
2927
2928
}
2928
2929
if (accessToken == null ) {
2929
- throw new IllegalArgumentException ("Missing the required parameter 'accessToken' when calling getEmployeePayTemplates " );
2930
+ throw new IllegalArgumentException ("Missing the required parameter 'accessToken' when calling getEmployeePayTemplate " );
2930
2931
}
2931
2932
HttpHeaders headers = new HttpHeaders ();
2932
2933
headers .set ("Xero-Tenant-Id" , xeroTenantId );
@@ -5062,12 +5063,12 @@ public HttpResponse updateEmployeeSalaryAndWageForHttpResponse(String accessToke
5062
5063
* @param payRunID Identifier for the pay run
5063
5064
* @param payRun The payRun parameter
5064
5065
* @param accessToken Authorization token for user set in header of each request
5065
- * @return PayRuns
5066
+ * @return PayRunObject
5066
5067
* @throws IOException if an error occurs while attempting to invoke the API
5067
5068
**/
5068
- public PayRuns updatePayRun (String accessToken , String xeroTenantId , UUID payRunID , PayRun payRun ) throws IOException {
5069
+ public PayRunObject updatePayRun (String accessToken , String xeroTenantId , UUID payRunID , PayRun payRun ) throws IOException {
5069
5070
try {
5070
- TypeReference <PayRuns > typeRef = new TypeReference <PayRuns >() {};
5071
+ TypeReference <PayRunObject > typeRef = new TypeReference <PayRunObject >() {};
5071
5072
HttpResponse response = updatePayRunForHttpResponse (accessToken , xeroTenantId , payRunID , payRun );
5072
5073
return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
5073
5074
} catch (HttpResponseException e ) {
@@ -5077,9 +5078,9 @@ public PayRuns updatePayRun(String accessToken, String xeroTenantId, UUID payRu
5077
5078
}
5078
5079
XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
5079
5080
if (e .getStatusCode () == 400 || e .getStatusCode () == 405 ) {
5080
- TypeReference <PayRuns > errorTypeRef = new TypeReference <PayRuns >() {};
5081
- PayRuns object = apiClient .getObjectMapper ().readValue (e .getContent (), errorTypeRef );
5082
- handler .validationError (e .getStatusCode (),"PayRuns " ,object .getProblem ());
5081
+ TypeReference <PayRunObject > errorTypeRef = new TypeReference <PayRunObject >() {};
5082
+ PayRunObject object = apiClient .getObjectMapper ().readValue (e .getContent (), errorTypeRef );
5083
+ handler .validationError (e .getStatusCode (),"PayRunObject " ,object .getProblem ());
5083
5084
} else {
5084
5085
handler .execute (e );
5085
5086
}
0 commit comments