btcpay_client/models/
webhook_event.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 WebhookEvent {
16    /// The delivery id of the webhook
17    #[serde(rename = "deliveryId", skip_serializing_if = "Option::is_none")]
18    pub delivery_id: Option<String>,
19    /// The id of the webhook
20    #[serde(rename = "webhookId", skip_serializing_if = "Option::is_none")]
21    pub webhook_id: Option<String>,
22    /// If this delivery is a redelivery, the is the delivery id of the original delivery.
23    #[serde(rename = "originalDeliveryId", skip_serializing_if = "Option::is_none")]
24    pub original_delivery_id: Option<String>,
25    /// True if this delivery is a redelivery
26    #[serde(rename = "isRedelivery", skip_serializing_if = "Option::is_none")]
27    pub is_redelivery: Option<bool>,
28    /// The type of this event, current available are `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoiceProcessing`, `InvoiceExpired`, `InvoiceSettled`, `InvoiceInvalid`, and `InvoicePaymentSettled`.
29    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
30    pub _type: Option<String>,
31    /// The timestamp when this delivery has been created
32    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
33    pub timestamp: Option<f32>,
34}
35
36impl WebhookEvent {
37    pub fn new() -> WebhookEvent {
38        WebhookEvent {
39            delivery_id: None,
40            webhook_id: None,
41            original_delivery_id: None,
42            is_redelivery: None,
43            _type: None,
44            timestamp: None,
45        }
46    }
47}
48
49