Description Usage Arguments Details Value Examples
Lists transactions for a particular location.
1 2 3 |
location |
character; the Square ID or name associated to a location. This must be an exact match to the ID or name as found using sq_list_locations. |
begin_time |
Date or DateTime class; The beginning of the requested reporting period. The default value is one day prior at midnight local time (i.e. start of yesterday). If the value is a Date (no time component) the time is started at midnight of the date of the local timezone. |
end_time |
Date or DateTime class; The end of the requested reporting period. The default value is today at midnight local time (i.e. start of today). If the value is a Date (no time component) the time is started at midnight of the date of the local timezone. |
sort_order |
character; The order in which results are listed in the response
( |
cursor |
character; A pagination cursor returned by a previous call to this endpoint. Typically this is not needed because functions in the package will automatically paginate results. |
verbose |
logical; do you want informative messages? |
Transactions include payment information from sales and exchanges and
refund information from returns and exchanges. Required permissions: PAYMENTS_READ
tbl_df
of transactions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
our_locations <- sq_list_locations()
yesterdays_transactions <- sq_list_transactions(our_locations$id[1])
sorted_transactions <- sq_list_transactions(our_locations$id[1],
begin_time = Sys.Date() - 1,
end_time = Sys.Date(),
sort_order = "ASC")
# specify the time range as datetimes:
# - Beginning April 6th, 2018 at 5PM EDT
# - Ending April 8th, 2018 at 8AM EDT
begin <- as.POSIXct("2018-04-06 17:00:00", tz="America/New_York")
end <- as.POSIXct("2018-04-08 8:00:00", tz="America/New_York")
custom_time_range <- sq_list_transactions(our_locations$id[1],
begin_time = begin,
end_time = end)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.