btcpay_client/models/
create_lightning_invoice_request.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
11use crate::models::time_span_seconds::TimeSpanSeconds;
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateLightningInvoiceRequest {
16    /// Amount wrapped in a string, represented in a millistatoshi string. (1000 millisatoshi = 1 satoshi)
17    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
18    pub amount: Option<String>,
19    /// Description of the invoice in the BOLT11
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// Description hash of the invoice in the BOLT11
23    #[serde(rename = "descriptionHash", skip_serializing_if = "Option::is_none")]
24    pub description_hash: Option<String>,
25    /// Expiration time in seconds
26    #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")]
27    pub expiry: Option<Box<TimeSpanSeconds>>,
28    /// True if the invoice should include private route hints
29    #[serde(rename = "privateRouteHints", skip_serializing_if = "Option::is_none")]
30    pub private_route_hints: Option<bool>,
31}
32
33impl CreateLightningInvoiceRequest {
34    pub fn new() -> CreateLightningInvoiceRequest {
35        CreateLightningInvoiceRequest {
36            amount: None,
37            description: None,
38            description_hash: None,
39            expiry: None,
40            private_route_hints: None,
41        }
42    }
43}
44
45