sq_update_item: Update Item

Description Usage Arguments Details Value Examples

View source: R/items.R

Description

Modifies the core details of an existing item.

Usage

1
sq_update_item(location, item_id, input_data, 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.

item_id

character; the Square ID assigned to each unique item. This can be found using sq_list_items

input_data

list; data used for creating or updating an object.

verbose

logical; do you want informative messages?

Details

If you want to modify an item's variations, use the Update Variation endpoint instead. If you want to add or remove a modifier list from an item, use the Apply Modifier List and Remove Modifier List endpoints instead. If you want to add or remove a fee from an item, use the Apply Fee and Remove Fee endpoints instead. Required permissions: ITEMS_WRITE.

Value

tbl_df of the updated item record

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
## Not run: 
updated_item_data <- list(name = "API Test Test Test Item")
updated_item <- sq_update_item(location, 
                               item_id="ThisIsATestItemId",
                               updated_cust_data)
# you can confirm the update by retrieving the item
this_item <- sq_get_item(updated_item$id[1])

## End(Not run)

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