/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
*
* The version of the OpenAPI document: 1.15.0
* 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, added on top of `totals.total`.
#[serde(rename = "taxUsd", skip_serializing_if = "Option::is_none")]
pub tax_usd: Option<f64>,
/// Combined rate percentage, e.g. 21.
#[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, e.g. \"ES VAT\" or \"WA sales tax\".
#[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,
}
}
}