pub struct Item {
pub amount_discount: i64,
pub amount_subtotal: i64,
pub amount_tax: i64,
pub amount_total: i64,
pub currency: String,
pub description: String,
pub discounts: Option<Vec<LineItemsDiscountAmount>>,
pub id: String,
pub object: String,
pub price: Option<Value>,
pub quantity: Option<i64>,
pub taxes: Option<Vec<LineItemsTaxAmount>>,
}
Expand description
A line item.
Fields§
§amount_discount: i64
Total discount amount applied. If no discounts were applied, defaults to 0.
amount_subtotal: i64
Total before any discounts or taxes are applied.
amount_tax: i64
Total tax amount applied. If no tax was applied, defaults to 0.
amount_total: i64
Total after discounts and taxes.
currency: String
Three-letter ISO currency code, in lowercase. Must be a supported currency.
description: String
An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
discounts: Option<Vec<LineItemsDiscountAmount>>
The discounts applied to the line item.
id: String
Unique identifier for the object.
object: String
String representing the object’s type. Objects of the same type share the same value.
price: Option<Value>
The price used to generate the line item.
quantity: Option<i64>
The quantity of products being purchased.
taxes: Option<Vec<LineItemsTaxAmount>>
The taxes applied to the line item.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more