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
/*
* 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 Redemption {
/// Code is the promo redeemed.
#[serde(rename = "code", skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
/// DiscountCents is the month-one discount this redemption CLAIMS, in USD cents. It is a recorded figure, NOT a balance: nothing was credited and no wallet moved. An admin granting against this claim is what would make it money, and that decision happens on the admin surface, not here.
#[serde(rename = "discountCents", skip_serializing_if = "Option::is_none")]
pub discount_cents: Option<i32>,
/// Plan is the tier redeemed against: pro, max or team. It is DERIVED from the org's live ACTIVE/TRIALING subscription, never read from the request, so it is what the org actually holds rather than what it claimed.
#[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
pub plan: Option<String>,
/// RedeemedAt is unix seconds.
#[serde(rename = "redeemedAt", skip_serializing_if = "Option::is_none")]
pub redeemed_at: Option<i32>,
/// Seats is the seat count the claim was priced at, and it is ALWAYS 1. No server-side authority on this surface answers \"how many seats\", and the caller's own number is exactly the input that once inflated these claims, so a redemption records the single-seat floor and an admin resolves the real count against subscription data at grant time.
#[serde(rename = "seats", skip_serializing_if = "Option::is_none")]
pub seats: Option<i32>,
}
impl Redemption {
pub fn new() -> Redemption {
Redemption {
code: None,
discount_cents: None,
plan: None,
redeemed_at: None,
seats: None,
}
}
}