hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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 PeriodEarningView {
    /// CommissionCents is what the caller earned that period, in cents: the sum over each referred org and upline level of margin × that level's rate. Always ≤ marginCents, by construction.
    #[serde(rename = "commissionCents", skip_serializing_if = "Option::is_none")]
    pub commission_cents: Option<i32>,
    /// MarginCents is the margin Hanzo earned in that period on the spend of every org the caller referred, in cents — the base commission is a rate OF. It is the aggregate base, never any one customer's bill.
    #[serde(rename = "marginCents", skip_serializing_if = "Option::is_none")]
    pub margin_cents: Option<i32>,
    /// Period is the accrual bucket: the UTC year-month, \"YYYY-MM\". Commission is latched at most once per referred org per period, so one row is one month.
    #[serde(rename = "period", skip_serializing_if = "Option::is_none")]
    pub period: Option<String>,
}

impl PeriodEarningView {
    pub fn new() -> PeriodEarningView {
        PeriodEarningView {
            commission_cents: None,
            margin_cents: None,
            period: None,
        }
    }
}