Struct stripe::Discount[][src]

pub struct Discount {
    pub id: DiscountId,
    pub checkout_session: Option<String>,
    pub coupon: Coupon,
    pub customer: Option<Expandable<Customer>>,
    pub deleted: bool,
    pub end: Option<Timestamp>,
    pub invoice: Option<String>,
    pub invoice_item: Option<String>,
    pub promotion_code: Option<Expandable<PromotionCode>>,
    pub start: Timestamp,
    pub subscription: Option<String>,
}

The resource representing a Stripe "Discount".

For more details see https://stripe.com/docs/api/discounts/object.

Fields

id: DiscountId

The ID of the discount object.

Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.

checkout_session: Option<String>

The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.

Will not be present for subscription mode.

coupon: Couponcustomer: Option<Expandable<Customer>>

The ID of the customer associated with this discount.

deleted: boolend: Option<Timestamp>

If the coupon has a duration of repeating, the date that this discount will end.

If the coupon has a duration of once or forever, this attribute will be null.

invoice: Option<String>

The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.

invoice_item: Option<String>

The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.

promotion_code: Option<Expandable<PromotionCode>>

The promotion code applied to create this discount.

start: Timestamp

Date that the coupon was applied.

subscription: Option<String>

The subscription that this coupon is applied to, if it is applied to a particular subscription.

Trait Implementations

impl Clone for Discount[src]

impl Debug for Discount[src]

impl<'de> Deserialize<'de> for Discount[src]

impl Object for Discount[src]

type Id = DiscountId

The canonical id type for this object.

impl Serialize for Discount[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]