pub struct BillingCustomerDiscount {
pub id: Option<String>,
pub active: Option<bool>,
pub percent_off: Option<f64>,
pub amount_off: Option<f64>,
pub applies_to: Option<Vec<String>>,
}Expand description
BillingCustomerDiscount : Customer discount information from Stripe billing.
Fields§
§id: Option<String>The Stripe coupon ID (e.g., "cm3nHfO1").
active: Option<bool>Whether the discount is a recurring/perpetual discount with no expiration date. This property is true only when the discount has no end date, meaning it applies indefinitely to all future renewals. This is a product decision for Milestone 2 to only display perpetual discounts in the UI. Note: This does NOT indicate whether the discount is "currently active" in the billing sense. A discount with a future end date is functionally active and will be applied by Stripe, but this property will be false because it has an expiration date.
percent_off: Option<f64>Percentage discount applied to the subscription (e.g., 20.0 for 20% off). Null if this is an amount-based discount.
amount_off: Option<f64>Fixed amount discount in USD (e.g., 14.00 for $14 off). Converted from Stripe’s cent-based values (1400 cents → $14.00). Null if this is a percentage-based discount. Note: Stripe stores amounts in the smallest currency unit. This value is always in USD.
applies_to: Option<Vec<String>>List of Stripe product IDs that this discount applies to (e.g., ["prod_premium", "prod_families"]). Null: discount applies to all products with no restrictions (AppliesTo not specified in Stripe). Empty list: discount restricted to zero products (edge case - AppliesTo.Products = [] in Stripe). Non-empty list: discount applies only to the specified product IDs.
Implementations§
Source§impl BillingCustomerDiscount
impl BillingCustomerDiscount
Sourcepub fn new() -> BillingCustomerDiscount
pub fn new() -> BillingCustomerDiscount
Customer discount information from Stripe billing.
Trait Implementations§
Source§impl Clone for BillingCustomerDiscount
impl Clone for BillingCustomerDiscount
Source§fn clone(&self) -> BillingCustomerDiscount
fn clone(&self) -> BillingCustomerDiscount
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BillingCustomerDiscount
impl Debug for BillingCustomerDiscount
Source§impl Default for BillingCustomerDiscount
impl Default for BillingCustomerDiscount
Source§fn default() -> BillingCustomerDiscount
fn default() -> BillingCustomerDiscount
Source§impl<'de> Deserialize<'de> for BillingCustomerDiscount
impl<'de> Deserialize<'de> for BillingCustomerDiscount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BillingCustomerDiscount
impl PartialEq for BillingCustomerDiscount
Source§impl Serialize for BillingCustomerDiscount
impl Serialize for BillingCustomerDiscount
impl StructuralPartialEq for BillingCustomerDiscount
Auto Trait Implementations§
impl Freeze for BillingCustomerDiscount
impl RefUnwindSafe for BillingCustomerDiscount
impl Send for BillingCustomerDiscount
impl Sync for BillingCustomerDiscount
impl Unpin for BillingCustomerDiscount
impl UnsafeUnpin for BillingCustomerDiscount
impl UnwindSafe for BillingCustomerDiscount
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more