pub struct TaxCalculation {Show 14 fields
pub amount_total: i64,
pub currency: String,
pub customer: Option<String>,
pub customer_details: TaxProductResourceCustomerDetails,
pub expires_at: Option<i64>,
pub id: Option<String>,
pub line_items: Option<TaxProductResourceTaxCalculationLineItemList>,
pub livemode: bool,
pub object: String,
pub shipping_cost: Option<Value>,
pub tax_amount_exclusive: i64,
pub tax_amount_inclusive: i64,
pub tax_breakdown: Vec<TaxProductResourceTaxBreakdown>,
pub tax_date: i64,
}Expand description
A Tax Calculation allows you to calculate the tax to collect from your customer.
Related guide: Calculate tax in your custom payment flow
Fields§
§amount_total: i64Total after taxes.
currency: StringThree-letter ISO currency code, in lowercase. Must be a supported currency.
customer: Option<String>The ID of an existing Customer used for the resource.
customer_details: TaxProductResourceCustomerDetails§expires_at: Option<i64>Timestamp of date at which the tax calculation will expire.
id: Option<String>Unique identifier for the calculation.
line_items: Option<TaxProductResourceTaxCalculationLineItemList>The list of items the customer is purchasing.
livemode: boolHas the value true if the object exists in live mode or the value false if the object exists in test mode.
object: StringString representing the object’s type. Objects of the same type share the same value.
shipping_cost: Option<Value>The shipping cost details for the calculation.
tax_amount_exclusive: i64The amount of tax to be collected on top of the line item prices.
tax_amount_inclusive: i64The amount of tax already included in the line item prices.
tax_breakdown: Vec<TaxProductResourceTaxBreakdown>Breakdown of individual tax amounts that add up to the total.
tax_date: i64Timestamp of date at which the tax rules and rates in effect applies for the calculation.
Trait Implementations§
Source§impl Clone for TaxCalculation
impl Clone for TaxCalculation
Source§fn clone(&self) -> TaxCalculation
fn clone(&self) -> TaxCalculation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more