Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 2.11 KB

employees.md

File metadata and controls

99 lines (66 loc) · 2.11 KB

Employees

$employeesApi = $client->getEmployeesApi();

Class Name

EmployeesApi

Methods

List Employees

This endpoint is deprecated.

ListEmployees

function listEmployees(
    ?string $locationId = null,
    ?string $status = null,
    ?int $limit = null,
    ?string $cursor = null
): ApiResponse

Parameters

Parameter Type Tags Description
locationId ?string Query, Optional -
status ?string (EmployeeStatus) Query, Optional Specifies the EmployeeStatus to filter the employee by.
limit ?int Query, Optional The number of employees to be returned on each page.
cursor ?string Query, Optional The token required to retrieve the specified page of results.

Response Type

ListEmployeesResponse

Example Usage

$apiResponse = $employeesApi->listEmployees();

if ($apiResponse->isSuccess()) {
    $listEmployeesResponse = $apiResponse->getResult();
} else {
    $errors = $apiResponse->getErrors();
}

// Get more response info...
// $statusCode = $apiResponse->getStatusCode();
// $headers = $apiResponse->getHeaders();

Retrieve Employee

This endpoint is deprecated.

RetrieveEmployee

function retrieveEmployee(string $id): ApiResponse

Parameters

Parameter Type Tags Description
id string Template, Required UUID for the employee that was requested.

Response Type

RetrieveEmployeeResponse

Example Usage

$id = 'id0';

$apiResponse = $employeesApi->retrieveEmployee($id);

if ($apiResponse->isSuccess()) {
    $retrieveEmployeeResponse = $apiResponse->getResult();
} else {
    $errors = $apiResponse->getErrors();
}

// Get more response info...
// $statusCode = $apiResponse->getStatusCode();
// $headers = $apiResponse->getHeaders();