pub struct AddLinesInvoiceLines {
pub amount: Option<i64>,
pub description: Option<String>,
pub discountable: Option<bool>,
pub discounts: Option<Vec<DiscountsDataParam>>,
pub invoice_item: Option<String>,
pub metadata: Option<HashMap<String, String>>,
pub period: Option<Period>,
pub price_data: Option<AddLinesInvoiceLinesPriceData>,
pub pricing: Option<PricingParam>,
pub quantity: Option<u64>,
pub tax_amounts: Option<Vec<AddLinesInvoiceLinesTaxAmounts>>,
pub tax_rates: Option<Vec<String>>,
}
Expand description
The line items to add.
Fields§
§amount: Option<i64>
The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer’s account, pass a negative amount.
description: Option<String>
An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
discountable: Option<bool>
Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
discounts: Option<Vec<DiscountsDataParam>>
The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
invoice_item: Option<String>
ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
metadata: Option<HashMap<String, String>>
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.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
period: Option<Period>
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have Stripe Revenue Recognition enabled, the period will be used to recognize and defer revenue. See the Revenue Recognition documentation for details.
price_data: Option<AddLinesInvoiceLinesPriceData>
Data used to generate a new Price object inline.
pricing: Option<PricingParam>
The pricing information for the invoice item.
quantity: Option<u64>
Non-negative integer. The quantity of units for the line item.
tax_amounts: Option<Vec<AddLinesInvoiceLinesTaxAmounts>>
A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts.
tax_rates: Option<Vec<String>>
The tax rates which apply to the line item.
When set, the default_tax_rates
on the invoice do not apply to this line item.
Pass an empty string to remove previously-defined tax rates.
Implementations§
Trait Implementations§
Source§impl Clone for AddLinesInvoiceLines
impl Clone for AddLinesInvoiceLines
Source§fn clone(&self) -> AddLinesInvoiceLines
fn clone(&self) -> AddLinesInvoiceLines
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more