stripe/model/quotes_resource_subscription_data_subscription_data.rs
1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct QuotesResourceSubscriptionDataSubscriptionData {
5 ///The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
6 #[serde(skip_serializing_if = "Option::is_none")]
7 pub description: Option<String>,
8 ///When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
9 #[serde(skip_serializing_if = "Option::is_none")]
10 pub effective_date: Option<i64>,
11 ///Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
12 #[serde(skip_serializing_if = "Option::is_none")]
13 pub metadata: Option<serde_json::Value>,
14 ///Integer representing the number of trial period days before the customer is charged for the first time.
15 #[serde(skip_serializing_if = "Option::is_none")]
16 pub trial_period_days: Option<i64>,
17}
18impl std::fmt::Display for QuotesResourceSubscriptionDataSubscriptionData {
19 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
20 write!(f, "{}", serde_json::to_string(self).unwrap())
21 }
22}