All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.global.api.entities.payroll.PayrollResponse Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
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);
                }
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy