hanzo_client/models/level_view.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 LevelView {
16 /// DownlineCount is how many orgs sit exactly this many hops below the caller. It is 0 in the schedule quoted to a caller that has not applied, which has no downline to count.
17 #[serde(rename = "downlineCount", skip_serializing_if = "Option::is_none")]
18 pub downline_count: Option<i32>,
19 /// Level is the upline distance from the org whose spend is being shared: 1 is the direct referrer, 2 and 3 the referrers above it. Nothing accrues past 3.
20 #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
21 pub level: Option<i32>,
22 /// RateBps is the commission paid at this level, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill). Level 1 is the affiliate's own negotiated rate; 2 and 3 are platform switches read live, so this is the schedule actually in force, not one compiled in.
23 #[serde(rename = "rateBps", skip_serializing_if = "Option::is_none")]
24 pub rate_bps: Option<i32>,
25}
26
27impl LevelView {
28 pub fn new() -> LevelView {
29 LevelView {
30 downline_count: None,
31 level: None,
32 rate_bps: None,
33 }
34 }
35}
36