stripe/model/
invoice_threshold_reason.rs

1use serde::{Serialize, Deserialize};
2use super::InvoiceItemThresholdReason;
3///
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct InvoiceThresholdReason {
6    ///The total invoice amount threshold boundary if it triggered the threshold invoice.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub amount_gte: Option<i64>,
9    ///Indicates which line items triggered a threshold invoice.
10    pub item_reasons: Vec<InvoiceItemThresholdReason>,
11}
12impl std::fmt::Display for InvoiceThresholdReason {
13    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
14        write!(f, "{}", serde_json::to_string(self).unwrap())
15    }
16}