dodopayments_rust 2.2.2

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateProductCollectionRequest {
    /// Brand id for the collection, if not provided will default to primary brand
    #[serde(rename = "brand_id", skip_serializing_if = "Option::is_none")]
    pub brand_id: Option<String>,
    /// Optional description of the product collection
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Groups of products in this collection
    #[serde(rename = "groups")]
    pub groups: Vec<models::ProductCollectionGroup>,
    /// Name of the product collection
    #[serde(rename = "name")]
    pub name: String,
}

impl CreateProductCollectionRequest {
    pub fn new(groups: Vec<models::ProductCollectionGroup>, name: String) -> CreateProductCollectionRequest {
        CreateProductCollectionRequest {
            brand_id: None,
            description: None,
            groups,
            name,
        }
    }
}