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
sourceimpl Clone for OrderLineItemAppliedDiscount
impl Clone for OrderLineItemAppliedDiscount
sourcefn clone(&self) -> OrderLineItemAppliedDiscount
fn clone(&self) -> OrderLineItemAppliedDiscount
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for OrderLineItemAppliedDiscount
impl Debug for OrderLineItemAppliedDiscount
sourceimpl Default for OrderLineItemAppliedDiscount
impl Default for OrderLineItemAppliedDiscount
sourcefn default() -> OrderLineItemAppliedDiscount
fn default() -> OrderLineItemAppliedDiscount
sourceimpl<'de> Deserialize<'de> for OrderLineItemAppliedDiscount
impl<'de> Deserialize<'de> for OrderLineItemAppliedDiscount
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<OrderLineItemAppliedDiscount> for OrderLineItemAppliedDiscount
impl PartialEq<OrderLineItemAppliedDiscount> for OrderLineItemAppliedDiscount
sourcefn eq(&self, other: &OrderLineItemAppliedDiscount) -> bool
fn eq(&self, other: &OrderLineItemAppliedDiscount) -> bool
impl Eq for OrderLineItemAppliedDiscount
impl StructuralEq for OrderLineItemAppliedDiscount
impl StructuralPartialEq for OrderLineItemAppliedDiscount
Auto Trait Implementations
impl RefUnwindSafe for OrderLineItemAppliedDiscount
impl Send for OrderLineItemAppliedDiscount
impl Sync for OrderLineItemAppliedDiscount
impl Unpin for OrderLineItemAppliedDiscount
impl UnwindSafe for OrderLineItemAppliedDiscount
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.