Struct stripe::InvoiceLineItem[][src]

pub struct InvoiceLineItem {
    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 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,
}

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.

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

impl InvoiceLineItem[src]

pub fn create(
    client: &Client,
    params: CreateInvoiceLineItem<'_>
) -> Response<InvoiceLineItem>
[src]

Creates an invoice line item.

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

Trait Implementations

impl Clone for InvoiceLineItem[src]

impl Debug for InvoiceLineItem[src]

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

impl Object for InvoiceLineItem[src]

type Id = InvoiceLineItemId

The canonical id type for this object.

impl Serialize for InvoiceLineItem[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]