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 ProductCollectionGroup {
    /// Optional group name. Multiple groups can have null names, but named groups must be unique per collection
    #[serde(rename = "group_name", skip_serializing_if = "Option::is_none")]
    pub group_name: Option<String>,
    /// Products in this group
    #[serde(rename = "products")]
    pub products: Vec<models::GroupProduct>,
    /// Status of the group (defaults to true if not provided)
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<bool>,
}

impl ProductCollectionGroup {
    pub fn new(products: Vec<models::GroupProduct>) -> ProductCollectionGroup {
        ProductCollectionGroup {
            group_name: None,
            products,
            status: None,
        }
    }
}