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