use serde::Deserialize;

#[derive(Debug, Clone, Deserialize)]
pub struct Holdings {
    pub holdings: Vec<Holding>,
    #[serde(rename = "totalValue")]
    pub total_value: f64,
    pub currency: String,
}

#[derive(Debug, Clone, Deserialize)]
pub struct Holding {
    pub security: Security,
    pub quantity: f64,
    pub price: f64,
    pub value: f64,
    #[serde(rename = "costBasis")]
    pub cost_basis: Option<f64>,
    pub currency: String,
}

#[derive(Debug, Clone, Deserialize)]
pub struct Security {
    pub name: String,
    pub currency: String,
    #[serde(rename = "tickerSymbol")]
    pub ticker_symbol: Option<String>,
    pub figi: Option<String>,
    pub cusp: Option<String>,
    pub isin: Option<String>,
}
