sq_list_generic_v1: List Records from Connect V1 Endpoints

Description Usage Arguments Details Value Examples

Description

This generic function can be used on the list endpoints of the Connect V1 API. Most endpoints have specific functions to accomodate parameters. We use this generic to create functiosn for endpoints that do not have parameters we do not care about (e.g. begin time, end time, etc.)

Usage

1
sq_list_generic_v1(endpoint, location, cursor = NULL, verbose = FALSE)

Arguments

endpoint

character; a string that specifies which endpoint the generic method should target

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.

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?

Details

This function and works for the following Connect V1 endpoints: items, categories, fees, discounts, modifier-lists.

Value

tbl_df of records from the specified endpoint

Examples

1
2
3
4
5
## Not run: 
our_locations <- sq_list_locations()
our_items <- sq_list_generic_v1(endpoint="items", location=our_locations$id[1])

## End(Not run)

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