use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountRead { pub id: String, pub attributes: Account, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Account { pub name: String, pub iban: Option, #[serde(rename = "type")] pub account_type: String, pub active: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountArray { pub data: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionRead { pub id: String, pub attributes: Transaction, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Transaction { pub transactions: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionSplit { pub date: String, pub amount: String, pub description: String, pub external_id: Option, pub currency_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionArray { pub data: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionSplitStore { #[serde(rename = "type")] pub transaction_type: String, pub date: String, pub amount: String, pub description: String, pub source_id: Option, pub source_name: Option, pub destination_id: Option, pub destination_name: Option, pub currency_code: Option, pub foreign_amount: Option, pub foreign_currency_code: Option, pub external_id: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionStore { pub transactions: Vec, pub apply_rules: Option, pub fire_webhooks: Option, pub error_if_duplicate_hash: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionUpdate { pub transactions: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionSplitUpdate { pub external_id: Option, }