1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// UsageMeteringTax : Estimated tax on the window's net `totals.total`, computed with Stripe Tax against the billing address (the same engine the real invoice uses; invoices apply exclusive tax, so the card is charged total + tax). Null when the account has no billing address on file, the total is zero or negative, or the estimate failed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UsageMeteringTax {
/// Estimated tax in USD
#[serde(rename = "taxUsd", skip_serializing_if = "Option::is_none")]
pub tax_usd: Option<f64>,
/// Combined rate percentage
#[serde(
rename = "ratePercent",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub rate_percent: Option<Option<f64>>,
/// Human jurisdiction label
#[serde(
rename = "jurisdictionLabel",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub jurisdiction_label: Option<Option<String>>,
/// True for EU/UK B2B reverse charge (0 tax added by design).
#[serde(rename = "reverseCharge", skip_serializing_if = "Option::is_none")]
pub reverse_charge: Option<bool>,
}
impl UsageMeteringTax {
/// Estimated tax on the window's net `totals.total`, computed with Stripe Tax against the billing address (the same engine the real invoice uses; invoices apply exclusive tax, so the card is charged total + tax). Null when the account has no billing address on file, the total is zero or negative, or the estimate failed.
pub fn new() -> UsageMeteringTax {
UsageMeteringTax {
tax_usd: None,
rate_percent: None,
jurisdiction_label: None,
reverse_charge: None,
}
}
}