stripe/model/
credit_note_tax_amount.rs

1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct CreditNoteTaxAmount {
5    ///The amount, in cents (or local equivalent), of the tax.
6    pub amount: i64,
7    ///Whether this tax amount is inclusive or exclusive.
8    pub inclusive: bool,
9    ///The tax rate that was applied to get this tax amount.
10    pub tax_rate: serde_json::Value,
11    ///The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
12    #[serde(skip_serializing_if = "Option::is_none")]
13    pub taxability_reason: Option<String>,
14    ///The amount on which tax is calculated, in cents (or local equivalent).
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub taxable_amount: Option<i64>,
17}
18impl std::fmt::Display for CreditNoteTaxAmount {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
20        write!(f, "{}", serde_json::to_string(self).unwrap())
21    }
22}