use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TokenResponse { pub access: String, pub access_expires: i32, pub refresh: Option, pub refresh_expires: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Requisition { pub id: String, pub status: String, pub accounts: Option>, pub reference: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct PaginatedResponse { pub count: Option, pub next: Option, pub previous: Option, pub results: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Account { pub id: String, pub created: Option, pub last_accessed: Option, pub iban: Option, pub institution_id: Option, pub status: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionsResponse { pub transactions: TransactionBookedPending, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionBookedPending { pub booked: Vec, pub pending: Option>, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Transaction { #[serde(rename = "transactionId")] pub transaction_id: Option, #[serde(rename = "bookingDate")] pub booking_date: Option, #[serde(rename = "valueDate")] pub value_date: Option, #[serde(rename = "transactionAmount")] pub transaction_amount: TransactionAmount, #[serde(rename = "currencyExchange")] pub currency_exchange: Option>, #[serde(rename = "creditorName")] pub creditor_name: Option, #[serde(rename = "creditorAccount")] pub creditor_account: Option, #[serde(rename = "debtorName")] pub debtor_name: Option, #[serde(rename = "debtorAccount")] pub debtor_account: Option, #[serde(rename = "remittanceInformationUnstructured")] pub remittance_information_unstructured: Option, #[serde(rename = "proprietaryBankTransactionCode")] pub proprietary_bank_transaction_code: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct TransactionAmount { pub amount: String, pub currency: String, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CurrencyExchange { #[serde(rename = "sourceCurrency")] pub source_currency: Option, #[serde(rename = "exchangeRate")] pub exchange_rate: Option, #[serde(rename = "unitCurrency")] pub unit_currency: Option, #[serde(rename = "targetCurrency")] pub target_currency: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AccountDetails { pub iban: Option, }