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 WithdrawalResultData {
    /// The asset that is being withdrawn.
    #[serde(rename = "asset", skip_serializing_if = "Option::is_none")]
    pub asset: Option<String>,
    /// The payment method that is used (crypto code + network).
    #[serde(rename = "paymentMethod", skip_serializing_if = "Option::is_none")]
    pub payment_method: Option<String>,
    /// The asset entries that were changed during the withdrawal. The first item is always the withdrawal itself. It could also includes ledger entries for the costs and may include credits or exchange tokens to give a discount.
    #[serde(rename = "ledgerEntries", skip_serializing_if = "Option::is_none")]
    pub ledger_entries: Option<Vec<crate::models::LedgerEntryData>>,
    /// The unique ID of the withdrawal used by the exchange.
    #[serde(rename = "withdrawalId", skip_serializing_if = "Option::is_none")]
    pub withdrawal_id: Option<String>,
    /// The unique ID of the custodian account used.
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    /// The code of the custodian used.
    #[serde(rename = "custodianCode", skip_serializing_if = "Option::is_none")]
    pub custodian_code: Option<String>,
    /// The status of the withdrawal: 'Queued', 'Complete', 'Failed' or 'Unknown'.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// The transaction ID on the blockchain once the withdrawal has been executed.
    #[serde(rename = "transactionId", skip_serializing_if = "Option::is_none")]
    pub transaction_id: Option<String>,
    /// The address where the funds were sent to once the withdrawal has been executed.
    #[serde(rename = "targetAddress", skip_serializing_if = "Option::is_none")]
    pub target_address: Option<String>,
}

impl WithdrawalResultData {
    pub fn new() -> WithdrawalResultData {
        WithdrawalResultData {
            asset: None,
            payment_method: None,
            ledger_entries: None,
            withdrawal_id: None,
            account_id: None,
            custodian_code: None,
            status: None,
            transaction_id: None,
            target_address: None,
        }
    }
}