pub struct InvoiceLineItem {Show 23 fields
pub id: InvoiceLineItemId,
pub amount: i64,
pub amount_excluding_tax: Option<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<Expandable<InvoiceItem>>,
pub livemode: bool,
pub metadata: Metadata,
pub period: Option<Period>,
pub plan: Option<Plan>,
pub price: Option<Price>,
pub proration: bool,
pub proration_details: Option<InvoicesResourceLineItemsProrationDetails>,
pub quantity: Option<u64>,
pub subscription: Option<Expandable<Subscription>>,
pub subscription_item: Option<Expandable<SubscriptionItem>>,
pub tax_amounts: Option<Vec<TaxAmount>>,
pub tax_rates: Option<Vec<TaxRate>>,
pub type_: InvoiceLineItemType,
pub unit_amount_excluding_tax: Option<String>,
}billing only.Expand description
The resource representing a Stripe “InvoiceLineItem”.
Fields§
§id: InvoiceLineItemIdUnique identifier for the object.
amount: i64The amount, in cents (or local equivalent).
amount_excluding_tax: Option<i64>The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.
currency: CurrencyThree-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: boolIf 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<Expandable<InvoiceItem>>The ID of the invoice item associated with this line item if any.
livemode: boolHas the value true if the object exists in live mode or the value false if the object exists in test mode.
metadata: MetadataSet 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.
price: Option<Price>The price of the line item.
proration: boolWhether this is a proration.
proration_details: Option<InvoicesResourceLineItemsProrationDetails>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<Expandable<Subscription>>The subscription that the invoice item pertains to, if any.
subscription_item: Option<Expandable<SubscriptionItem>>The subscription item that generated this line 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_: InvoiceLineItemTypeA string identifying the type of the source of this line item, either an invoiceitem or a subscription.
unit_amount_excluding_tax: Option<String>The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
Implementations§
Source§impl InvoiceLineItem
impl InvoiceLineItem
Sourcepub fn create(
client: &Client,
params: CreateInvoiceLineItem<'_>,
) -> Response<InvoiceLineItem>
pub fn create( client: &Client, params: CreateInvoiceLineItem<'_>, ) -> Response<InvoiceLineItem>
Creates an invoice line item.
For more details see https://stripe.com/docs/api#invoice_line_item_object.
Trait Implementations§
Source§impl Clone for InvoiceLineItem
impl Clone for InvoiceLineItem
Source§fn clone(&self) -> InvoiceLineItem
fn clone(&self) -> InvoiceLineItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more