(hris->employeePayrolls)
List payrolls for employee
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->build();
$request = new Operations\HrisEmployeePayrollsAllRequest(
employeeId: '<id>',
serviceId: 'salesforce',
filter: new Components\PayrollsFilter(
startDate: '2022-04-08',
endDate: '2022-04-21',
),
passThrough: [
'search' => 'San Francisco',
],
fields: 'id,updated_at',
);
$response = $sdk->hris->employeePayrolls->list(
request: $request
);
if ($response->getEmployeePayrollsResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\HrisEmployeePayrollsAllRequest | ✔️ | The request object to use for the request. |
?Operations\HrisEmployeePayrollsAllResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\BadRequestResponse | 400 | application/json |
Errors\UnauthorizedResponse | 401 | application/json |
Errors\PaymentRequiredResponse | 402 | application/json |
Errors\NotFoundResponse | 404 | application/json |
Errors\UnprocessableResponse | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |
Get payroll for employee
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('test-consumer')
->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
->build();
$request = new Operations\HrisEmployeePayrollsOneRequest(
payrollId: '<id>',
employeeId: '<id>',
serviceId: 'salesforce',
fields: 'id,updated_at',
);
$response = $sdk->hris->employeePayrolls->get(
request: $request
);
if ($response->getEmployeePayrollResponse !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\HrisEmployeePayrollsOneRequest | ✔️ | The request object to use for the request. |
?Operations\HrisEmployeePayrollsOneResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\BadRequestResponse | 400 | application/json |
Errors\UnauthorizedResponse | 401 | application/json |
Errors\PaymentRequiredResponse | 402 | application/json |
Errors\NotFoundResponse | 404 | application/json |
Errors\UnprocessableResponse | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |