sq_get_transaction: Get Transaction

Description Usage Arguments Details Value Examples

View source: R/transactions.R

Description

Retrieves details for a single transaction.

Usage

1
sq_get_transaction(location, transaction_id, verbose = FALSE)

Arguments

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.

transaction_id

character; the Square ID assigned to each unique transaction. This can be found using sq_list_transactions

verbose

logical; do you want informative messages?

Details

Required permissions: PAYMENTS_READ

Value

tbl_df of a single transaction

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
our_locations <- sq_list_locations()
our_transactions <- sq_list_transactions(location = our_locations$id[1], 
                                         begin=Sys.Date()-1, end=Sys.Date())
# return just one transaction                                          
this_transaction <- sq_get_transaction(location = our_locations$id[1], 
                                       transaction_id = our_transactions$id[1])

## End(Not run)

StevenMMortimer/squareupr documentation built on July 12, 2019, 1:45 a.m.