btcpay_client/models/
webhook_invoice_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#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct WebhookInvoiceEvent {
13    /// The delivery id of the webhook
14    #[serde(rename = "deliveryId", skip_serializing_if = "Option::is_none")]
15    pub delivery_id: Option<String>,
16    /// The id of the webhook
17    #[serde(rename = "webhookId", skip_serializing_if = "Option::is_none")]
18    pub webhook_id: Option<String>,
19    /// If this delivery is a redelivery, the is the delivery id of the original delivery.
20    #[serde(rename = "originalDeliveryId", skip_serializing_if = "Option::is_none")]
21    pub original_delivery_id: Option<String>,
22    /// True if this delivery is a redelivery
23    #[serde(rename = "isRedelivery", skip_serializing_if = "Option::is_none")]
24    pub is_redelivery: Option<bool>,
25    /// The type of this event, current available are `InvoiceCreated`, `InvoiceReceivedPayment`, `InvoiceProcessing`, `InvoiceExpired`, `InvoiceSettled`, `InvoiceInvalid`, and `InvoicePaymentSettled`.
26    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
27    pub _type: Option<String>,
28    /// The timestamp when this delivery has been created
29    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
30    pub timestamp: Option<f32>,
31    /// The store id of the invoice's event
32    #[serde(rename = "storeId", skip_serializing_if = "Option::is_none")]
33    pub store_id: Option<String>,
34    /// The invoice id of the invoice's event
35    #[serde(rename = "invoiceId", skip_serializing_if = "Option::is_none")]
36    pub invoice_id: Option<String>,
37}
38
39impl WebhookInvoiceEvent {
40    pub fn new() -> WebhookInvoiceEvent {
41        WebhookInvoiceEvent {
42            delivery_id: None,
43            webhook_id: None,
44            original_delivery_id: None,
45            is_redelivery: None,
46            _type: None,
47            timestamp: None,
48            store_id: None,
49            invoice_id: None,
50        }
51    }
52}
53
54