use serde::{Deserialize, Serialize};
use super::{ledger_entry::LedgerEntry, pagination_response::PaginationResponse};
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[non_exhaustive]
pub struct LedgerListResponse {
pub data: Vec<LedgerEntry>,
pub pagination_meta: PaginationResponse,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
impl LedgerListResponse {
#[must_use]
pub fn new(data: Vec<LedgerEntry>, pagination_meta: PaginationResponse) -> Self {
Self {
data,
pagination_meta,
extra: serde_json::Map::new(),
}
}
}