1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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,
}
}
}