btcpay_client/models/
webhook_invoice_payment_settled_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/// WebhookInvoicePaymentSettledEvent : Callback sent if the `type` is `InvoicePaymentSettled`
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct WebhookInvoicePaymentSettledEvent {
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 payment has been sent after expiration of the invoice
42    #[serde(rename = "afterExpiration", skip_serializing_if = "Option::is_none")]
43    pub after_expiration: Option<bool>,
44    /// What payment method was used for this payment
45    #[serde(rename = "paymentMethod", skip_serializing_if = "Option::is_none")]
46    pub payment_method: Option<String>,
47    #[serde(rename = "payment", skip_serializing_if = "Option::is_none")]
48    pub payment: Option<crate::models::Payment>,
49}
50
51impl WebhookInvoicePaymentSettledEvent {
52    /// Callback sent if the `type` is `InvoicePaymentSettled`
53    pub fn new() -> WebhookInvoicePaymentSettledEvent {
54        WebhookInvoicePaymentSettledEvent {
55            delivery_id: None,
56            webhook_id: None,
57            original_delivery_id: None,
58            is_redelivery: None,
59            _type: None,
60            timestamp: None,
61            store_id: None,
62            invoice_id: None,
63            after_expiration: None,
64            payment_method: None,
65            payment: None,
66        }
67    }
68}
69
70