btcpay_client/models/webhook_data_create_all_of.rs
1/*
2 * BTCPay Greenfield API
3 *
4 * A full API to use your BTCPay Server
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct WebhookDataCreateAllOf {
16 /// Must be used by the callback receiver to ensure the delivery comes from BTCPay Server. BTCPay Server includes the `BTCPay-Sig` HTTP header, whose format is `sha256=HMAC256(UTF8(webhook's secret), body)`. The pattern to authenticate the webhook is similar to [how to secure webhooks in Github](https://docs.github.com/webhooks/securing/).
17 #[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
18 pub secret: Option<String>,
19}
20
21impl WebhookDataCreateAllOf {
22 pub fn new() -> WebhookDataCreateAllOf {
23 WebhookDataCreateAllOf {
24 secret: None,
25 }
26 }
27}
28
29