pub struct ApplyPromotionsRequest {
pub cart_id: Option<CartId>,
pub customer_id: Option<CustomerId>,
pub coupon_codes: Vec<String>,
pub line_items: Vec<PromotionLineItem>,
pub subtotal: Decimal,
pub shipping_amount: Decimal,
pub shipping_country: Option<String>,
pub shipping_state: Option<String>,
pub currency: CurrencyCode,
pub is_first_order: bool,
}Expand description
Request to apply promotions to a cart
Fields§
§cart_id: Option<CartId>§customer_id: Option<CustomerId>§coupon_codes: Vec<String>§line_items: Vec<PromotionLineItem>§subtotal: Decimal§shipping_amount: Decimal§shipping_country: Option<String>§shipping_state: Option<String>§currency: CurrencyCode§is_first_order: boolTrait Implementations§
Source§impl Clone for ApplyPromotionsRequest
impl Clone for ApplyPromotionsRequest
Source§fn clone(&self) -> ApplyPromotionsRequest
fn clone(&self) -> ApplyPromotionsRequest
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 ApplyPromotionsRequest
impl Debug for ApplyPromotionsRequest
Source§impl Default for ApplyPromotionsRequest
impl Default for ApplyPromotionsRequest
Source§fn default() -> ApplyPromotionsRequest
fn default() -> ApplyPromotionsRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApplyPromotionsRequest
impl<'de> Deserialize<'de> for ApplyPromotionsRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplyPromotionsRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplyPromotionsRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ApplyPromotionsRequest
impl Serialize for ApplyPromotionsRequest
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 ApplyPromotionsRequest
impl RefUnwindSafe for ApplyPromotionsRequest
impl Send for ApplyPromotionsRequest
impl Sync for ApplyPromotionsRequest
impl Unpin for ApplyPromotionsRequest
impl UnsafeUnpin for ApplyPromotionsRequest
impl UnwindSafe for ApplyPromotionsRequest
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