square_api_client/models/order_line_item_applied_tax.rs
1//! Model struct for OrderLineItemAppliedTax type
2
3use serde::{Deserialize, Serialize};
4
5use super::Money;
6
7/// Represents an applied portion of a tax to a line item in an order.
8///
9/// Order-scoped taxes automatically include the applied taxes in each line item. Line item taxes
10/// must be referenced from any applicable line items. The corresponding applied money is
11/// automatically computed, based on the set of participating line items.
12#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
13pub struct OrderLineItemAppliedTax {
14 /// A unique ID that identifies the applied tax only within this order.
15 pub uid: Option<String>,
16 /// The `uid` of the tax for which this applied tax represents. It must reference a tax present
17 /// in the `order.taxes` field.
18 ///
19 /// This field is immutable. To change which taxes apply to a line item, delete and add a new
20 /// `OrderLineItemAppliedTax`.
21 pub tax_uid: String,
22 /// **Read only** The amount of money applied by the tax to the line item.
23 pub applied_money: Option<Money>,
24}