public final class DefaultSnippetsApi extends BaseApi implements SnippetsApi
BaseApi.RequestExecutor, BaseApi.RequestSupplier, BaseApi.ResponseHandler<T>authManagers, config, httpCallback, internalUserAgent| Constructor and Description |
|---|
DefaultSnippetsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers)
Initializes the controller.
|
DefaultSnippetsApi(Configuration config,
HttpClient httpClient,
Map<String,AuthManager> authManagers,
HttpCallback httpCallback)
Initializes the controller with HTTPCallback.
|
| Modifier and Type | Method and Description |
|---|---|
DeleteSnippetResponse |
deleteSnippet(String siteId)
Removes your snippet from a Square Online site.
|
CompletableFuture<DeleteSnippetResponse> |
deleteSnippetAsync(String siteId)
Removes your snippet from a Square Online site.
|
RetrieveSnippetResponse |
retrieveSnippet(String siteId)
Retrieves your snippet from a Square Online site.
|
CompletableFuture<RetrieveSnippetResponse> |
retrieveSnippetAsync(String siteId)
Retrieves your snippet from a Square Online site.
|
UpsertSnippetResponse |
upsertSnippet(String siteId,
UpsertSnippetRequest body)
Adds a snippet to a Square Online site or updates the existing snippet on the site.
|
CompletableFuture<UpsertSnippetResponse> |
upsertSnippetAsync(String siteId,
UpsertSnippetRequest body)
Adds a snippet to a Square Online site or updates the existing snippet on the site.
|
getClientInstance, getHttpCallback, makeHttpCallAsync, validateResponsepublic DefaultSnippetsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.public DefaultSnippetsApi(Configuration config, HttpClient httpClient, Map<String,AuthManager> authManagers, HttpCallback httpCallback)
config - Configurations added in client.httpClient - Send HTTP requests and read the responses.authManagers - Apply authorization to requests.httpCallback - Callback to be called before and after the HTTP call.public DeleteSnippetResponse deleteSnippet(String siteId) throws ApiException, IOException
deleteSnippet in interface SnippetsApisiteId - Required parameter: The ID of the site that contains the snippet.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteSnippetResponse> deleteSnippetAsync(String siteId)
deleteSnippetAsync in interface SnippetsApisiteId - Required parameter: The ID of the site that contains the snippet.public RetrieveSnippetResponse retrieveSnippet(String siteId) throws ApiException, IOException
retrieveSnippet in interface SnippetsApisiteId - Required parameter: The ID of the site that contains the snippet.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveSnippetResponse> retrieveSnippetAsync(String siteId)
retrieveSnippetAsync in interface SnippetsApisiteId - Required parameter: The ID of the site that contains the snippet.public UpsertSnippetResponse upsertSnippet(String siteId, UpsertSnippetRequest body) throws ApiException, IOException
upsertSnippet in interface SnippetsApisiteId - Required parameter: The ID of the site where you want to add or update the
snippet.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<UpsertSnippetResponse> upsertSnippetAsync(String siteId, UpsertSnippetRequest body)
upsertSnippetAsync in interface SnippetsApisiteId - Required parameter: The ID of the site where you want to add or update the
snippet.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2022. All rights reserved.