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