Package ru.loolzaaa.youkassa.processors
Class WebhookProcessor
java.lang.Object
ru.loolzaaa.youkassa.processors.WebhookProcessor
Processor for
Webhook entity.
Webhook is a mechanism for automatically
notifying your system about events
that happen to created objects.
For example, YooKassa can tell you
when a payment object created in your application
enters the waiting_for_capture status.
Using the API, you can set up a webhook (create, delete, view the list of created ones) for the passed OAuth token.
Use ApiClient for API server communication.
- API Note:
- Authentication by OAuth token only. Available through the Partner API
-
Constructor Details
-
WebhookProcessor
public WebhookProcessor()
-
-
Method Details
-
findAll
Receive information about all existing webhooks.Can be used only if OAuth authentication method configured.
- Returns:
- listed webhook entities
- See Also:
-
create
Creates newWebhookentity with certain parameters.Generate random idempotency key if corresponding argument is null.
Can be used only if OAuth authentication method configured.
- Parameters:
webhookParams- parameters for new webhookidempotencyKey- idempotency key- Returns:
- new webhook entity
- Throws:
IllegalArgumentException- if webhook parameters is null
-
removeById
Remove already existingWebhookby its identifier.Generate random idempotency key if corresponding argument is null.
- Parameters:
webhookId- webhook identifier to be removedidempotencyKey- idempotency key- Returns:
- webhook entity
- Throws:
IllegalArgumentException- if webhook identifier is null or empty
-