pub struct CheckoutSessionItem {
    pub id: CheckoutSessionItemId,
    pub amount_discount: Option<i64>,
    pub amount_subtotal: i64,
    pub amount_tax: Option<i64>,
    pub amount_total: i64,
    pub currency: Currency,
    pub description: String,
    pub discounts: Option<Vec<LineItemsDiscountAmount>>,
    pub price: Option<Price>,
    pub product: Option<Expandable<Product>>,
    pub quantity: Option<u64>,
    pub taxes: Option<Vec<LineItemsTaxAmount>>,
}
Expand description

The resource representing a Stripe “LineItem”.

Fields

id: CheckoutSessionItemId

Unique identifier for the object.

amount_discount: Option<i64>

Total discount amount applied.

If no discounts were applied, defaults to 0.

amount_subtotal: i64

Total before any discounts or taxes are applied.

amount_tax: Option<i64>

Total tax amount applied.

If no tax was applied, defaults to 0.

amount_total: i64

Total after discounts and taxes.

currency: Currency

Three-letter ISO currency code, in lowercase.

Must be a supported currency.

description: String

An arbitrary string attached to the object.

Often useful for displaying to users. Defaults to product name.

discounts: Option<Vec<LineItemsDiscountAmount>>

The discounts applied to the line item.

price: Option<Price>

The price used to generate the line item.

product: Option<Expandable<Product>>

The ID of the product for this line item.

This will always be the same as price.product.

quantity: Option<u64>

The quantity of products being purchased.

taxes: Option<Vec<LineItemsTaxAmount>>

The taxes applied to the line item.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

The canonical id type for this object.

The id of the object.

The object’s type, typically represented in wire format as the object property.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more