pub struct TaxRate {Show 17 fields
pub id: Uuid,
pub jurisdiction_id: Uuid,
pub tax_type: TaxType,
pub product_category: ProductTaxCategory,
pub rate: Decimal,
pub name: String,
pub description: Option<String>,
pub is_compound: bool,
pub priority: i32,
pub threshold_min: Option<Decimal>,
pub threshold_max: Option<Decimal>,
pub fixed_amount: Option<Decimal>,
pub effective_from: NaiveDate,
pub effective_to: Option<NaiveDate>,
pub active: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
A tax rate for a specific jurisdiction and category
Fields§
§id: Uuid§jurisdiction_id: UuidJurisdiction this rate applies to
tax_type: TaxTypeType of tax
product_category: ProductTaxCategoryProduct category this rate applies to
rate: DecimalTax rate as decimal (e.g., 0.0825 for 8.25%)
name: StringRate name for display (e.g., “California State Tax”)
description: Option<String>Description of the tax
is_compound: boolWhether rate is compound (applied after other taxes)
priority: i32Priority for ordering (lower = applied first)
threshold_min: Option<Decimal>Minimum amount for tax to apply
threshold_max: Option<Decimal>Maximum amount taxed (cap)
fixed_amount: Option<Decimal>Fixed amount instead of percentage
effective_from: NaiveDateEffective date
effective_to: Option<NaiveDate>Expiration date
active: boolWhether this rate is active
created_at: DateTime<Utc>§updated_at: DateTime<Utc>Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaxRate
impl<'de> Deserialize<'de> for TaxRate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaxRate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaxRate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TaxRate
impl Serialize for TaxRate
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 TaxRate
impl RefUnwindSafe for TaxRate
impl Send for TaxRate
impl Sync for TaxRate
impl Unpin for TaxRate
impl UnsafeUnpin for TaxRate
impl UnwindSafe for TaxRate
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