btcpay_client/models/
store_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 */
10use crate::models::time_span_seconds::TimeSpanSeconds;
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct StoreData {
16    /// The name of the store
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// The absolute url of the store
20    #[serde(rename = "website", skip_serializing_if = "Option::is_none")]
21    pub website: Option<String>,
22    /// The default currency of the store
23    #[serde(rename = "defaultCurrency", skip_serializing_if = "Option::is_none")]
24    pub default_currency: Option<String>,
25    /// The time after which an invoice is considered expired if not paid. The value will be rounded down to a minute.
26    #[serde(rename = "invoiceExpiration", skip_serializing_if = "Option::is_none")]
27    pub invoice_expiration: Option<Box<TimeSpanSeconds>>,
28    /// The time after which an invoice which has been paid but not confirmed will be considered invalid. The value will be rounded down to a minute.
29    #[serde(rename = "monitoringExpiration", skip_serializing_if = "Option::is_none")]
30    pub monitoring_expiration: Option<Box<TimeSpanSeconds>>,
31    #[serde(rename = "speedPolicy", skip_serializing_if = "Option::is_none")]
32    pub speed_policy: Option<crate::models::SpeedPolicy>,
33    /// The BOLT11 description of the lightning invoice in the checkout. You can use placeholders '{StoreName}', '{ItemDescription}' and '{OrderId}'.
34    #[serde(rename = "lightningDescriptionTemplate", skip_serializing_if = "Option::is_none")]
35    pub lightning_description_template: Option<String>,
36    /// Consider an invoice fully paid, even if the payment is missing 'x' % of the full amount.
37    #[serde(rename = "paymentTolerance", skip_serializing_if = "Option::is_none")]
38    pub payment_tolerance: Option<f64>,
39    /// If true, then no authentication is needed to create invoices on this store.
40    #[serde(rename = "anyoneCanCreateInvoice", skip_serializing_if = "Option::is_none")]
41    pub anyone_can_create_invoice: Option<bool>,
42    /// If true, the checkout page will ask to enter an email address before accessing payment information.
43    #[serde(rename = "requiresRefundEmail", skip_serializing_if = "Option::is_none")]
44    pub requires_refund_email: Option<bool>,
45    #[serde(rename = "receipt", skip_serializing_if = "Option::is_none")]
46    pub receipt: Option<Box<crate::models::ReceiptOptions>>,
47    /// If true, lightning payment methods show amount in satoshi in the checkout page.
48    #[serde(rename = "lightningAmountInSatoshi", skip_serializing_if = "Option::is_none")]
49    pub lightning_amount_in_satoshi: Option<bool>,
50    /// Should private route hints be included in the lightning payment of the checkout page.
51    #[serde(rename = "lightningPrivateRouteHints", skip_serializing_if = "Option::is_none")]
52    pub lightning_private_route_hints: Option<bool>,
53    /// Include lightning invoice fallback to on-chain BIP21 payment url.
54    #[serde(rename = "onChainWithLnInvoiceFallback", skip_serializing_if = "Option::is_none")]
55    pub on_chain_with_ln_invoice_fallback: Option<bool>,
56    /// After successfull payment, should the checkout page redirect the user automatically to the redirect URL of the invoice?
57    #[serde(rename = "redirectAutomatically", skip_serializing_if = "Option::is_none")]
58    pub redirect_automatically: Option<bool>,
59    #[serde(rename = "showRecommendedFee", skip_serializing_if = "Option::is_none")]
60    pub show_recommended_fee: Option<bool>,
61    /// The fee rate recommendation in the checkout page for the on-chain payment to be confirmed after 'x' blocks.
62    #[serde(rename = "recommendedFeeBlockTarget", skip_serializing_if = "Option::is_none")]
63    pub recommended_fee_block_target: Option<i32>,
64    /// The default language to use in the checkout page. (The different translations available are listed [here](https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer/wwwroot/locales)
65    #[serde(rename = "defaultLang", skip_serializing_if = "Option::is_none")]
66    pub default_lang: Option<String>,
67    /// URL to a logo to include in the checkout page.
68    #[serde(rename = "customLogo", skip_serializing_if = "Option::is_none")]
69    pub custom_logo: Option<String>,
70    /// URL to a CSS stylesheet to include in the checkout page
71    #[serde(rename = "customCSS", skip_serializing_if = "Option::is_none")]
72    pub custom_css: Option<String>,
73    /// The HTML title of the checkout page (when you over the tab in your browser)
74    #[serde(rename = "htmlTitle", skip_serializing_if = "Option::is_none")]
75    pub html_title: Option<String>,
76    #[serde(rename = "networkFeeMode", skip_serializing_if = "Option::is_none")]
77    pub network_fee_mode: Option<crate::models::NetworkFeeMode>,
78    /// If true, payjoin will be proposed in the checkout page if possible. ([More information](https://docs.btcpayserver.org/Payjoin/))
79    #[serde(rename = "payJoinEnabled", skip_serializing_if = "Option::is_none")]
80    pub pay_join_enabled: Option<bool>,
81    /// If true, payment methods are enabled individually upon user interaction in the invoice
82    #[serde(rename = "lazyPaymentMethods", skip_serializing_if = "Option::is_none")]
83    pub lazy_payment_methods: Option<bool>,
84    /// The default payment method to load when displaying an invoice. It can be in the format of `BTC_LightningNetwork` to specify Lightning to be the default or `BTC_OnChain`/ `BTC` for on-chain to be the default. 
85    #[serde(rename = "defaultPaymentMethod", skip_serializing_if = "Option::is_none")]
86    pub default_payment_method: Option<String>,
87    /// The id of the store
88    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
89    pub id: Option<String>,
90}
91
92impl StoreData {
93    pub fn new() -> StoreData {
94        StoreData {
95            name: None,
96            website: None,
97            default_currency: None,
98            invoice_expiration: None,
99            monitoring_expiration: None,
100            speed_policy: None,
101            lightning_description_template: None,
102            payment_tolerance: None,
103            anyone_can_create_invoice: None,
104            requires_refund_email: None,
105            receipt: None,
106            lightning_amount_in_satoshi: None,
107            lightning_private_route_hints: None,
108            on_chain_with_ln_invoice_fallback: None,
109            redirect_automatically: None,
110            show_recommended_fee: None,
111            recommended_fee_block_target: None,
112            default_lang: None,
113            custom_logo: None,
114            custom_css: None,
115            html_title: None,
116            network_fee_mode: None,
117            pay_join_enabled: None,
118            lazy_payment_methods: None,
119            default_payment_method: None,
120            id: None,
121        }
122    }
123}
124
125