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 InvoiceLineItem {
    #[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
    pub amount: Option<i32>,
    #[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
    pub currency: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "meterId", skip_serializing_if = "Option::is_none")]
    pub meter_id: Option<String>,
    #[serde(rename = "periodEnd", skip_serializing_if = "Option::is_none")]
    pub period_end: Option<String>,
    /// The billed period. Both carry omitempty and neither is ever empty, which looks contradictory and is not: the shape they reproduce is a time value, and omitempty does nothing to a struct — so those keys render even for the zero instant. The adapter formats the zero instant rather than skipping it, which is what keeps the two wires the same.
    #[serde(rename = "periodStart", skip_serializing_if = "Option::is_none")]
    pub period_start: Option<String>,
    #[serde(rename = "planId", skip_serializing_if = "Option::is_none")]
    pub plan_id: Option<String>,
    #[serde(rename = "planName", skip_serializing_if = "Option::is_none")]
    pub plan_name: Option<String>,
    #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
    pub quantity: Option<i32>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    #[serde(rename = "unitPrice", skip_serializing_if = "Option::is_none")]
    pub unit_price: Option<i32>,
}

impl InvoiceLineItem {
    pub fn new() -> InvoiceLineItem {
        InvoiceLineItem {
            amount: None,
            currency: None,
            description: None,
            id: None,
            meter_id: None,
            period_end: None,
            period_start: None,
            plan_id: None,
            plan_name: None,
            quantity: None,
            r#type: None,
            unit_price: None,
        }
    }
}