stripe/model/
subscription_schedule_configuration_item.rs

1use serde::{Serialize, Deserialize};
2use super::TaxRate;
3///A phase item describes the price and quantity of a phase.
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct SubscriptionScheduleConfigurationItem {
6    ///Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub billing_thresholds: Option<serde_json::Value>,
9    ///Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub metadata: Option<serde_json::Value>,
12    ///ID of the price to which the customer should be subscribed.
13    pub price: serde_json::Value,
14    ///Quantity of the plan to which the customer should be subscribed.
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub quantity: Option<i64>,
17    ///The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
18    #[serde(skip_serializing_if = "Option::is_none")]
19    pub tax_rates: Option<Vec<TaxRate>>,
20}
21impl std::fmt::Display for SubscriptionScheduleConfigurationItem {
22    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
23        write!(f, "{}", serde_json::to_string(self).unwrap())
24    }
25}