hanzo_client/models/application.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 Application {
16 /// Code is the minted referral code. Empty on a first apply — applying does not mint a code, approval does; a re-apply echoes whatever the row already holds.
17 #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
18 pub code: Option<String>,
19 /// Created says whether THIS call made the row. false means the org had already applied and nothing changed — no second row, no reset of an existing approval. The HTTP status states the same fact: 201 when true, 200 when false.
20 #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
21 pub created: Option<bool>,
22 /// ID is the affiliate's server-minted handle, \"aff_\"-prefixed — the id staff approve, suspend, re-rate and pay against.
23 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24 pub id: Option<String>,
25 /// RateBps is the direct (level 1) commission rate the row carries, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill).
26 #[serde(rename = "rateBps", skip_serializing_if = "Option::is_none")]
27 pub rate_bps: Option<i32>,
28 /// RequestedCode echoes the vanity code asked for, normalized to lower case. It is a request only: approval mints a different slug if this one is taken.
29 #[serde(rename = "requestedCode", skip_serializing_if = "Option::is_none")]
30 pub requested_code: Option<String>,
31 /// Status is \"applied\" for a row this call created. A re-apply echoes the existing row's status, which may already be \"approved\" or \"suspended\".
32 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
33 pub status: Option<String>,
34}
35
36impl Application {
37 pub fn new() -> Application {
38 Application {
39 code: None,
40 created: None,
41 id: None,
42 rate_bps: None,
43 requested_code: None,
44 status: None,
45 }
46 }
47}
48