btcpay_client/models/
invoice_metadata.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/// InvoiceMetadata : Additional information around the invoice that can be supplied. The mentioned properties are all optional and you can introduce any json format you wish.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct InvoiceMetadata {
17    /// You can use this property to store the ID of an external system. We allow you to search in the invoice list based on this ID.
18    #[serde(rename = "orderId", skip_serializing_if = "Option::is_none")]
19    pub order_id: Option<String>,
20    /// You can use this property to store the URL to the order of an external system. This makes navigating to the order easier.
21    #[serde(rename = "orderUrl", skip_serializing_if = "Option::is_none")]
22    pub order_url: Option<String>,
23    #[serde(rename = "posData", skip_serializing_if = "Option::is_none")]
24    pub pos_data: Option<String>, // Could not be rendered
25    #[serde(rename = "buyerName", skip_serializing_if = "Option::is_none")]
26    pub buyer_name: Option<String>,
27    #[serde(rename = "buyerEmail", skip_serializing_if = "Option::is_none")]
28    pub buyer_email: Option<String>,
29    #[serde(rename = "buyerCountry", skip_serializing_if = "Option::is_none")]
30    pub buyer_country: Option<String>,
31    #[serde(rename = "buyerZip", skip_serializing_if = "Option::is_none")]
32    pub buyer_zip: Option<String>,
33    #[serde(rename = "buyerState", skip_serializing_if = "Option::is_none")]
34    pub buyer_state: Option<String>,
35    #[serde(rename = "buyerCity", skip_serializing_if = "Option::is_none")]
36    pub buyer_city: Option<String>,
37    #[serde(rename = "buyerAddress1", skip_serializing_if = "Option::is_none")]
38    pub buyer_address1: Option<String>,
39    #[serde(rename = "buyerAddress2", skip_serializing_if = "Option::is_none")]
40    pub buyer_address2: Option<String>,
41    #[serde(rename = "buyerPhone", skip_serializing_if = "Option::is_none")]
42    pub buyer_phone: Option<String>,
43    #[serde(rename = "itemDesc", skip_serializing_if = "Option::is_none")]
44    pub item_desc: Option<String>,
45    #[serde(rename = "itemCode", skip_serializing_if = "Option::is_none")]
46    pub item_code: Option<String>,
47    #[serde(rename = "physical", skip_serializing_if = "Option::is_none")]
48    pub physical: Option<String>,
49    #[serde(rename = "taxIncluded", skip_serializing_if = "Option::is_none")]
50    pub tax_included: Option<f32>,
51}
52
53impl InvoiceMetadata {
54    /// Additional information around the invoice that can be supplied. The mentioned properties are all optional and you can introduce any json format you wish.
55    pub fn new() -> InvoiceMetadata {
56        InvoiceMetadata {
57            order_id: None,
58            order_url: None,
59            pos_data: None,
60            buyer_name: None,
61            buyer_email: None,
62            buyer_country: None,
63            buyer_zip: None,
64            buyer_state: None,
65            buyer_city: None,
66            buyer_address1: None,
67            buyer_address2: None,
68            buyer_phone: None,
69            item_desc: None,
70            item_code: None,
71            physical: None,
72            tax_included: None,
73        }
74    }
75}
76
77