pub struct Webhooks { /* private fields */ }Expand description
Webhook helpers on the client. Get it with Wellfriend::webhooks.
Implementations§
Source§impl Webhooks
impl Webhooks
Sourcepub fn with_options(self, options: RequestOptions) -> Self
pub fn with_options(self, options: RequestOptions) -> Self
The same handle with these options for every call made through it.
Sourcepub fn verify(
&self,
payload: &[u8],
headers: impl WebhookHeaders,
secret: &str,
) -> Result<WebhookEvent>
pub fn verify( &self, payload: &[u8], headers: impl WebhookHeaders, secret: &str, ) -> Result<WebhookEvent>
Verifies a delivery locally; the same as verify_webhook.
Source§impl Webhooks
impl Webhooks
Sourcepub async fn verify_remote(
&self,
body: Option<WebhooksVerifyRemoteRequest>,
) -> Result<Object>
pub async fn verify_remote( &self, body: Option<WebhooksVerifyRemoteRequest>, ) -> Result<Object>
Verify a Standard Webhooks signature
POST /api/v2/webhooks/verify
Sourcepub async fn endpoints_create(
&self,
body: WebhooksEndpointsCreateRequest,
) -> Result<Object>
pub async fn endpoints_create( &self, body: WebhooksEndpointsCreateRequest, ) -> Result<Object>
Create a signed webhook endpoint
POST /api/v2/webhook-endpoints
Sourcepub async fn endpoints_list(
&self,
params: Option<ListParams>,
) -> Result<Page<Object>>
pub async fn endpoints_list( &self, params: Option<ListParams>, ) -> Result<Page<Object>>
List signed webhook endpoints
GET /api/v2/webhook-endpoints
Sourcepub fn endpoints_stream(&self, params: Option<ListParams>) -> PageStream<Object>
pub fn endpoints_stream(&self, params: Option<ListParams>) -> PageStream<Object>
Every item of endpoints_list, fetching further pages as the stream is read.
Sourcepub async fn endpoints_get(
&self,
endpoint_id: &str,
) -> Result<WebhooksEndpointsGetResponse>
pub async fn endpoints_get( &self, endpoint_id: &str, ) -> Result<WebhooksEndpointsGetResponse>
Get a signed webhook endpoint
GET /api/v2/webhook-endpoints/{endpointId}
Sourcepub async fn endpoints_update(
&self,
endpoint_id: &str,
body: Option<WebhooksEndpointsUpdateRequest>,
) -> Result<WebhooksEndpointsGetResponse>
pub async fn endpoints_update( &self, endpoint_id: &str, body: Option<WebhooksEndpointsUpdateRequest>, ) -> Result<WebhooksEndpointsGetResponse>
Update a signed webhook endpoint
PATCH /api/v2/webhook-endpoints/{endpointId}
Sourcepub async fn endpoints_delete(
&self,
endpoint_id: &str,
body: WebhooksEndpointsDeleteRequest,
) -> Result<WebhooksEndpointsDeleteResponse>
pub async fn endpoints_delete( &self, endpoint_id: &str, body: WebhooksEndpointsDeleteRequest, ) -> Result<WebhooksEndpointsDeleteResponse>
Delete a signed webhook endpoint
DELETE /api/v2/webhook-endpoints/{endpointId}
Sourcepub async fn endpoints_test(
&self,
endpoint_id: &str,
body: WebhooksEndpointsTestRequest,
) -> Result<Object>
pub async fn endpoints_test( &self, endpoint_id: &str, body: WebhooksEndpointsTestRequest, ) -> Result<Object>
Queue a webhook endpoint test
POST /api/v2/webhook-endpoints/{endpointId}/test
Sourcepub async fn deliveries_list(
&self,
params: Option<ListParams>,
) -> Result<Page<WebhooksDeliveriesListItem>>
pub async fn deliveries_list( &self, params: Option<ListParams>, ) -> Result<Page<WebhooksDeliveriesListItem>>
Inspect webhook deliveries
GET /api/v2/webhook-deliveries
Sourcepub fn deliveries_stream(
&self,
params: Option<ListParams>,
) -> PageStream<WebhooksDeliveriesListItem>
pub fn deliveries_stream( &self, params: Option<ListParams>, ) -> PageStream<WebhooksDeliveriesListItem>
Every item of deliveries_list, fetching further pages as the stream is read.
Sourcepub async fn deliveries_replay(
&self,
delivery_id: &str,
body: Option<WebhooksDeliveriesReplayRequest>,
) -> Result<Object>
pub async fn deliveries_replay( &self, delivery_id: &str, body: Option<WebhooksDeliveriesReplayRequest>, ) -> Result<Object>
Replay a webhook delivery
POST /api/v2/webhook-deliveries/{deliveryId}/replay
Sourcepub async fn endpoints_rotate_secret(
&self,
endpoint_id: &str,
body: Option<WebhooksEndpointsRotateSecretRequest>,
) -> Result<WebhooksEndpointsRotateSecretResponse>
pub async fn endpoints_rotate_secret( &self, endpoint_id: &str, body: Option<WebhooksEndpointsRotateSecretRequest>, ) -> Result<WebhooksEndpointsRotateSecretResponse>
Rotate a webhook signing secret
POST /api/v2/webhook-endpoints/{endpointId}/rotate-secret
Sourcepub async fn endpoints_replay(
&self,
endpoint_id: &str,
body: WebhooksEndpointsReplayRequest,
) -> Result<WebhooksEndpointsReplayResponse>
pub async fn endpoints_replay( &self, endpoint_id: &str, body: WebhooksEndpointsReplayRequest, ) -> Result<WebhooksEndpointsReplayResponse>
Replay an endpoint’s failed webhook deliveries
POST /api/v2/webhook-endpoints/{endpointId}/replay
Sourcepub async fn endpoints_insights(
&self,
endpoint_id: &str,
) -> Result<WebhooksEndpointsInsightsResponse>
pub async fn endpoints_insights( &self, endpoint_id: &str, ) -> Result<WebhooksEndpointsInsightsResponse>
Inspect a webhook endpoint’s health, signing keys and activity
GET /api/v2/webhook-endpoints/{endpointId}/insights
Sourcepub async fn deliveries_get(
&self,
delivery_id: &str,
) -> Result<WebhooksDeliveriesGetResponse>
pub async fn deliveries_get( &self, delivery_id: &str, ) -> Result<WebhooksDeliveriesGetResponse>
Inspect one webhook delivery and its attempts
GET /api/v2/webhook-deliveries/{deliveryId}