btcpay_client/models/
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 InvoiceData {
16    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
17    pub metadata: Option<Box<crate::models::InvoiceMetadata>>,
18    #[serde(rename = "checkout", skip_serializing_if = "Option::is_none")]
19    pub checkout: Option<Box<crate::models::CheckoutOptions>>,
20    #[serde(rename = "receipt", skip_serializing_if = "Option::is_none")]
21    pub receipt: Option<Box<crate::models::ReceiptOptions>>,
22    /// The identifier of the invoice
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<String>,
25    /// The store identifier that the invoice belongs to
26    #[serde(rename = "storeId", skip_serializing_if = "Option::is_none")]
27    pub store_id: Option<String>,
28    /// The amount of the invoice
29    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
30    pub amount: Option<String>,
31    /// The currency of the invoice
32    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
33    pub currency: Option<String>,
34    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
35    pub _type: Option<crate::models::InvoiceType>,
36    /// The link to the checkout page, where you can redirect the customer
37    #[serde(rename = "checkoutLink", skip_serializing_if = "Option::is_none")]
38    pub checkout_link: Option<String>,
39    /// The creation time of the invoice
40    #[serde(rename = "createdTime", skip_serializing_if = "Option::is_none")]
41    pub created_time: Option<f32>,
42    /// The expiration time of the invoice
43    #[serde(rename = "expirationTime", skip_serializing_if = "Option::is_none")]
44    pub expiration_time: Option<f32>,
45    /// The monitoring time of the invoice
46    #[serde(rename = "monitoringTime", skip_serializing_if = "Option::is_none")]
47    pub monitoring_time: Option<f32>,
48    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
49    pub status: Option<crate::models::InvoiceStatus>,
50    #[serde(rename = "additionalStatus", skip_serializing_if = "Option::is_none")]
51    pub additional_status: Option<crate::models::InvoiceAdditionalStatus>,
52    /// The statuses the invoice can be manually marked as
53    #[serde(rename = "availableStatusesForManualMarking", skip_serializing_if = "Option::is_none")]
54    pub available_statuses_for_manual_marking: Option<Vec<crate::models::InvoiceStatus>>,
55    /// true if the invoice is archived
56    #[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
57    pub archived: Option<bool>,
58}
59
60impl InvoiceData {
61    pub fn new() -> InvoiceData {
62        InvoiceData {
63            metadata: None,
64            checkout: None,
65            receipt: None,
66            id: None,
67            store_id: None,
68            amount: None,
69            currency: None,
70            _type: None,
71            checkout_link: None,
72            created_time: None,
73            expiration_time: None,
74            monitoring_time: None,
75            status: None,
76            additional_status: None,
77            available_statuses_for_manual_marking: None,
78            archived: None,
79        }
80    }
81}
82
83