upsertSnippet method

Future<Snippet> upsertSnippet({
  1. required Snippet snippet,
  2. String? authToken,
})

Adds a snippet to a Square Online site or updates the existing snippet on the site.

The snippet code is appended to the end of the head element on every page of the site, except checkout pages. A snippet application can add one snippet to a given site.

You can call ListSites to get the IDs of the sites that belong to a seller.

Implementation

Future<Snippet> upsertSnippet({
  required Snippet snippet,
  String? authToken,
}) async {
  return _onlineService.upsertSnippet(snippet: snippet, authToken: authToken);
}