CashDrawersApi cashDrawersApi = client.getCashDrawersApi();
CashDrawersApi
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)
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. |
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;
});
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)
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. |
RetrieveCashDrawerShiftResponse
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;
});
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)
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. |
ListCashDrawerShiftEventsResponse
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;
});