tinkoff_api/models/
currency_position.rs1#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CurrencyPosition {
16 #[serde(rename = "currency")]
17 pub currency: crate::models::Currency,
18 #[serde(rename = "balance")]
19 pub balance: f64,
20 #[serde(rename = "blocked", skip_serializing_if = "Option::is_none")]
21 pub blocked: Option<f64>,
22}
23
24impl CurrencyPosition {
25 pub fn new(currency: crate::models::Currency, balance: f64) -> CurrencyPosition {
26 CurrencyPosition {
27 currency,
28 balance,
29 blocked: None,
30 }
31 }
32}
33
34