pub struct OrderLineItemAppliedDiscount {
pub uid: Option<String>,
pub discount_uid: String,
pub applied_money: Option<Money>,
}
Expand description
Represents an applied portion of a discount to a line item in an order.
Order scoped discounts have automatically applied discounts present for each line item. Line-item scoped discounts must have applied discounts added manually for any applicable line items. The corresponding applied money is automatically computed based on participating line items.
Fields§
§uid: Option<String>
A unique ID that identifies the applied discount only within this order.
discount_uid: String
The uid
of the discount that the applied discount represents. It must reference a discount
present in the order.discounts
field.
This field is immutable. To change which discounts apply to a line item, you must delete the
discount and re-add it as a new OrderLineItemAppliedDiscount
.
applied_money: Option<Money>
Read only The amount of money applied by the discount to the line item.
Trait Implementations§
Source§impl Clone for OrderLineItemAppliedDiscount
impl Clone for OrderLineItemAppliedDiscount
Source§fn clone(&self) -> OrderLineItemAppliedDiscount
fn clone(&self) -> OrderLineItemAppliedDiscount
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 OrderLineItemAppliedDiscount
impl Debug for OrderLineItemAppliedDiscount
Source§impl Default for OrderLineItemAppliedDiscount
impl Default for OrderLineItemAppliedDiscount
Source§fn default() -> OrderLineItemAppliedDiscount
fn default() -> OrderLineItemAppliedDiscount
Source§impl<'de> Deserialize<'de> for OrderLineItemAppliedDiscount
impl<'de> Deserialize<'de> for OrderLineItemAppliedDiscount
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 OrderLineItemAppliedDiscount
impl PartialEq for OrderLineItemAppliedDiscount
Source§fn eq(&self, other: &OrderLineItemAppliedDiscount) -> bool
fn eq(&self, other: &OrderLineItemAppliedDiscount) -> bool
self
and other
values to be equal, and is used by ==
.impl Eq for OrderLineItemAppliedDiscount
impl StructuralPartialEq for OrderLineItemAppliedDiscount
Auto Trait Implementations§
impl Freeze for OrderLineItemAppliedDiscount
impl RefUnwindSafe for OrderLineItemAppliedDiscount
impl Send for OrderLineItemAppliedDiscount
impl Sync for OrderLineItemAppliedDiscount
impl Unpin for OrderLineItemAppliedDiscount
impl UnwindSafe for OrderLineItemAppliedDiscount
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.