Skip to main content

hanzo_client/models/
quote.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Quote {
16    /// 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.
17    #[serde(rename = "chargeCents", skip_serializing_if = "Option::is_none")]
18    pub charge_cents: Option<i32>,
19    /// Code is the promo that was priced, as stored.
20    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
21    pub code: Option<String>,
22    /// 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.
23    #[serde(rename = "discountCents", skip_serializing_if = "Option::is_none")]
24    pub discount_cents: Option<i32>,
25    /// Eligible says whether a redeem would be accepted right now; Reason says why not when it would not.
26    #[serde(rename = "eligible", skip_serializing_if = "Option::is_none")]
27    pub eligible: Option<bool>,
28    /// 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.
29    #[serde(rename = "listCents", skip_serializing_if = "Option::is_none")]
30    pub list_cents: Option<i32>,
31    /// 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.
32    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
33    pub plan: Option<String>,
34    /// 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.
35    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
36    pub reason: Option<String>,
37    /// Remaining is how many redemptions are left under the fleet-wide cap.
38    #[serde(rename = "remaining", skip_serializing_if = "Option::is_none")]
39    pub remaining: Option<i32>,
40    /// 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.
41    #[serde(rename = "seats", skip_serializing_if = "Option::is_none")]
42    pub seats: Option<i32>,
43}
44
45impl Quote {
46    pub fn new() -> Quote {
47        Quote {
48            charge_cents: None,
49            code: None,
50            discount_cents: None,
51            eligible: None,
52            list_cents: None,
53            plan: None,
54            reason: None,
55            remaining: None,
56            seats: None,
57        }
58    }
59}
60