public final class DefaultWebhookSubscriptionsApi extends BaseApi implements WebhookSubscriptionsApi
AUTHENTICATION_KEY, GLOBAL_ERROR_CASES| Constructor and Description |
|---|
DefaultWebhookSubscriptionsApi(io.apimatic.core.GlobalConfiguration globalConfig)
Initializes the controller.
|
getClientInstance, getGlobalConfiguration, getHttpCallbackpublic DefaultWebhookSubscriptionsApi(io.apimatic.core.GlobalConfiguration globalConfig)
globalConfig - Configurations added in client.public ListWebhookEventTypesResponse listWebhookEventTypes(String apiVersion) throws ApiException, IOException
listWebhookEventTypes in interface WebhookSubscriptionsApiapiVersion - Optional parameter: The API version for which to list event types.
Setting this field overrides the default version used by the application.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListWebhookEventTypesResponse> listWebhookEventTypesAsync(String apiVersion)
listWebhookEventTypesAsync in interface WebhookSubscriptionsApiapiVersion - Optional parameter: The API version for which to list event types.
Setting this field overrides the default version used by the application.public ListWebhookSubscriptionsResponse listWebhookSubscriptions(String cursor, Boolean includeDisabled, String sortOrder, Integer limit) throws ApiException, IOException
listWebhookSubscriptions in interface WebhookSubscriptionsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).includeDisabled - Optional parameter: Includes disabled
[Subscription](entity:WebhookSubscription)s. By default, all enabled
[Subscription](entity:WebhookSubscription)s are returned.sortOrder - Optional parameter: Sorts the returned list by when the
[Subscription](entity:WebhookSubscription) was created with the specified order. This
field defaults to ASC.limit - Optional parameter: The maximum number of results to be returned in a single
page. It is possible to receive fewer results than the specified limit on a given
page. The default value of 100 is also the maximum allowed value. Default: 100ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<ListWebhookSubscriptionsResponse> listWebhookSubscriptionsAsync(String cursor, Boolean includeDisabled, String sortOrder, Integer limit)
listWebhookSubscriptionsAsync in interface WebhookSubscriptionsApicursor - Optional parameter: A pagination cursor returned by a previous call to this
endpoint. Provide this to retrieve the next set of results for your original query.
For more information, see
[Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).includeDisabled - Optional parameter: Includes disabled
[Subscription](entity:WebhookSubscription)s. By default, all enabled
[Subscription](entity:WebhookSubscription)s are returned.sortOrder - Optional parameter: Sorts the returned list by when the
[Subscription](entity:WebhookSubscription) was created with the specified order. This
field defaults to ASC.limit - Optional parameter: The maximum number of results to be returned in a single
page. It is possible to receive fewer results than the specified limit on a given
page. The default value of 100 is also the maximum allowed value. Default: 100public CreateWebhookSubscriptionResponse createWebhookSubscription(CreateWebhookSubscriptionRequest body) throws ApiException, IOException
createWebhookSubscription in interface WebhookSubscriptionsApibody - 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<CreateWebhookSubscriptionResponse> createWebhookSubscriptionAsync(CreateWebhookSubscriptionRequest body)
createWebhookSubscriptionAsync in interface WebhookSubscriptionsApibody - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public DeleteWebhookSubscriptionResponse deleteWebhookSubscription(String subscriptionId) throws ApiException, IOException
deleteWebhookSubscription in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to delete.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<DeleteWebhookSubscriptionResponse> deleteWebhookSubscriptionAsync(String subscriptionId)
deleteWebhookSubscriptionAsync in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to delete.public RetrieveWebhookSubscriptionResponse retrieveWebhookSubscription(String subscriptionId) throws ApiException, IOException
retrieveWebhookSubscription in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to retrieve.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.public CompletableFuture<RetrieveWebhookSubscriptionResponse> retrieveWebhookSubscriptionAsync(String subscriptionId)
retrieveWebhookSubscriptionAsync in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to retrieve.public UpdateWebhookSubscriptionResponse updateWebhookSubscription(String subscriptionId, UpdateWebhookSubscriptionRequest body) throws ApiException, IOException
updateWebhookSubscription in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to update.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<UpdateWebhookSubscriptionResponse> updateWebhookSubscriptionAsync(String subscriptionId, UpdateWebhookSubscriptionRequest body)
updateWebhookSubscriptionAsync in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public UpdateWebhookSubscriptionSignatureKeyResponse updateWebhookSubscriptionSignatureKey(String subscriptionId, UpdateWebhookSubscriptionSignatureKeyRequest body) throws ApiException, IOException
updateWebhookSubscriptionSignatureKey in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to update.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<UpdateWebhookSubscriptionSignatureKeyResponse> updateWebhookSubscriptionSignatureKeyAsync(String subscriptionId, UpdateWebhookSubscriptionSignatureKeyRequest body)
updateWebhookSubscriptionSignatureKeyAsync in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to update.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.public TestWebhookSubscriptionResponse testWebhookSubscription(String subscriptionId, TestWebhookSubscriptionRequest body) throws ApiException, IOException
testWebhookSubscription in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to test.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<TestWebhookSubscriptionResponse> testWebhookSubscriptionAsync(String subscriptionId, TestWebhookSubscriptionRequest body)
testWebhookSubscriptionAsync in interface WebhookSubscriptionsApisubscriptionId - Required parameter: [REQUIRED] The ID of the
[Subscription](entity:WebhookSubscription) to test.body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2024. All rights reserved.