Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.14 KB

webhooks.md

File metadata and controls

53 lines (39 loc) · 1.14 KB

Webhooks

The stores endpoint allows you to retrieve information about the stores associated with the API key you are using. You can find the LemonSqueezy link here

Retrieve Webhooks

use lemonsqueezy::webhook::Webhook;

let webhook = Webhook::build(lemonsqueezy);
let webhook = webhook.retrieve(123).await.unwrap();

Get All Webhooks

use lemonsqueezy::webhook::Webhook;

let webhook = Webhook::build(lemonsqueezy);
let webhook = webhook.get_all(None).await.unwrap();

Delete a Webhook

use lemonsqueezy::webhook::Webhook;

let webhook = Webhook::build(lemonsqueezy);
let webhook = webhook.delete(123).await.unwrap();

Update a Webhook

use lemonsqueezy::webhook::Webhook;
let webhook = Webhook::build(lemonsqueezy);
let webhook = webhook.update(data).await;

Create Webhook

use lemonsqueezy::webhook::Webhook;
use lemonsqueezy::types::webhook::*;

let webhook = Webhook::build(lemonsqueezy);
let webhook = webhook.create(CreateWebhook {
   store_id: 1,
    // ..
}).await;

Quick Links