2727import com .xero .models .payrolluk .EmployeeOpeningBalances ;
2828import com .xero .models .payrolluk .EmployeeOpeningBalancesObject ;
2929import com .xero .models .payrolluk .EmployeePayTemplateObject ;
30+ import com .xero .models .payrolluk .EmployeePayTemplates ;
3031import com .xero .models .payrolluk .EmployeeStatutoryLeaveBalanceObject ;
3132import com .xero .models .payrolluk .EmployeeStatutoryLeavesSummaries ;
3233import com .xero .models .payrolluk .EmployeeStatutorySickLeave ;
@@ -104,7 +105,7 @@ public class PayrollUkApi {
104105 private ApiClient apiClient ;
105106 private static PayrollUkApi instance = null ;
106107 private String userAgent = "Default" ;
107- private String version = "4.0.2 " ;
108+ private String version = "4.1.0 " ;
108109 final static Logger logger = LoggerFactory .getLogger (PayrollUkApi .class );
109110
110111 public PayrollUkApi () {
@@ -1142,12 +1143,12 @@ public HttpResponse createLeaveTypeForHttpResponse(String accessToken, String x
11421143 * @param employeeId Employee id for single object
11431144 * @param earningsTemplate The earningsTemplate parameter
11441145 * @param accessToken Authorization token for user set in header of each request
1145- * @return EmployeePayTemplateObject
1146+ * @return EmployeePayTemplates
11461147 * @throws IOException if an error occurs while attempting to invoke the API
11471148 **/
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 {
11491150 try {
1150- TypeReference <EmployeePayTemplateObject > typeRef = new TypeReference <EmployeePayTemplateObject >() {};
1151+ TypeReference <EmployeePayTemplates > typeRef = new TypeReference <EmployeePayTemplates >() {};
11511152 HttpResponse response = createMultipleEmployeeEarningsTemplateForHttpResponse (accessToken , xeroTenantId , employeeId , earningsTemplate );
11521153 return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
11531154 } catch (HttpResponseException e ) {
@@ -1157,9 +1158,9 @@ public EmployeePayTemplateObject createMultipleEmployeeEarningsTemplate(String
11571158 }
11581159 XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
11591160 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 ());
11631164 } else {
11641165 handler .execute (e );
11651166 }
@@ -2893,14 +2894,14 @@ public HttpResponse getEmployeeOpeningBalancesForHttpResponse(String accessToken
28932894 * @return EmployeePayTemplateObject
28942895 * @throws IOException if an error occurs while attempting to invoke the API
28952896 **/
2896- public EmployeePayTemplateObject getEmployeePayTemplates (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2897+ public EmployeePayTemplateObject getEmployeePayTemplate (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
28972898 try {
28982899 TypeReference <EmployeePayTemplateObject > typeRef = new TypeReference <EmployeePayTemplateObject >() {};
2899- HttpResponse response = getEmployeePayTemplatesForHttpResponse (accessToken , xeroTenantId , employeeId );
2900+ HttpResponse response = getEmployeePayTemplateForHttpResponse (accessToken , xeroTenantId , employeeId );
29002901 return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
29012902 } catch (HttpResponseException e ) {
29022903 if (logger .isDebugEnabled ()) {
2903- logger .debug ("------------------ HttpResponseException " + e .getStatusCode () + " : getEmployeePayTemplates -------------------" );
2904+ logger .debug ("------------------ HttpResponseException " + e .getStatusCode () + " : getEmployeePayTemplate -------------------" );
29042905 logger .debug (e .toString ());
29052906 }
29062907 XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
@@ -2917,16 +2918,16 @@ public EmployeePayTemplateObject getEmployeePayTemplates(String accessToken, St
29172918 return null ;
29182919 }
29192920
2920- public HttpResponse getEmployeePayTemplatesForHttpResponse (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
2921+ public HttpResponse getEmployeePayTemplateForHttpResponse (String accessToken , String xeroTenantId , UUID employeeId ) throws IOException {
29212922 // verify the required parameter 'xeroTenantId' is set
29222923 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 " );
29242925 }// verify the required parameter 'employeeId' is set
29252926 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 " );
29272928 }
29282929 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 " );
29302931 }
29312932 HttpHeaders headers = new HttpHeaders ();
29322933 headers .set ("Xero-Tenant-Id" , xeroTenantId );
@@ -5062,12 +5063,12 @@ public HttpResponse updateEmployeeSalaryAndWageForHttpResponse(String accessToke
50625063 * @param payRunID Identifier for the pay run
50635064 * @param payRun The payRun parameter
50645065 * @param accessToken Authorization token for user set in header of each request
5065- * @return PayRuns
5066+ * @return PayRunObject
50665067 * @throws IOException if an error occurs while attempting to invoke the API
50675068 **/
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 {
50695070 try {
5070- TypeReference <PayRuns > typeRef = new TypeReference <PayRuns >() {};
5071+ TypeReference <PayRunObject > typeRef = new TypeReference <PayRunObject >() {};
50715072 HttpResponse response = updatePayRunForHttpResponse (accessToken , xeroTenantId , payRunID , payRun );
50725073 return apiClient .getObjectMapper ().readValue (response .getContent (), typeRef );
50735074 } catch (HttpResponseException e ) {
@@ -5077,9 +5078,9 @@ public PayRuns updatePayRun(String accessToken, String xeroTenantId, UUID payRu
50775078 }
50785079 XeroApiExceptionHandler handler = new XeroApiExceptionHandler ();
50795080 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 ());
50835084 } else {
50845085 handler .execute (e );
50855086 }
0 commit comments