btcpay-client 0.1.0

A client library for BTCPay Server.
Documentation
/*
 * BTCPay Greenfield API
 *
 * A full API to use your BTCPay Server
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreateOnChainTransactionRequestDestination {
    /// A wallet address or a BIP21 payment link
    #[serde(rename = "destination", skip_serializing_if = "Option::is_none")]
    pub destination: Option<String>,
    /// The amount to send. If `destination` is a BIP21 link, the amount must be the same or null.
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<String>,
    /// Whether to subtract the transaction fee from the provided amount. This makes the receiver receive less, or in other words: he or she pays the transaction fee. Also useful if you want to clear out your wallet. Must be false if `destination` is a BIP21 link
    #[serde(rename = "subtractFromAmount", skip_serializing_if = "Option::is_none")]
    pub subtract_from_amount: Option<bool>,
}

impl CreateOnChainTransactionRequestDestination {
    pub fn new() -> CreateOnChainTransactionRequestDestination {
        CreateOnChainTransactionRequestDestination {
            destination: None,
            amount: None,
            subtract_from_amount: None,
        }
    }
}