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 Spend {
    /// Available is false when the commerce ledger was unconfigured or unreachable. Every number below is then an honest zero, NOT a measured one.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// AvailableCents is what of that balance is still spendable.
    #[serde(rename = "availableCents", skip_serializing_if = "Option::is_none")]
    pub available_cents: Option<i32>,
    /// BalanceCents is the prepaid wallet's balance, in US cents.
    #[serde(rename = "balanceCents", skip_serializing_if = "Option::is_none")]
    pub balance_cents: Option<i32>,
    /// ByCategory is the window's spend split by ledger category, largest first.
    #[serde(rename = "byCategory", skip_serializing_if = "Option::is_none")]
    pub by_category: Option<Vec<models::CategorySpend>>,
    /// MTDCents is commerce's authoritative month-to-date consumed figure, which is a different period from the window and is not derived from it.
    #[serde(rename = "mtdCents", skip_serializing_if = "Option::is_none")]
    pub mtd_cents: Option<i32>,
    /// OverageCents is month-to-date consumption beyond the plan's allowance.
    #[serde(rename = "overageCents", skip_serializing_if = "Option::is_none")]
    pub overage_cents: Option<i32>,
    /// Series is the window's spend over time, gap-filled at the window's interval.
    #[serde(rename = "series", skip_serializing_if = "Option::is_none")]
    pub series: Option<Vec<models::SpendPoint>>,
    /// Source names where the roll-up came from.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    /// TotalCents is consumption over the requested window, in US cents. It is self-consistent with ByCategory and Series.
    #[serde(rename = "totalCents", skip_serializing_if = "Option::is_none")]
    pub total_cents: Option<i32>,
}

impl Spend {
    pub fn new() -> Spend {
        Spend {
            available: None,
            available_cents: None,
            balance_cents: None,
            by_category: None,
            mtd_cents: None,
            overage_cents: None,
            series: None,
            source: None,
            total_cents: None,
        }
    }
}