use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProductCollectionResponse {
#[serde(rename = "brand_id")]
pub brand_id: String,
#[serde(rename = "created_at")]
pub created_at: String,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "groups")]
pub groups: Vec<models::ProductCollectionGroupResponse>,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "image", skip_serializing_if = "Option::is_none")]
pub image: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "updated_at")]
pub updated_at: String,
}
impl ProductCollectionResponse {
pub fn new(brand_id: String, created_at: String, groups: Vec<models::ProductCollectionGroupResponse>, id: String, name: String, updated_at: String) -> ProductCollectionResponse {
ProductCollectionResponse {
brand_id,
created_at,
description: None,
groups,
id,
image: None,
name,
updated_at,
}
}
}