pub struct TaxLineItem {
pub id: String,
pub sku: Option<String>,
pub product_id: Option<ProductId>,
pub quantity: Decimal,
pub unit_price: Decimal,
pub discount_amount: Decimal,
pub tax_category: ProductTaxCategory,
pub tax_code: Option<String>,
pub description: Option<String>,
}Expand description
A line item for tax calculation
Fields§
§id: StringLine item identifier
sku: Option<String>Product SKU
product_id: Option<ProductId>Product ID
quantity: DecimalQuantity
unit_price: DecimalUnit price
discount_amount: DecimalTotal discount on this line
tax_category: ProductTaxCategoryProduct tax category
tax_code: Option<String>Override tax code (e.g., Avalara tax code)
description: Option<String>Description for tax reporting
Trait Implementations§
Source§impl Clone for TaxLineItem
impl Clone for TaxLineItem
Source§fn clone(&self) -> TaxLineItem
fn clone(&self) -> TaxLineItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TaxLineItem
impl Debug for TaxLineItem
Source§impl Default for TaxLineItem
impl Default for TaxLineItem
Source§fn default() -> TaxLineItem
fn default() -> TaxLineItem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TaxLineItem
impl<'de> Deserialize<'de> for TaxLineItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaxLineItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaxLineItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TaxLineItem
impl Serialize for TaxLineItem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TaxLineItem
impl RefUnwindSafe for TaxLineItem
impl Send for TaxLineItem
impl Sync for TaxLineItem
impl Unpin for TaxLineItem
impl UnsafeUnpin for TaxLineItem
impl UnwindSafe for TaxLineItem
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