square_api_client/models/
catalog_tax.rs

1//! Model struct for CatalogTax type.
2
3use serde::{Deserialize, Serialize};
4
5use super::enums::{TaxCalculationPhase, TaxInclusionType};
6
7/// A tax applicable to an item.
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
9pub struct CatalogTax {
10    /// The tax's name. This is a searchable attribute for use in applicable query filters, and its
11    /// value length is of Unicode code points.
12    ///
13    /// Max Length 255
14    pub name: Option<String>,
15    /// Whether the tax is calculated based on a payment's subtotal or total.
16    pub calculation_phase: Option<TaxCalculationPhase>,
17    /// Whether the tax is `ADDITIVE` or `INCLUSIVE`.
18    pub inclusion_type: Option<TaxInclusionType>,
19    /// The percentage of the tax in decimal form, using a `'.'` as the decimal separator and
20    /// without a `'%'` sign. A value of `7.5` corresponds to 7.5%.
21    pub percentage: Option<String>,
22    /// If `true`, the fee applies to custom amounts entered into the Square Point of Sale app that
23    /// are not associated with a particular `CatalogItem`.
24    pub applies_to_custom_amounts: Option<bool>,
25    /// A Boolean flag to indicate whether the tax is displayed as enabled (`true`) in the Square
26    /// Point of Sale app or not (`false`).
27    pub enabled: Option<bool>,
28}