Skip to content

Latest commit

 

History

History
134 lines (99 loc) · 6.08 KB

README.md

File metadata and controls

134 lines (99 loc) · 6.08 KB

EmployeePayrolls

(hris->employeePayrolls)

Overview

Available Operations

  • list - List Employee Payrolls
  • get - Get Employee Payroll

list

List payrolls for employee

Example Usage

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
}

Parameters

Parameter Type Required Description
$request Operations\HrisEmployeePayrollsAllRequest ✔️ The request object to use for the request.

Response

?Operations\HrisEmployeePayrollsAllResponse

Errors

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

Get payroll for employee

Example Usage

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
}

Parameters

Parameter Type Required Description
$request Operations\HrisEmployeePayrollsOneRequest ✔️ The request object to use for the request.

Response

?Operations\HrisEmployeePayrollsOneResponse

Errors

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 */*