btcpay_client/models/
invoice_payment_method_data_model.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 InvoicePaymentMethodDataModel {
16    /// Payment method available for the invoice (e.g., \"BTC\" or \"BTC-LightningNetwork\" or \"BTC-LNURLPAY\")
17    #[serde(rename = "paymentMethod", skip_serializing_if = "Option::is_none")]
18    pub payment_method: Option<String>,
19    /// Crypto code of the payment method (e.g., \"BTC\" or \"LTC\")
20    #[serde(rename = "cryptoCode", skip_serializing_if = "Option::is_none")]
21    pub crypto_code: Option<String>,
22    /// The destination the payment must be made to
23    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
24    pub destination: Option<String>,
25    /// A payment link that helps pay to the payment destination
26    #[serde(rename = "paymentLink", skip_serializing_if = "Option::is_none")]
27    pub payment_link: Option<String>,
28    /// The rate between this payment method's currency and the invoice currency
29    #[serde(rename = "rate", skip_serializing_if = "Option::is_none")]
30    pub rate: Option<String>,
31    /// The amount paid by this payment method
32    #[serde(rename = "paymentMethodPaid", skip_serializing_if = "Option::is_none")]
33    pub payment_method_paid: Option<String>,
34    /// The total amount paid by all payment methods to the invoice, converted to this payment method's currency
35    #[serde(rename = "totalPaid", skip_serializing_if = "Option::is_none")]
36    pub total_paid: Option<String>,
37    /// The total amount left to be paid, converted to this payment method's currency (will be negative if overpaid)
38    #[serde(rename = "due", skip_serializing_if = "Option::is_none")]
39    pub due: Option<String>,
40    /// The invoice amount, converted to this payment method's currency
41    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
42    pub amount: Option<String>,
43    /// The added merchant fee to pay for network costs of this payment method.
44    #[serde(rename = "networkFee", skip_serializing_if = "Option::is_none")]
45    pub network_fee: Option<String>,
46    /// Payments made with this payment method.
47    #[serde(rename = "payments", skip_serializing_if = "Option::is_none")]
48    pub payments: Option<Vec<crate::models::Payment>>,
49    /// If the payment method is activated (when lazy payments option is enabled
50    #[serde(rename = "activated", skip_serializing_if = "Option::is_none")]
51    pub activated: Option<bool>,
52    #[serde(rename = "additionalData", skip_serializing_if = "Option::is_none")]
53    pub additional_data: Option<Box<crate::models::InvoicePaymentMethodDataModelAdditionalData>>,
54}
55
56impl InvoicePaymentMethodDataModel {
57    pub fn new() -> InvoicePaymentMethodDataModel {
58        InvoicePaymentMethodDataModel {
59            payment_method: None,
60            crypto_code: None,
61            destination: None,
62            payment_link: None,
63            rate: None,
64            payment_method_paid: None,
65            total_paid: None,
66            due: None,
67            amount: None,
68            network_fee: None,
69            payments: None,
70            activated: None,
71            additional_data: None,
72        }
73    }
74}
75
76