hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Promo {
    /// Active is false for a promo that is no longer offered; an inactive promo quotes as ineligible and refuses to redeem.
    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    /// Code is the promo id, e.g. \"first1000\".
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    /// CreatedAt is unix seconds.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// Description is the human-readable offer.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// MaxRedemptions is the hard fleet-wide cap; the redemption past it is declined.
    #[serde(rename = "maxRedemptions", skip_serializing_if = "Option::is_none")]
    pub max_redemptions: Option<i32>,
    /// PercentOff is the discount applied to ONE month's list price.
    #[serde(rename = "percentOff", skip_serializing_if = "Option::is_none")]
    pub percent_off: Option<i32>,
    /// Plans is the csv of eligible plan ids (\"pro,max,team\").
    #[serde(rename = "plans", skip_serializing_if = "Option::is_none")]
    pub plans: Option<String>,
    /// TeamSeatCap is how many Team seats bill at the promo rate; seats beyond it bill at list.
    #[serde(rename = "teamSeatCap", skip_serializing_if = "Option::is_none")]
    pub team_seat_cap: Option<i32>,
}

impl Promo {
    pub fn new() -> Promo {
        Promo {
            active: None,
            code: None,
            created_at: None,
            description: None,
            max_redemptions: None,
            percent_off: None,
            plans: None,
            team_seat_cap: None,
        }
    }
}