use super::investment::QifInvestment;
use super::transaction::QifTransaction;
use serde::{Deserialize, Serialize};
use std::fmt;
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct Qif<'a> {
pub file_type: &'a str,
pub transactions: Vec<QifTransaction<'a>>,
pub investments: Vec<QifInvestment<'a>>,
}
impl<'a> fmt::Display for Qif<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{}, {} transactions, {} investments",
self.file_type,
self.transactions.len(),
self.investments.len()
)
}
}