cash_drawers_api = client.cash_drawers
CashDrawersApi
Provides the details for all of the cash drawer shifts for a location in a date range.
def list_cash_drawer_shifts(location_id:,
sort_order: nil,
begin_time: nil,
end_time: nil,
limit: nil,
cursor: nil)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
String |
Query, Required | The ID of the location to query for a list of cash drawer shifts. |
sort_order |
String (Sort Order) |
Query, Optional | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC |
begin_time |
String |
Query, Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. |
end_time |
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. |
List Cash Drawer Shifts Response Hash
location_id = 'location_id4'
result = cash_drawers_api.list_cash_drawer_shifts(location_id: location_id, )
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Provides the summary details for a single cash drawer shift. See ListCashDrawerShiftEvents for a list of cash drawer shift events.
def retrieve_cash_drawer_shift(location_id:,
shift_id:)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
String |
Query, Required | The ID of the location to retrieve cash drawer shifts from. |
shift_id |
String |
Template, Required | The shift ID. |
Retrieve Cash Drawer Shift Response Hash
location_id = 'location_id4'
shift_id = 'shift_id0'
result = cash_drawers_api.retrieve_cash_drawer_shift(location_id: location_id, shift_id: shift_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Provides a paginated list of events for a single cash drawer shift.
def list_cash_drawer_shift_events(location_id:,
shift_id:,
limit: nil,
cursor: nil)
Parameter | Type | Tags | Description |
---|---|---|---|
location_id |
String |
Query, Required | The ID of the location to list cash drawer shifts for. |
shift_id |
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. |
List Cash Drawer Shift Events Response Hash
location_id = 'location_id4'
shift_id = 'shift_id0'
result = cash_drawers_api.list_cash_drawer_shift_events(location_id: location_id, shift_id: shift_id, )
if result.success?
puts result.data
elsif result.error?
warn result.errors
end