pub struct InvoiceLineItem {
Show 20 fields pub id: InvoiceLineItemId, pub amount: i64, pub currency: Currency, pub description: Option<String>, pub discount_amounts: Option<Vec<DiscountsResourceDiscountAmount>>, pub discountable: bool, pub discounts: Option<Vec<Expandable<Discount>>>, pub invoice_item: Option<String>, pub livemode: bool, pub metadata: Metadata, pub period: Option<Period>, pub price: Option<Price>, pub proration: bool, pub proration_details: Option<InvoicesLineItemsProrationDetails>, pub quantity: Option<u64>, pub subscription: Option<String>, pub subscription_item: Option<String>, pub tax_amounts: Option<Vec<TaxAmount>>, pub tax_rates: Option<Vec<TaxRate>>, pub type_: InvoiceLineItemType,
}
Expand description

The resource representing a Stripe “InvoiceLineItem”.

Fields

id: InvoiceLineItemId

Unique identifier for the object.

amount: i64

The amount, in %s.

currency: Currency

Three-letter ISO currency code, in lowercase.

Must be a supported currency.

description: Option<String>

An arbitrary string attached to the object.

Often useful for displaying to users.

discount_amounts: Option<Vec<DiscountsResourceDiscountAmount>>

The amount of discount calculated per discount for this line item.

discountable: bool

If true, discounts will apply to this line item.

Always false for prorations.

discounts: Option<Vec<Expandable<Discount>>>

The discounts applied to the invoice line item.

Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.

invoice_item: Option<String>

The ID of the invoice item associated with this line item if any.

livemode: bool

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

metadata: Metadata

Set of key-value pairs that you can attach to an object.

This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created.

period: Option<Period>price: Option<Price>

The price of the line item.

proration: bool

Whether this is a proration.

proration_details: Option<InvoicesLineItemsProrationDetails>

Additional details for proration line items.

quantity: Option<u64>

The quantity of the subscription, if the line item is a subscription or a proration.

subscription: Option<String>

The subscription that the invoice item pertains to, if any.

subscription_item: Option<String>

The subscription item that generated this invoice item.

Left empty if the line item is not an explicit result of a subscription.

tax_amounts: Option<Vec<TaxAmount>>

The amount of tax calculated per tax rate for this line item.

tax_rates: Option<Vec<TaxRate>>

The tax rates which apply to the line item.

type_: InvoiceLineItemType

A string identifying the type of the source of this line item, either an invoiceitem or a subscription.

Implementations

Creates an invoice line item.

For more details see https://stripe.com/docs/api#invoice_line_item_object.

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