use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProductCollectionProductResponse {
#[serde(rename = "addons_count")]
pub addons_count: i64,
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<models::Currency>,
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "files_count")]
pub files_count: i64,
#[serde(rename = "has_credit_entitlements")]
pub has_credit_entitlements: bool,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "is_recurring")]
pub is_recurring: bool,
#[serde(rename = "license_key_enabled")]
pub license_key_enabled: bool,
#[serde(rename = "meters_count")]
pub meters_count: i64,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "price", skip_serializing_if = "Option::is_none")]
pub price: Option<i32>,
#[serde(rename = "price_detail", skip_serializing_if = "Option::is_none")]
pub price_detail: Option<Box<models::Price>>,
#[serde(rename = "product_id")]
pub product_id: String,
#[serde(rename = "status")]
pub status: bool,
#[serde(rename = "tax_category", skip_serializing_if = "Option::is_none")]
pub tax_category: Option<models::TaxCategory>,
#[serde(rename = "tax_inclusive", skip_serializing_if = "Option::is_none")]
pub tax_inclusive: Option<bool>,
}
impl ProductCollectionProductResponse {
pub fn new(addons_count: i64, files_count: i64, has_credit_entitlements: bool, id: String, is_recurring: bool, license_key_enabled: bool, meters_count: i64, product_id: String, status: bool) -> ProductCollectionProductResponse {
ProductCollectionProductResponse {
addons_count,
currency: None,
description: None,
files_count,
has_credit_entitlements,
id,
is_recurring,
license_key_enabled,
meters_count,
name: None,
price: None,
price_detail: None,
product_id,
status,
tax_category: None,
tax_inclusive: None,
}
}
}