btcpay_client/models/
lightning_invoice_data.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 LightningInvoiceData {
16    /// The invoice's ID
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
20    pub status: Option<crate::models::LightningInvoiceStatus>,
21    /// The BOLT11 representation of the invoice
22    #[serde(rename = "BOLT11", skip_serializing_if = "Option::is_none")]
23    pub bolt11: Option<String>,
24    /// The unix timestamp when the invoice got paid
25    #[serde(rename = "paidAt", skip_serializing_if = "Option::is_none")]
26    pub paid_at: Option<f32>,
27    /// The unix timestamp when the invoice expires
28    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
29    pub expires_at: Option<f32>,
30    /// The amount of the invoice in millisatoshi
31    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
32    pub amount: Option<String>,
33    /// The amount received in millisatoshi
34    #[serde(rename = "amountReceived", skip_serializing_if = "Option::is_none")]
35    pub amount_received: Option<String>,
36}
37
38impl LightningInvoiceData {
39    pub fn new() -> LightningInvoiceData {
40        LightningInvoiceData {
41            id: None,
42            status: None,
43            bolt11: None,
44            paid_at: None,
45            expires_at: None,
46            amount: None,
47            amount_received: None,
48        }
49    }
50}
51
52