[−][src]Struct stripe::InvoiceItem
The resource representing a Stripe "InvoiceItem".
For more details see https://stripe.com/docs/api/invoiceitems/object.
Fields
id: InvoiceItemId
Unique identifier for the object.
amount: Option<i64>
Amount (in the currency
specified) of the invoice item.
This should always be equal to unit_amount * quantity
.
currency: Option<Currency>
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
customer: Option<Expandable<Customer>>
The ID of the customer who will be billed when this invoice item is billed.
date: Option<Timestamp>
deleted: bool
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 invoice item.
Always false for prorations.
invoice: Option<Expandable<Invoice>>
The ID of the invoice this invoice item belongs to.
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.
period: Option<Period>
plan: Option<Plan>
If the invoice item is a proration, the plan of the subscription that the proration was computed for.
proration: bool
Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
quantity: Option<u64>
Quantity of units for the invoice item.
If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
subscription: Option<Expandable<Subscription>>
The subscription that this invoice item has been created for, if any.
subscription_item: Option<String>
tax_rates: Option<Vec<TaxRate>>
The tax rates which apply to the invoice item.
When set, the default_tax_rates
on the invoice do not apply to this invoice item.
unit_amount: Option<i64>
Unit Amount (in the currency
specified) of the invoice item.
Methods
impl InvoiceItem
[src]
pub fn list(
client: &Client,
params: ListInvoiceItems
) -> Response<List<InvoiceItem>>
[src]
client: &Client,
params: ListInvoiceItems
) -> Response<List<InvoiceItem>>
Returns a list of your invoice items.
Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
pub fn create(
client: &Client,
params: CreateInvoiceItem
) -> Response<InvoiceItem>
[src]
client: &Client,
params: CreateInvoiceItem
) -> Response<InvoiceItem>
Creates an item to be added to a draft invoice.
If no invoice is specified, the item will be on the next invoice created for the customer specified.
pub fn retrieve(
client: &Client,
id: &InvoiceItemId,
expand: &[&str]
) -> Response<InvoiceItem>
[src]
client: &Client,
id: &InvoiceItemId,
expand: &[&str]
) -> Response<InvoiceItem>
Retrieves the invoice item with the given ID.
pub fn update(
client: &Client,
id: &InvoiceItemId,
params: UpdateInvoiceItem
) -> Response<InvoiceItem>
[src]
client: &Client,
id: &InvoiceItemId,
params: UpdateInvoiceItem
) -> Response<InvoiceItem>
Updates the amount or description of an invoice item on an upcoming invoice.
Updating an invoice item is only possible before the invoice it’s attached to is closed.
pub fn delete(
client: &Client,
id: &InvoiceItemId
) -> Response<Deleted<InvoiceItemId>>
[src]
client: &Client,
id: &InvoiceItemId
) -> Response<Deleted<InvoiceItemId>>
Deletes an invoice item, removing it from an invoice.
Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.
Trait Implementations
impl Object for InvoiceItem
[src]
type Id = InvoiceItemId
The canonical id type for this object.
fn id(&self) -> Self::Id
[src]
fn object(&self) -> &'static str
[src]
impl Clone for InvoiceItem
[src]
fn clone(&self) -> InvoiceItem
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for InvoiceItem
[src]
impl Serialize for InvoiceItem
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for InvoiceItem
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for InvoiceItem
impl Sync for InvoiceItem
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self