public final class DefaultSnippetsApi extends BaseApi implements SnippetsApi
AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultSnippetsApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
| 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, getGlobalConfiguration, getHttpCallbackpublic DefaultSnippetsApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.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 © 2023. All rights reserved.