1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use serde::{Serialize, Deserialize};
use super::SubscriptionSchedulesResourceDefaultSettingsAutomaticTax;
///
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct SubscriptionSchedulesResourceDefaultSettings {
///A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule.
#[serde(skip_serializing_if = "Option::is_none")]
pub application_fee_percent: Option<f64>,
///
#[serde(skip_serializing_if = "Option::is_none")]
pub automatic_tax: Option<SubscriptionSchedulesResourceDefaultSettingsAutomaticTax>,
///Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
pub billing_cycle_anchor: String,
///Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_thresholds: Option<serde_json::Value>,
///Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
#[serde(skip_serializing_if = "Option::is_none")]
pub collection_method: Option<String>,
///ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
#[serde(skip_serializing_if = "Option::is_none")]
pub default_payment_method: Option<serde_json::Value>,
///Subscription 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.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
///The subscription schedule's default invoice settings.
#[serde(skip_serializing_if = "Option::is_none")]
pub invoice_settings: Option<serde_json::Value>,
///The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
#[serde(skip_serializing_if = "Option::is_none")]
pub on_behalf_of: Option<serde_json::Value>,
///The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_data: Option<serde_json::Value>,
}
impl std::fmt::Display for SubscriptionSchedulesResourceDefaultSettings {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}