[][src]Struct stripe::InvoiceLineItem

pub struct InvoiceLineItem {
    pub id: InvoiceLineItemId,
    pub amount: i64,
    pub currency: Currency,
    pub description: Option<String>,
    pub discountable: bool,
    pub invoice_item: Option<String>,
    pub livemode: bool,
    pub metadata: Metadata,
    pub period: Option<Period>,
    pub plan: Option<Plan>,
    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,
    pub unified_proration: Option<bool>,
}

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.

discountable: bool

If true, discounts will apply to this line item.

Always false for prorations.

invoice_item: Option<String>livemode: bool

Whether this is a test line item.

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>plan: Option<Plan>

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

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.

unified_proration: Option<bool>

For prorations this indicates whether Stripe automatically grouped multiple related debit and credit line items into a single combined line item.

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, 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.