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§
Source§impl Clone for OrderReturnTax
impl Clone for OrderReturnTax
Source§fn clone(&self) -> OrderReturnTax
fn clone(&self) -> OrderReturnTax
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OrderReturnTax
impl Debug for OrderReturnTax
Source§impl Default for OrderReturnTax
impl Default for OrderReturnTax
Source§fn default() -> OrderReturnTax
fn default() -> OrderReturnTax
Source§impl<'de> Deserialize<'de> for OrderReturnTax
impl<'de> Deserialize<'de> for OrderReturnTax
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>,
Source§impl PartialEq for OrderReturnTax
impl PartialEq for OrderReturnTax
Source§impl Serialize for OrderReturnTax
impl Serialize for OrderReturnTax
impl Eq for OrderReturnTax
impl StructuralPartialEq for OrderReturnTax
Auto Trait Implementations§
impl Freeze for OrderReturnTax
impl RefUnwindSafe for OrderReturnTax
impl Send for OrderReturnTax
impl Sync for OrderReturnTax
impl Unpin for OrderReturnTax
impl UnwindSafe for OrderReturnTax
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
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
key
and return true
if they are equal.