Interface IWebhookTransmitter
Interface for implementing transmission of webhooks. Used by webhook plugins and retry processors.
Namespace: SuperOffice.CRM.Webhooks
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public interface IWebhookTransmitter
Methods
CallWebhookAsync(Webhook, WebhookPayload, CancellationToken, int, bool)
Call a webhook
Declaration
Task<WebhookResponse> CallWebhookAsync(Webhook webhook, WebhookPayload eventInfo, CancellationToken cancellationToken, int maxRetries = 3, bool isTest = false)
Parameters
Type | Name | Description |
---|---|---|
Webhook | webhook | |
WebhookPayload | eventInfo | |
CancellationToken | cancellationToken | |
int | maxRetries | |
bool | isTest |
Returns
Type | Description |
---|---|
Task<WebhookResponse> |
Remarks
Responsible for scheduling wailed webooks for retry attempts.
ProcessRetryAttemptAsync(IAsyncQueueProcessItemContext<DelayedItem<RetryWebhook>>, CancellationToken)
Process retry attempts, that has been added to a queue.
Declaration
Task<WebhookResponse> ProcessRetryAttemptAsync(IAsyncQueueProcessItemContext<DelayedItem<RetryWebhook>> context, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAsyncQueueProcessItemContext<DelayedItem<RetryWebhook>> | context | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<WebhookResponse> |