1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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,
}
}
}