(hris().payrolls())
- list - List Payroll
- get - Get Payroll
List Payroll
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.HrisPayrollsAllRequest;
import com.apideck.unify.models.operations.HrisPayrollsAllResponse;
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();
HrisPayrollsAllRequest req = HrisPayrollsAllRequest.builder()
.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();
HrisPayrollsAllResponse res = sdk.hris().payrolls().list()
.request(req)
.call();
if (res.getPayrollsResponse().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
HrisPayrollsAllRequest |
✔️ |
The request object to use for the request. |
HrisPayrollsAllResponse
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
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.HrisPayrollsOneRequest;
import com.apideck.unify.models.operations.HrisPayrollsOneResponse;
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();
HrisPayrollsOneRequest req = HrisPayrollsOneRequest.builder()
.payrollId("<id>")
.serviceId("salesforce")
.fields("id,updated_at")
.build();
HrisPayrollsOneResponse res = sdk.hris().payrolls().get()
.request(req)
.call();
if (res.getPayrollResponse().isPresent()) {
// handle response
}
}
}
Parameter |
Type |
Required |
Description |
request |
HrisPayrollsOneRequest |
✔️ |
The request object to use for the request. |
HrisPayrollsOneResponse
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 |
*/* |