stripe/model/
subscription_schedule_add_invoice_item.rs

1use serde::{Serialize, Deserialize};
2use super::TaxRate;
3///An Add Invoice Item describes the prices and quantities that will be added as pending invoice items when entering a phase.
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct SubscriptionScheduleAddInvoiceItem {
6    ///ID of the price used to generate the invoice item.
7    pub price: serde_json::Value,
8    ///The quantity of the invoice item.
9    #[serde(skip_serializing_if = "Option::is_none")]
10    pub quantity: Option<i64>,
11    ///The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
12    #[serde(skip_serializing_if = "Option::is_none")]
13    pub tax_rates: Option<Vec<TaxRate>>,
14}
15impl std::fmt::Display for SubscriptionScheduleAddInvoiceItem {
16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17        write!(f, "{}", serde_json::to_string(self).unwrap())
18    }
19}