pub struct Totals {
pub subtotal: String,
pub discount: String,
pub tax: String,
pub total: String,
}
Expand description
Breakdown of a charge in the lowest denomination of a currency (e.g. cents for USD).
Fields§
§subtotal: String
Subtotal before discount, tax, and deductions. If an item, unit price multiplied by quantity.
discount: String
Total discount as a result of any discounts applied.
Except for percentage discounts, Paddle applies tax to discounts based on the line item price.tax_mode
. If price.tax_mode
for a line item is internal
, Paddle removes tax from the discount applied.
tax: String
Total tax on the subtotal.
total: String
Total after discount and tax.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Totals
impl<'de> Deserialize<'de> for Totals
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 Totals
impl RefUnwindSafe for Totals
impl Send for Totals
impl Sync for Totals
impl Unpin for Totals
impl UnwindSafe for Totals
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