Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 2.04 KB

employees.md

File metadata and controls

88 lines (62 loc) · 2.04 KB

Employees

EmployeesApi employeesApi = client.getEmployeesApi();

Class Name

EmployeesApi

Methods

List Employees

ListEmployees

CompletableFuture<ListEmployeesResponse> listEmployeesAsync(
    final String locationId,
    final String status,
    final Integer limit,
    final String cursor)

Parameters

Parameter Type Tags Description
locationId String Query, Optional -
status String Query, Optional Specifies the EmployeeStatus to filter the employee by.
limit Integer 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

String locationId = "location_id4";
String status = "ACTIVE";
Integer limit = 172;
String cursor = "cursor6";

employeesApi.listEmployeesAsync(locationId, status, limit, cursor).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});

Retrieve Employee

RetrieveEmployee

CompletableFuture<RetrieveEmployeeResponse> retrieveEmployeeAsync(
    final String id)

Parameters

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

Response Type

RetrieveEmployeeResponse

Example Usage

String id = "id0";

employeesApi.retrieveEmployeeAsync(id).thenAccept(result -> {
    // TODO success callback handler
}).exceptionally(exception -> {
    // TODO failure callback handler
    return null;
});