pub struct CreateTaxCalculationLineItems {
pub amount: i64,
pub product: Option<String>,
pub quantity: Option<u64>,
pub reference: Option<String>,
pub tax_behavior: Option<CreateTaxCalculationLineItemsTaxBehavior>,
pub tax_code: Option<String>,
}
Expand description
A list of items the customer is purchasing.
Fields§
§amount: i64
A positive integer representing the line item’s total price in the smallest currency unit.
If tax_behavior=inclusive
, then this amount includes taxes.
Otherwise, taxes are calculated on top of this amount.
product: Option<String>
If provided, the product’s tax_code
will be used as the line item’s tax_code
.
quantity: Option<u64>
The number of units of the item being purchased.
Used to calculate the per-unit price from the total amount
for the line.
For example, if amount=100
and quantity=4
, the calculated unit price is 25.
reference: Option<String>
A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported tax reports.
tax_behavior: Option<CreateTaxCalculationLineItemsTaxBehavior>
Specifies whether the amount
includes taxes. Defaults to exclusive
.
tax_code: Option<String>
A tax code ID to use for this line item.
If not provided, we will use the tax code from the provided product
param.
If neither tax_code
nor product
is provided, we will use the default tax code from your Tax Settings.
Implementations§
Trait Implementations§
Source§impl Clone for CreateTaxCalculationLineItems
impl Clone for CreateTaxCalculationLineItems
Source§fn clone(&self) -> CreateTaxCalculationLineItems
fn clone(&self) -> CreateTaxCalculationLineItems
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more