Skip to main content

hanzo_client/models/
charge.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Charge {
16    /// AmountCents is what this line costs.
17    #[serde(rename = "amountCents", skip_serializing_if = "Option::is_none")]
18    pub amount_cents: Option<i32>,
19    /// AsOf is when a pass-through amount was last checked against its source.
20    #[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
21    pub as_of: Option<String>,
22    /// Code names the line so a caller can branch on it without reading prose.
23    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
24    pub code: Option<String>,
25    /// Label is what the payer sees on the invoice.
26    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
27    pub label: Option<String>,
28    /// PassThrough marks money we collect and remit rather than keep — the state's fee is not our revenue, and a quote that hides that is a quote that reads as a bigger margin than it is.
29    #[serde(rename = "passThrough", skip_serializing_if = "Option::is_none")]
30    pub pass_through: Option<bool>,
31    /// Recurring marks a line that repeats. An agent of record is billed every year for as long as the entity stands, and a payer agreeing to a one-time total is not agreeing to that.
32    #[serde(rename = "recurring", skip_serializing_if = "Option::is_none")]
33    pub recurring: Option<String>,
34    /// Source names who publishes this amount, for a line we merely pass through. Empty for a price of ours, which needs no external authority.
35    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
36    pub source: Option<String>,
37    /// Stale reports that AsOf is older than the review window — the figure may have moved and nobody has looked. It does not block; it tells.
38    #[serde(rename = "stale", skip_serializing_if = "Option::is_none")]
39    pub stale: Option<bool>,
40}
41
42impl Charge {
43    pub fn new() -> Charge {
44        Charge {
45            amount_cents: None,
46            as_of: None,
47            code: None,
48            label: None,
49            pass_through: None,
50            recurring: None,
51            source: None,
52            stale: None,
53        }
54    }
55}
56