pub struct ApplyPromotionsResult {
pub original_subtotal: Decimal,
pub total_discount: Decimal,
pub discounted_subtotal: Decimal,
pub original_shipping: Decimal,
pub shipping_discount: Decimal,
pub final_shipping: Decimal,
pub grand_total: Decimal,
pub applied_promotions: Vec<AppliedPromotion>,
pub rejected_promotions: Vec<RejectedPromotion>,
pub line_item_discounts: Vec<LineItemDiscount>,
}Expand description
Result of applying promotions
Fields§
§original_subtotal: DecimalOriginal subtotal
total_discount: DecimalTotal discount amount
discounted_subtotal: DecimalDiscounted subtotal
original_shipping: DecimalOriginal shipping
shipping_discount: DecimalShipping discount
final_shipping: DecimalFinal shipping
grand_total: DecimalGrand total after discounts
applied_promotions: Vec<AppliedPromotion>Applied promotions
rejected_promotions: Vec<RejectedPromotion>Rejected promotions (with reasons)
line_item_discounts: Vec<LineItemDiscount>Per-line-item discounts
Trait Implementations§
Source§impl Clone for ApplyPromotionsResult
impl Clone for ApplyPromotionsResult
Source§fn clone(&self) -> ApplyPromotionsResult
fn clone(&self) -> ApplyPromotionsResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApplyPromotionsResult
impl Debug for ApplyPromotionsResult
Source§impl Default for ApplyPromotionsResult
impl Default for ApplyPromotionsResult
Source§fn default() -> ApplyPromotionsResult
fn default() -> ApplyPromotionsResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApplyPromotionsResult
impl<'de> Deserialize<'de> for ApplyPromotionsResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplyPromotionsResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplyPromotionsResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ApplyPromotionsResult
impl Serialize for ApplyPromotionsResult
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ApplyPromotionsResult
impl RefUnwindSafe for ApplyPromotionsResult
impl Send for ApplyPromotionsResult
impl Sync for ApplyPromotionsResult
impl Unpin for ApplyPromotionsResult
impl UnsafeUnpin for ApplyPromotionsResult
impl UnwindSafe for ApplyPromotionsResult
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
Mutably borrows from an owned value. Read more