tinkoff_api/models/
currency_position.rs

1/*
2 * OpenAPI
3 *
4 * tinkoff.ru/invest OpenAPI.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * Contact: al.a.volkov@tinkoff.ru
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[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