btcpay_client/models/
pull_payments_create_pull_payment_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 PullPaymentsCreatePullPaymentRequest {
16    /// The name of the pull payment
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// The description of the pull payment
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// The amount in `currency` of this pull payment as a decimal string
23    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
24    pub amount: Option<String>,
25    /// The currency of the amount.
26    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
27    pub currency: Option<String>,
28    /// The length of each period in seconds.
29    #[serde(rename = "period", skip_serializing_if = "Option::is_none")]
30    pub period: Option<i32>,
31    /// If lightning is activated, do not accept BOLT11 invoices with expiration less than … days
32    #[serde(rename = "BOLT11Expiration", skip_serializing_if = "Option::is_none")]
33    pub bolt11_expiration: Option<String>,
34    /// Any payouts created for this pull payment will skip the approval phase upon creation
35    #[serde(rename = "autoApproveClaims", skip_serializing_if = "Option::is_none")]
36    pub auto_approve_claims: Option<bool>,
37    /// When this pull payment is effective. Already started if null or unspecified.
38    #[serde(rename = "startsAt", skip_serializing_if = "Option::is_none")]
39    pub starts_at: Option<i32>,
40    /// When this pull payment expires. Never expires if null or unspecified.
41    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
42    pub expires_at: Option<i32>,
43    /// The list of supported payment methods supported by this pull payment. Available options can be queried from the `StorePaymentMethods_GetStorePaymentMethods` endpoint
44    #[serde(rename = "paymentMethods", skip_serializing_if = "Option::is_none")]
45    pub payment_methods: Option<Vec<String>>,
46}
47
48impl PullPaymentsCreatePullPaymentRequest {
49    pub fn new() -> PullPaymentsCreatePullPaymentRequest {
50        PullPaymentsCreatePullPaymentRequest {
51            name: None,
52            description: None,
53            amount: None,
54            currency: None,
55            period: None,
56            bolt11_expiration: None,
57            auto_approve_claims: None,
58            starts_at: None,
59            expires_at: None,
60            payment_methods: None,
61        }
62    }
63}
64
65