Skip to content

Latest commit

 

History

History
143 lines (104 loc) · 4.52 KB

cash-drawers.md

File metadata and controls

143 lines (104 loc) · 4.52 KB

Cash Drawers

CashDrawersApi cashDrawersApi = client.getCashDrawersApi();

Class Name

CashDrawersApi

Methods

List Cash Drawer Shifts

Provides the details for all of the cash drawer shifts for a location in a date range.

CompletableFuture<ListCashDrawerShiftsResponse> listCashDrawerShiftsAsync(
    final String locationId,
    final String sortOrder,
    final String beginTime,
    final String endTime,
    final Integer limit,
    final String cursor)

Parameters

Parameter Type Tags Description
locationId String Query, Required The ID of the location to query for a list of cash drawer shifts.
sortOrder String Query, Optional The order in which cash drawer shifts are listed in the response,
based on their opened_at field. Default value: ASC
beginTime String Query, Optional The inclusive start time of the query on opened_at, in ISO 8601 format.
endTime String Query, Optional The exclusive end date of the query on opened_at, in ISO 8601 format.
limit Integer Query, Optional Number of cash drawer shift events in a page of results (200 by
default, 1000 max).
cursor String Query, Optional Opaque cursor for fetching the next page of results.

Response Type

ListCashDrawerShiftsResponse

Example Usage

String locationId = "location_id4";

cashDrawersApi.listCashDrawerShiftsAsync(locationId, null, null, null, null, null).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});

Retrieve Cash Drawer Shift

Provides the summary details for a single cash drawer shift. See ListCashDrawerShiftEvents for a list of cash drawer shift events.

CompletableFuture<RetrieveCashDrawerShiftResponse> retrieveCashDrawerShiftAsync(
    final String locationId,
    final String shiftId)

Parameters

Parameter Type Tags Description
locationId String Query, Required The ID of the location to retrieve cash drawer shifts from.
shiftId String Template, Required The shift ID.

Response Type

RetrieveCashDrawerShiftResponse

Example Usage

String locationId = "location_id4";
String shiftId = "shift_id0";

cashDrawersApi.retrieveCashDrawerShiftAsync(locationId, shiftId).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});

List Cash Drawer Shift Events

Provides a paginated list of events for a single cash drawer shift.

CompletableFuture<ListCashDrawerShiftEventsResponse> listCashDrawerShiftEventsAsync(
    final String locationId,
    final String shiftId,
    final Integer limit,
    final String cursor)

Parameters

Parameter Type Tags Description
locationId String Query, Required The ID of the location to list cash drawer shifts for.
shiftId String Template, Required The shift ID.
limit Integer Query, Optional Number of resources to be returned in a page of results (200 by
default, 1000 max).
cursor String Query, Optional Opaque cursor for fetching the next page of results.

Response Type

ListCashDrawerShiftEventsResponse

Example Usage

String locationId = "location_id4";
String shiftId = "shift_id0";

cashDrawersApi.listCashDrawerShiftEventsAsync(locationId, shiftId, null, null).thenAccept(result -> {
    // TODO success callback handler
    System.out.println(result);
}).exceptionally(exception -> {
    // TODO failure callback handler
    exception.printStackTrace();
    return null;
});