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 TradeResultData {
    /// The asset to trade.
    #[serde(rename = "fromAsset", skip_serializing_if = "Option::is_none")]
    pub from_asset: Option<String>,
    /// The asset you want.
    #[serde(rename = "toAsset", skip_serializing_if = "Option::is_none")]
    pub to_asset: Option<String>,
    /// The asset entries that were changed during the trade. This is an array of at least 2 items with the asset sold and the asset gained. It may also include ledger entries for the costs of the trade and possibly exchange tokens used.
    #[serde(rename = "ledgerEntries", skip_serializing_if = "Option::is_none")]
    pub ledger_entries: Option<Vec<crate::models::LedgerEntryData>>,
    /// The unique ID of the trade used by the exchange. This ID can be used to get the details of this trade at a later time.
    #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")]
    pub trade_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>,
}

impl TradeResultData {
    pub fn new() -> TradeResultData {
        TradeResultData {
            from_asset: None,
            to_asset: None,
            ledger_entries: None,
            trade_id: None,
            account_id: None,
            custodian_code: None,
        }
    }
}