Skip to content

Latest commit

 

History

History
149 lines (113 loc) · 4.1 KB

cash-drawers.md

File metadata and controls

149 lines (113 loc) · 4.1 KB

Cash Drawers

ICashDrawersApi cashDrawersApi = client.CashDrawersApi;

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.

ListCashDrawerShiftsAsync(
    string locationId,
    string sortOrder = null,
    string beginTime = null,
    string endTime = null,
    int? limit = null,
    string cursor = null)

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 int? 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

Task<Models.ListCashDrawerShiftsResponse>

Example Usage

string locationId = "location_id4";
try
{
    ListCashDrawerShiftsResponse result = await cashDrawersApi.ListCashDrawerShiftsAsync(locationId);
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}

Retrieve Cash Drawer Shift

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

RetrieveCashDrawerShiftAsync(
    string locationId,
    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

Task<Models.RetrieveCashDrawerShiftResponse>

Example Usage

string locationId = "location_id4";
string shiftId = "shift_id0";
try
{
    RetrieveCashDrawerShiftResponse result = await cashDrawersApi.RetrieveCashDrawerShiftAsync(
        locationId,
        shiftId
    );
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}

List Cash Drawer Shift Events

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

ListCashDrawerShiftEventsAsync(
    string locationId,
    string shiftId,
    int? limit = null,
    string cursor = null)

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 int? 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

Task<Models.ListCashDrawerShiftEventsResponse>

Example Usage

string locationId = "location_id4";
string shiftId = "shift_id0";
try
{
    ListCashDrawerShiftEventsResponse result = await cashDrawersApi.ListCashDrawerShiftEventsAsync(
        locationId,
        shiftId
    );
}
catch (ApiException e)
{
    // TODO: Handle exception here
    Console.WriteLine(e.Message);
}