Enum square_api_client::models::enums::ExcludeStrategy
source · [−]pub enum ExcludeStrategy {
LeastExpensive,
MostExpensive,
}
Expand description
Indicates which products matched by a CatalogPricingRule will be excluded if the pricing rule uses an exclude set.
Variants
LeastExpensive
The least expensive matched products are excluded from the pricing. If the pricing rule is set to exclude one product and multiple products in the match set qualify as least expensive, then one will be excluded at random.
Excluding the least expensive product gives the best discount value to the buyer.
MostExpensive
The most expensive matched product is excluded from the pricing rule. If multiple products have the same price and all qualify as least expensive, one will be excluded at random.
This guarantees that the most expensive product is purchased at full price.
Trait Implementations
sourceimpl Clone for ExcludeStrategy
impl Clone for ExcludeStrategy
sourcefn clone(&self) -> ExcludeStrategy
fn clone(&self) -> ExcludeStrategy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ExcludeStrategy
impl Debug for ExcludeStrategy
sourceimpl<'de> Deserialize<'de> for ExcludeStrategy
impl<'de> Deserialize<'de> for ExcludeStrategy
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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ExcludeStrategy> for ExcludeStrategy
impl PartialEq<ExcludeStrategy> for ExcludeStrategy
sourcefn eq(&self, other: &ExcludeStrategy) -> bool
fn eq(&self, other: &ExcludeStrategy) -> bool
sourceimpl Serialize for ExcludeStrategy
impl Serialize for ExcludeStrategy
impl Eq for ExcludeStrategy
impl StructuralEq for ExcludeStrategy
impl StructuralPartialEq for ExcludeStrategy
Auto Trait Implementations
impl RefUnwindSafe for ExcludeStrategy
impl Send for ExcludeStrategy
impl Sync for ExcludeStrategy
impl Unpin for ExcludeStrategy
impl UnwindSafe for ExcludeStrategy
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
Mutably borrows from an owned value. Read more
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
Compare self to
key
and return true
if they are equal.