(hris().employeePayrolls())
List payrolls for employee
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.PayrollsFilter;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeePayrollsAllRequest;
import com.apideck.unify.models.operations.HrisEmployeePayrollsAllResponse;
import java.lang.Exception;
import java.util.Map;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisEmployeePayrollsAllRequest req = HrisEmployeePayrollsAllRequest.builder()
.employeeId("<id>")
.serviceId("salesforce")
.filter(PayrollsFilter.builder()
.startDate("2022-04-08")
.endDate("2022-04-21")
.build())
.passThrough(Map.ofEntries(
Map.entry("search", "San Francisco")))
.fields("id,updated_at")
.build();
HrisEmployeePayrollsAllResponse res = sdk.hris().employeePayrolls().list()
.request(req)
.call();
if (res.getEmployeePayrollsResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
HrisEmployeePayrollsAllRequest | ✔️ | The request object to use for the request. |
HrisEmployeePayrollsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |
Get payroll for employee
package hello.world;
import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.HrisEmployeePayrollsOneRequest;
import com.apideck.unify.models.operations.HrisEmployeePayrollsOneResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {
Apideck sdk = Apideck.builder()
.apiKey("<YOUR_BEARER_TOKEN_HERE>")
.consumerId("test-consumer")
.appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
.build();
HrisEmployeePayrollsOneRequest req = HrisEmployeePayrollsOneRequest.builder()
.payrollId("<id>")
.employeeId("<id>")
.serviceId("salesforce")
.fields("id,updated_at")
.build();
HrisEmployeePayrollsOneResponse res = sdk.hris().employeePayrolls().get()
.request(req)
.call();
if (res.getEmployeePayrollResponse().isPresent()) {
// handle response
}
}
}
Parameter | Type | Required | Description |
---|---|---|---|
request |
HrisEmployeePayrollsOneRequest | ✔️ | The request object to use for the request. |
HrisEmployeePayrollsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
models/errors/BadRequestResponse | 400 | application/json |
models/errors/UnauthorizedResponse | 401 | application/json |
models/errors/PaymentRequiredResponse | 402 | application/json |
models/errors/NotFoundResponse | 404 | application/json |
models/errors/UnprocessableResponse | 422 | application/json |
models/errors/APIException | 4XX, 5XX | */* |