Skip to main content

ark_rest/models/
withdraw_request.rs

1/*
2 * Ark API
3 *
4 * Combined Ark Service, Indexer, Admin, Signer Manager, and Wallet API
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::Deserialize;
13use serde::Serialize;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WithdrawRequest {
17    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
18    pub address: Option<String>,
19    /// if all=true, amount is ignored and all available balance is withdrawn including connectors
20    /// account funds must be used carefully to not make connectors utxos unspendable, making
21    /// forfeit txs invalid
22    #[serde(rename = "all", skip_serializing_if = "Option::is_none")]
23    pub all: Option<bool>,
24    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
25    pub amount: Option<String>,
26}
27
28impl WithdrawRequest {
29    pub fn new() -> WithdrawRequest {
30        WithdrawRequest {
31            address: None,
32            all: None,
33            amount: None,
34        }
35    }
36}