Struct square_api_client::models::OrderReturnTax
source · [−]pub struct OrderReturnTax {
pub uid: Option<String>,
pub source_tax_id: Option<String>,
pub catalog_object_id: Option<String>,
pub catalog_version: Option<i64>,
pub name: Option<String>,
pub type: Option<OrderLineItemTaxType>,
pub percentage: Option<String>,
pub applied_money: Option<Money>,
pub scope: Option<OrderLineItemTaxScope>,
}
Expand description
Represents a tax being returned that applies to one or more return line items in an order.
Fixed-amount, order-scoped taxes are distributed across all non-zero return line item totals. The amount distributed to each return line item is relative to that item’s contribution to the order subtotal.
Fields
uid: Option<String>
A unique ID that identifies the returned tax only within this order.
source_tax_id: Option<String>
The tax uid
from the order that contains the original tax charge.
catalog_object_id: Option<String>
The catalog object ID referencing [CatalogTax].
catalog_version: Option<i64>
The version of the catalog object that this tax references.
name: Option<String>
The tax’s name.
type: Option<OrderLineItemTaxType>
Indicates the calculation method used to apply the tax.
percentage: Option<String>
The percentage of the tax, as a string representation of a decimal number. For example, a value of “7.25” corresponds to a percentage of 7.25%.
applied_money: Option<Money>
The amount of money applied by the tax in an order.
scope: Option<OrderLineItemTaxScope>
Indicates the level at which the OrderReturnTax
applies. For ORDER
scoped taxes, Square
generates references in applied_taxes
on all OrderReturnLineItems
. For LINE_ITEM
scoped taxes, the tax is only applied to OrderReturnLineItems
with references in their
applied_discounts
field.
Trait Implementations
sourceimpl Clone for OrderReturnTax
impl Clone for OrderReturnTax
sourcefn clone(&self) -> OrderReturnTax
fn clone(&self) -> OrderReturnTax
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for OrderReturnTax
impl Debug for OrderReturnTax
sourceimpl Default for OrderReturnTax
impl Default for OrderReturnTax
sourcefn default() -> OrderReturnTax
fn default() -> OrderReturnTax
sourceimpl<'de> Deserialize<'de> for OrderReturnTax
impl<'de> Deserialize<'de> for OrderReturnTax
sourcefn 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>,
sourceimpl PartialEq<OrderReturnTax> for OrderReturnTax
impl PartialEq<OrderReturnTax> for OrderReturnTax
sourcefn eq(&self, other: &OrderReturnTax) -> bool
fn eq(&self, other: &OrderReturnTax) -> bool
sourceimpl Serialize for OrderReturnTax
impl Serialize for OrderReturnTax
impl Eq for OrderReturnTax
impl StructuralEq for OrderReturnTax
impl StructuralPartialEq for OrderReturnTax
Auto Trait Implementations
impl RefUnwindSafe for OrderReturnTax
impl Send for OrderReturnTax
impl Sync for OrderReturnTax
impl Unpin for OrderReturnTax
impl UnwindSafe for OrderReturnTax
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.