stripe/model/line_items_discount_amount.rs
1use serde::{Serialize, Deserialize};
2use super::Discount;
3///
4#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5pub struct LineItemsDiscountAmount {
6 ///The amount discounted.
7 pub amount: i64,
8 /**A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
9It contains information about when the discount began, when it will end, and what it is applied to.
10
11Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)*/
12 pub discount: Discount,
13}
14impl std::fmt::Display for LineItemsDiscountAmount {
15 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16 write!(f, "{}", serde_json::to_string(self).unwrap())
17 }
18}