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 MetricsResponse {
    /// ARR is annualized recurring revenue in cents (MRR × 12).
    #[serde(rename = "arr", skip_serializing_if = "Option::is_none")]
    pub arr: Option<i32>,
    /// Burn is total expense in cents over the period.
    #[serde(rename = "burn", skip_serializing_if = "Option::is_none")]
    pub burn: Option<i32>,
    /// Cash is the bank + processor-clearing balance in cents as of To.
    #[serde(rename = "cash", skip_serializing_if = "Option::is_none")]
    pub cash: Option<i32>,
    /// COGS is cost of goods sold in cents over the period.
    #[serde(rename = "cogs", skip_serializing_if = "Option::is_none")]
    pub cogs: Option<i32>,
    /// DeferredRevenue is the customer-wallet liability in cents as of To.
    #[serde(rename = "deferredRevenue", skip_serializing_if = "Option::is_none")]
    pub deferred_revenue: Option<i32>,
    /// Figures is the same snapshot rendered through books' one money formatter.
    #[serde(rename = "figures", skip_serializing_if = "Option::is_none")]
    pub figures: Option<Vec<models::Figure>>,
    /// From is the RFC3339 start of the reporting window, exclusive; absent for all time.
    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
    pub from: Option<String>,
    /// GrossMarginBps is GrossProfit / Revenue in basis points (7000 = 70%).
    #[serde(rename = "grossMarginBps", skip_serializing_if = "Option::is_none")]
    pub gross_margin_bps: Option<i32>,
    /// GrossProfit is Revenue − COGS, in cents.
    #[serde(rename = "grossProfit", skip_serializing_if = "Option::is_none")]
    pub gross_profit: Option<i32>,
    /// MonthlyBurn is net cash burned per month in cents; 0 when not losing cash.
    #[serde(rename = "monthlyBurn", skip_serializing_if = "Option::is_none")]
    pub monthly_burn: Option<i32>,
    /// Months is the window length in whole months used to normalize MRR and burn.
    #[serde(rename = "months", skip_serializing_if = "Option::is_none")]
    pub months: Option<i32>,
    /// MRR is monthly recurring revenue in cents.
    #[serde(rename = "mrr", skip_serializing_if = "Option::is_none")]
    pub mrr: Option<i32>,
    /// NetIncome is Revenue − Burn, in cents.
    #[serde(rename = "netIncome", skip_serializing_if = "Option::is_none")]
    pub net_income: Option<i32>,
    /// Period is the human window label, e.g. \"2026-07\" or \"all-time\".
    #[serde(rename = "period", skip_serializing_if = "Option::is_none")]
    pub period: Option<String>,
    /// Revenue is recognized revenue in cents over the period.
    #[serde(rename = "revenue", skip_serializing_if = "Option::is_none")]
    pub revenue: Option<i32>,
    /// RunwayMonths is Cash / MonthlyBurn; -1 means infinite (the org is not burning).
    #[serde(rename = "runwayMonths", skip_serializing_if = "Option::is_none")]
    pub runway_months: Option<i32>,
    /// To is the RFC3339 end of the reporting window, inclusive; absent for up to now.
    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
    pub to: Option<String>,
}

impl MetricsResponse {
    pub fn new() -> MetricsResponse {
        MetricsResponse {
            arr: None,
            burn: None,
            cash: None,
            cogs: None,
            deferred_revenue: None,
            figures: None,
            from: None,
            gross_margin_bps: None,
            gross_profit: None,
            monthly_burn: None,
            months: None,
            mrr: None,
            net_income: None,
            period: None,
            revenue: None,
            runway_months: None,
            to: None,
        }
    }
}