SquareConnect\CashDrawersApi

March 25, 2020 · View on GitHub

All URIs are relative to https://connect.squareup.com

MethodHTTP requestDescription
listCashDrawerShiftEventsGET /v2/cash-drawers/shifts/{shift_id}/eventsListCashDrawerShiftEvents
listCashDrawerShiftsGET /v2/cash-drawers/shiftsListCashDrawerShifts
retrieveCashDrawerShiftGET /v2/cash-drawers/shifts/{shift_id}RetrieveCashDrawerShift

listCashDrawerShiftEvents

\SquareConnect\Model\ListCashDrawerShiftEventsResponse listCashDrawerShiftEvents(locationid,location_id, shift_id, limit,limit, cursor)

ListCashDrawerShiftEvents

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new SquareConnect\Api\CashDrawersApi();
$location_id = "location_id_example"; // string | The ID of the location to list cash drawer shifts for.
$shift_id = "shift_id_example"; // string | The shift ID.
$limit = 56; // int | Number of resources to be returned in a page of results (200 by default, 1000 max).
$cursor = "cursor_example"; // string | Opaque cursor for fetching the next page of results.

try {
    $result = $apiInstance->listCashDrawerShiftEvents($location_id, $shift_id, $limit, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CashDrawersApi->listCashDrawerShiftEvents: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
location_idstringThe ID of the location to list cash drawer shifts for.
shift_idstringThe shift ID.
limitintNumber of resources to be returned in a page of results (200 by default, 1000 max).[optional]
cursorstringOpaque cursor for fetching the next page of results.[optional]

Return type

\SquareConnect\Model\ListCashDrawerShiftEventsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listCashDrawerShifts

\SquareConnect\Model\ListCashDrawerShiftsResponse listCashDrawerShifts(locationid,location_id, sort_order, begintime,begin_time, end_time, limit,limit, cursor)

ListCashDrawerShifts

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new SquareConnect\Api\CashDrawersApi();
$location_id = "location_id_example"; // string | The ID of the location to query for a list of cash drawer shifts.
$sort_order = "sort_order_example"; // string | The order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC
$begin_time = "begin_time_example"; // string | The inclusive start time of the query on opened_at, in ISO 8601 format.
$end_time = "end_time_example"; // string | The exclusive end date of the query on opened_at, in ISO 8601 format.
$limit = 56; // int | Number of cash drawer shift events in a page of results (200 by default, 1000 max).
$cursor = "cursor_example"; // string | Opaque cursor for fetching the next page of results.

try {
    $result = $apiInstance->listCashDrawerShifts($location_id, $sort_order, $begin_time, $end_time, $limit, $cursor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CashDrawersApi->listCashDrawerShifts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
location_idstringThe ID of the location to query for a list of cash drawer shifts.
sort_orderstringThe order in which cash drawer shifts are listed in the response, based on their opened_at field. Default value: ASC[optional]
begin_timestringThe inclusive start time of the query on opened_at, in ISO 8601 format.[optional]
end_timestringThe exclusive end date of the query on opened_at, in ISO 8601 format.[optional]
limitintNumber of cash drawer shift events in a page of results (200 by default, 1000 max).[optional]
cursorstringOpaque cursor for fetching the next page of results.[optional]

Return type

\SquareConnect\Model\ListCashDrawerShiftsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieveCashDrawerShift

\SquareConnect\Model\RetrieveCashDrawerShiftResponse retrieveCashDrawerShift(locationid,location_id, shift_id)

RetrieveCashDrawerShift

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2
SquareConnect\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new SquareConnect\Api\CashDrawersApi();
$location_id = "location_id_example"; // string | The ID of the location to retrieve cash drawer shifts from.
$shift_id = "shift_id_example"; // string | The shift ID.

try {
    $result = $apiInstance->retrieveCashDrawerShift($location_id, $shift_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CashDrawersApi->retrieveCashDrawerShift: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

NameTypeDescriptionNotes
location_idstringThe ID of the location to retrieve cash drawer shifts from.
shift_idstringThe shift ID.

Return type

\SquareConnect\Model\RetrieveCashDrawerShiftResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]