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 CommerceOverview {
    /// AOV is average order value — Revenue/Orders, rounded to two places. Zero when there were no orders.
    #[serde(rename = "aov", skip_serializing_if = "Option::is_none")]
    pub aov: Option<f64>,
    /// Available is false when the product-event table could not be read — the lens is reported missing rather than as zeros that look like no sales.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// Orders is how many order_completed events landed in the window.
    #[serde(rename = "orders", skip_serializing_if = "Option::is_none")]
    pub orders: Option<i32>,
    /// Reason says why the lens is unavailable. Omitted when it is available.
    #[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
    pub reason: Option<String>,
    /// Revenue is the total those orders carried, in the events' own currency unit.
    #[serde(rename = "revenue", skip_serializing_if = "Option::is_none")]
    pub revenue: Option<f64>,
    /// Source is the warehouse table the lens read.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
}

impl CommerceOverview {
    pub fn new() -> CommerceOverview {
        CommerceOverview {
            aov: None,
            available: None,
            orders: None,
            reason: None,
            revenue: None,
            source: None,
        }
    }
}