com.global.api.entities.payroll.PayrollResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.entities.payroll;
import com.global.api.entities.exceptions.ApiException;
import com.global.api.utils.JsonDoc;
import java.util.ArrayList;
public class PayrollResponse extends BasePayrollResponse {
private ArrayList results;
public ArrayList getResults() {
return results;
}
public void setResults(ArrayList results) {
this.results = results;
}
public PayrollResponse(String rawResponse, PayrollEncoder encoder, Class clazz) throws ApiException {
super(rawResponse);
results = new ArrayList();
if (rawResults != null) {
for(JsonDoc result: rawResults) {
try {
TResult item = clazz.newInstance();
item.fromJson(result, encoder);
results.add(item);
}
catch(Exception exc) {
throw new ApiException(exc.getMessage(), exc);
}
}
}
}
}