Struct Webhooks

Source
pub struct Webhooks {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl Webhooks

Source

pub async fn get_user_event_settings( &self, ) -> Result<Response<WebhooksEventWebhookResponse>, ClientError>

Retrieve Event Webhook settings.

This function performs a GET to the /user/webhooks/event/settings endpoint.

This endpoint allows you to retrieve your current event webhook settings.

If an event type is marked as true, then the event webhook will include information about that event.

SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email.

Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn patch_user_event_settings( &self, body: &WebhooksEventWebhookUpdateWithOAuthRequest, ) -> Result<Response<WebhooksEventWebhookResponse>, ClientError>

Update Event Notification Settings.

This function performs a PATCH to the /user/webhooks/event/settings endpoint.

This endpoint allows you to update your current event webhook settings.

If an event type is marked as true, then the event webhook will include information about that event.

SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email.

Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_user_parse_settings( &self, ) -> Result<Response<GetUserWebhooksParseSettingsResponse>, ClientError>

Retrieve all parse settings.

This function performs a GET to the /user/webhooks/parse/settings endpoint.

This endpoint allows you to retrieve all of your current inbound parse settings.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_user_parse_stats( &self, limit: &str, offset: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetUserWebhooksParseStatsResponseData>>, ClientError>

Retrieves Inbound Parse Webhook statistics.

This function performs a GET to the /user/webhooks/parse/stats endpoint.

This endpoint allows you to retrieve the statistics for your Parse Webhook useage.

SendGrid’s Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments.

There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the Library Index.

Parameters:

  • limit: &str – The license key provided with your New Relic account.
  • offset: &str – The license key provided with your New Relic account.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD.
  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn get_all_user_parse_stats( &self, offset: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetUserWebhooksParseStatsResponseData>>, ClientError>

Retrieves Inbound Parse Webhook statistics.

This function performs a GET to the /user/webhooks/parse/stats endpoint.

As opposed to get_user_parse_stats, this function returns all the pages of the request at once.

This endpoint allows you to retrieve the statistics for your Parse Webhook useage.

SendGrid’s Inbound Parse Webhook allows you to parse the contents and attachments of incomming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments.

There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the Library Index.

Source

pub async fn get_user_event_settings_signed( &self, ) -> Result<Response<GetUserWebhooksEventSettingsSignedResponse>, ClientError>

Retrieve Signed Webhook Public Key.

This function performs a GET to the /user/webhooks/event/settings/signed endpoint.

This endpoint allows you to retrieve your signed webhook’s public key.

Once you have enabled signing of the Event Webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can retrieve the public key from this endpoint at any time.

For more information about cryptographically signing the Event Webhook, see Getting Started with the Event Webhook Security Features.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn patch_user_event_settings_signed( &self, body: &GetTrackingSettingsOpenResponse, ) -> Result<Response<GetUserWebhooksEventSettingsSignedResponse>, ClientError>

Enable/Disable Signed Webhook.

This function performs a PATCH to the /user/webhooks/event/settings/signed endpoint.

This endpoint allows you to enable or disable signing of the Event Webhook.

This endpoint takes a single boolean request parameter, enabled. You may either enable or disable signing of the Event Webhook using this endpoint. Once enabled, you can retrieve your public key using the /webhooks/event/settings/signed endpoint.

For more information about cryptographically signing the Event Webhook, see Getting Started with the Event Webhook Security Features.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
Source

pub async fn post_user_event_test( &self, body: &PostUserWebhooksEventTestRequest, ) -> Result<Response<()>, ClientError>

Test Event Notification Settings.

This function performs a POST to the /user/webhooks/event/test endpoint.

This endpoint allows you to test your event webhook by sending a fake event notification post to the provided URL.

SendGrid’s Event Webhook will notify a URL of your choice via HTTP POST with information about events that occur as SendGrid processes your email.

Common uses of this data are to remove unsubscribes, react to spam reports, determine unengaged recipients, identify bounced email addresses, or create advanced analytics of your email program.

Tip: Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry.

If your web server does not return a 2xx response type, we will retry a POST request until we receive a 2xx response or the maximum time of 10 minutes has expired.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T