dodopayments_rust 2.2.1

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 ProductCollectionGroupResponse {
    #[serde(rename = "group_id")]
    pub group_id: String,
    #[serde(rename = "group_name", skip_serializing_if = "Option::is_none")]
    pub group_name: Option<String>,
    #[serde(rename = "products")]
    pub products: Vec<models::ProductCollectionProductResponse>,
    #[serde(rename = "status")]
    pub status: bool,
}

impl ProductCollectionGroupResponse {
    pub fn new(group_id: String, products: Vec<models::ProductCollectionProductResponse>, status: bool) -> ProductCollectionGroupResponse {
        ProductCollectionGroupResponse {
            group_id,
            group_name: None,
            products,
            status,
        }
    }
}