pub struct WebhooksClient { /* private fields */ }Expand description
Client for webhooks operations.
Implementations§
Source§impl WebhooksClient
impl WebhooksClient
pub fn new(client: Client) -> Self
Sourcepub async fn list_webhooks(
&self,
query: Option<ListWebhooksQuery>,
) -> Result<ListWebhooksResponse, Error>
pub async fn list_webhooks( &self, query: Option<ListWebhooksQuery>, ) -> Result<ListWebhooksResponse, Error>
List all webhooks for the authenticated user’s organization. The results are paginated.
Sourcepub async fn create_webhook(
&self,
body: CreateWebhookRequest,
) -> Result<CreateWebhookResponse, Error>
pub async fn create_webhook( &self, body: CreateWebhookRequest, ) -> Result<CreateWebhookResponse, Error>
Register a new webhook.
Sourcepub async fn get_webhook(
&self,
webhook_id: String,
) -> Result<GetWebhookResponse, Error>
pub async fn get_webhook( &self, webhook_id: String, ) -> Result<GetWebhookResponse, Error>
Retrieve information about a specific webhook.
Sourcepub async fn update_webhook(
&self,
webhook_id: String,
body: UpdateWebhookRequest,
) -> Result<UpdateWebhookResponse, Error>
pub async fn update_webhook( &self, webhook_id: String, body: UpdateWebhookRequest, ) -> Result<UpdateWebhookResponse, Error>
Update the definition of an existing webhook.
Sourcepub async fn delete_webhook(
&self,
webhook_id: String,
) -> Result<DeleteWebhookResponse, Error>
pub async fn delete_webhook( &self, webhook_id: String, ) -> Result<DeleteWebhookResponse, Error>
Deletes an existing webhook registration.
Sourcepub async fn ping_webhook(
&self,
webhook_id: String,
) -> Result<PingWebhookResponse, Error>
pub async fn ping_webhook( &self, webhook_id: String, ) -> Result<PingWebhookResponse, Error>
This endpoint is meant for webhook setup and troubleshooting. Calling the endpoint will trigger a fake test event that will be pushed to the webhook URL. The fake event will not be saved and not appear in further requests to Webhook Events.
Sourcepub async fn get_webhook_event(
&self,
webhook_id: String,
webhook_event_id: String,
) -> Result<GetWebhookEventResponse, Error>
pub async fn get_webhook_event( &self, webhook_id: String, webhook_event_id: String, ) -> Result<GetWebhookEventResponse, Error>
Retrieve a specific webhook event details by its ID.
Sourcepub async fn list_webhook_events(
&self,
webhook_id: String,
query: Option<ListWebhookEventsQuery>,
) -> Result<ListWebhookEventsResponse, Error>
pub async fn list_webhook_events( &self, webhook_id: String, query: Option<ListWebhookEventsQuery>, ) -> Result<ListWebhookEventsResponse, Error>
Lists all events for a given webhook.
Trait Implementations§
Source§impl Clone for WebhooksClient
impl Clone for WebhooksClient
Source§fn clone(&self) -> WebhooksClient
fn clone(&self) -> WebhooksClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WebhooksClient
impl !UnwindSafe for WebhooksClient
impl Freeze for WebhooksClient
impl Send for WebhooksClient
impl Sync for WebhooksClient
impl Unpin for WebhooksClient
impl UnsafeUnpin for WebhooksClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more