1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* BTCPay Greenfield API
*
* A full API to use your BTCPay Server
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct WebhookEvent {
/// The delivery id of the webhook
#[serde(rename = "deliveryId", skip_serializing_if = "Option::is_none")]
pub delivery_id: Option<String>,
/// The id of the webhook
#[serde(rename = "webhookId", skip_serializing_if = "Option::is_none")]
pub webhook_id: Option<String>,
/// If this delivery is a redelivery, the is the delivery id of the original delivery.
#[serde(rename = "originalDeliveryId", skip_serializing_if = "Option::is_none")]
pub original_delivery_id: Option<String>,
/// True if this delivery is a redelivery
#[serde(rename = "isRedelivery", skip_serializing_if = "Option::is_none")]
pub is_redelivery: Option<bool>,
/// The type of this event, current available are `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoiceProcessing`, `InvoiceExpired`, `InvoiceSettled`, `InvoiceInvalid`, and `InvoicePaymentSettled`.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub _type: Option<String>,
/// The timestamp when this delivery has been created
#[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f32>,
}
impl WebhookEvent {
pub fn new() -> WebhookEvent {
WebhookEvent {
delivery_id: None,
webhook_id: None,
original_delivery_id: None,
is_redelivery: None,
_type: None,
timestamp: None,
}
}
}