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
57
58
59
60
/*
* 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 Quote {
/// ChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted. On team that is a multiple of the seat count, so it is not ListCents minus DiscountCents.
#[serde(rename = "chargeCents", skip_serializing_if = "Option::is_none")]
pub charge_cents: Option<i32>,
/// Code is the promo that was priced, as stored.
#[serde(rename = "code", skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
/// DiscountCents is what the promo takes off month one, in USD cents. The promo rate reaches at most TeamSeatCap seats; seats past the cap bill at full list and add nothing here. It is arithmetic only — quoting credits nothing, counts nothing and reserves nothing.
#[serde(rename = "discountCents", skip_serializing_if = "Option::is_none")]
pub discount_cents: Option<i32>,
/// Eligible says whether a redeem would be accepted right now; Reason says why not when it would not.
#[serde(rename = "eligible", skip_serializing_if = "Option::is_none")]
pub eligible: Option<bool>,
/// ListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price.
#[serde(rename = "listCents", skip_serializing_if = "Option::is_none")]
pub list_cents: Option<i32>,
/// Plan is the tier priced, lower-cased and trimmed: pro, max or team. Unlike a redemption's plan this one comes from the REQUEST — quoting has no side effects, so it will happily price a plan the caller does not hold.
#[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
pub plan: Option<String>,
/// Reason is why Eligible is false, drawn from: \"promo redemption is closed\" (the subsystem is off, which is how it ships), \"promo redemption cap reached\", \"promo is not active\", \"plan is free or unknown; nothing to discount\", \"promo does not cover plan <plan>\". Absent when Eligible is true.
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
/// Remaining is how many redemptions are left under the fleet-wide cap.
#[serde(rename = "remaining", skip_serializing_if = "Option::is_none")]
pub remaining: Option<i32>,
/// Seats is the seat count priced; a request of 0 or less was read as 1. It only bites on team, the one per-seat plan — pro and max are single-seat and ignore it.
#[serde(rename = "seats", skip_serializing_if = "Option::is_none")]
pub seats: Option<i32>,
}
impl Quote {
pub fn new() -> Quote {
Quote {
charge_cents: None,
code: None,
discount_cents: None,
eligible: None,
list_cents: None,
plan: None,
reason: None,
remaining: None,
seats: None,
}
}
}