btcpay_client/models/
create_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
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateInvoiceRequest {
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 amount of the invoice. If null or unspecified, the invoice will be a top-up invoice. (ie. The invoice will consider any payment as a full payment)
23    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
24    pub amount: Option<String>,
25    /// The currency of the invoice (if null, empty or unspecified, the currency will be the store's settings default)'
26    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
27    pub currency: Option<String>,
28    /// Additional search term to help you find this invoice via text search
29    #[serde(rename = "additionalSearchTerms", skip_serializing_if = "Option::is_none")]
30    pub additional_search_terms: Option<Vec<String>>,
31}
32
33impl CreateInvoiceRequest {
34    pub fn new() -> CreateInvoiceRequest {
35        CreateInvoiceRequest {
36            metadata: None,
37            checkout: None,
38            receipt: None,
39            amount: None,
40            currency: None,
41            additional_search_terms: None,
42        }
43    }
44}
45
46