pub struct WebhookSubscriptionsApi { /* private fields */ }Implementations§
Source§impl WebhookSubscriptionsApi
impl WebhookSubscriptionsApi
Sourcepub fn new(square_client: SquareClient) -> WebhookSubscriptionsApi
pub fn new(square_client: SquareClient) -> WebhookSubscriptionsApi
Instantiates a new WebhookSubscriptionsApi
Sourcepub async fn list_webhook_event_types(
&self,
api_version: &Option<String>,
) -> Result<ListWebhookEventTypesResponse, SquareApiError>
pub async fn list_webhook_event_types( &self, api_version: &Option<String>, ) -> Result<ListWebhookEventTypesResponse, SquareApiError>
Lists all webhook event types that can be subscribed to.
Sourcepub async fn list_webhook_subscriptions(
&self,
params: &ListWebhookSubscriptionsParams,
) -> Result<ListWebhookSubscriptionsResponse, SquareApiError>
pub async fn list_webhook_subscriptions( &self, params: &ListWebhookSubscriptionsParams, ) -> Result<ListWebhookSubscriptionsResponse, SquareApiError>
Lists all webhook subscriptions owned by your application.
Sourcepub async fn create_webhook_subscription(
&self,
body: &CreateWebhookSubscriptionRequest,
) -> Result<CreateWebhookSubscriptionResponse, SquareApiError>
pub async fn create_webhook_subscription( &self, body: &CreateWebhookSubscriptionRequest, ) -> Result<CreateWebhookSubscriptionResponse, SquareApiError>
Creates a webhook subscription.
Sourcepub async fn delete_webhook_subscription(
&self,
subscription_id: impl AsRef<str>,
) -> Result<DeleteWebhookSubscriptionResponse, SquareApiError>
pub async fn delete_webhook_subscription( &self, subscription_id: impl AsRef<str>, ) -> Result<DeleteWebhookSubscriptionResponse, SquareApiError>
Deletes a webhook subscription identified by its ID.
Sourcepub async fn retrieve_webhook_subscription(
&self,
subscription_id: impl AsRef<str>,
) -> Result<RetrieveWebhookSubscriptionResponse, SquareApiError>
pub async fn retrieve_webhook_subscription( &self, subscription_id: impl AsRef<str>, ) -> Result<RetrieveWebhookSubscriptionResponse, SquareApiError>
Retrieves a webhook subscription identified by its ID.
Sourcepub async fn update_webhook_subscription(
&self,
subscription_id: impl AsRef<str>,
body: &UpdateWebhookSubscriptionRequest,
) -> Result<UpdateWebhookSubscriptionResponse, SquareApiError>
pub async fn update_webhook_subscription( &self, subscription_id: impl AsRef<str>, body: &UpdateWebhookSubscriptionRequest, ) -> Result<UpdateWebhookSubscriptionResponse, SquareApiError>
Updates a webhook subscription.
Sourcepub async fn update_webhook_subscription_signature_key(
&self,
subscription_id: impl AsRef<str>,
body: &UpdateWebhookSubscriptionSignatureKeyRequest,
) -> Result<UpdateWebhookSubscriptionSignatureKeyResponse, SquareApiError>
pub async fn update_webhook_subscription_signature_key( &self, subscription_id: impl AsRef<str>, body: &UpdateWebhookSubscriptionSignatureKeyRequest, ) -> Result<UpdateWebhookSubscriptionSignatureKeyResponse, SquareApiError>
Updates a webhook subscription by replacing the existing signature key with a new one.
Sourcepub async fn test_webhook_subscription(
&self,
subscription_id: impl AsRef<str>,
body: &TestWebhookSubscriptionRequest,
) -> Result<TestWebhookSubscriptionResponse, SquareApiError>
pub async fn test_webhook_subscription( &self, subscription_id: impl AsRef<str>, body: &TestWebhookSubscriptionRequest, ) -> Result<TestWebhookSubscriptionResponse, SquareApiError>
Tests a webhook subscription by sending a test event to the notification URL.
Auto Trait Implementations§
impl Freeze for WebhookSubscriptionsApi
impl !RefUnwindSafe for WebhookSubscriptionsApi
impl Send for WebhookSubscriptionsApi
impl Sync for WebhookSubscriptionsApi
impl Unpin for WebhookSubscriptionsApi
impl !UnwindSafe for WebhookSubscriptionsApi
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