pub struct CatalogTax {
pub name: Option<String>,
pub calculation_phase: Option<TaxCalculationPhase>,
pub inclusion_type: Option<TaxInclusionType>,
pub percentage: Option<String>,
pub applies_to_custom_amounts: Option<bool>,
pub enabled: Option<bool>,
}
Expand description
A tax applicable to an item.
Fields§
§name: Option<String>
The tax’s name. This is a searchable attribute for use in applicable query filters, and its value length is of Unicode code points.
Max Length 255
calculation_phase: Option<TaxCalculationPhase>
Whether the tax is calculated based on a payment’s subtotal or total.
inclusion_type: Option<TaxInclusionType>
Whether the tax is ADDITIVE
or INCLUSIVE
.
percentage: Option<String>
The percentage of the tax in decimal form, using a '.'
as the decimal separator and
without a '%'
sign. A value of 7.5
corresponds to 7.5%.
applies_to_custom_amounts: Option<bool>
If true
, the fee applies to custom amounts entered into the Square Point of Sale app that
are not associated with a particular CatalogItem
.
enabled: Option<bool>
A Boolean flag to indicate whether the tax is displayed as enabled (true
) in the Square
Point of Sale app or not (false
).
Trait Implementations§
Source§impl Clone for CatalogTax
impl Clone for CatalogTax
Source§fn clone(&self) -> CatalogTax
fn clone(&self) -> CatalogTax
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CatalogTax
impl Debug for CatalogTax
Source§impl Default for CatalogTax
impl Default for CatalogTax
Source§fn default() -> CatalogTax
fn default() -> CatalogTax
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CatalogTax
impl<'de> Deserialize<'de> for CatalogTax
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
Source§impl PartialEq for CatalogTax
impl PartialEq for CatalogTax
Source§impl Serialize for CatalogTax
impl Serialize for CatalogTax
impl Eq for CatalogTax
impl StructuralPartialEq for CatalogTax
Auto Trait Implementations§
impl Freeze for CatalogTax
impl RefUnwindSafe for CatalogTax
impl Send for CatalogTax
impl Sync for CatalogTax
impl Unpin for CatalogTax
impl UnwindSafe for CatalogTax
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.