square_api_client/models/enums/exclude_strategy.rs
1//! Model for ExcludeStrategy enum.
2
3use serde::{Deserialize, Serialize};
4
5/// Indicates which products matched by a CatalogPricingRule will be excluded if the pricing rule
6/// uses an exclude set.
7#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
8#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
9pub enum ExcludeStrategy {
10 /// The least expensive matched products are excluded from the pricing. If the pricing rule is
11 /// set to exclude one product and multiple products in the match set qualify as least
12 /// expensive, then one will be excluded at random.
13 ///
14 /// Excluding the least expensive product gives the best discount value to the buyer.
15 LeastExpensive,
16 /// The most expensive matched product is excluded from the pricing rule. If multiple products
17 /// have the same price and all qualify as least expensive, one will be excluded at random.
18 ///
19 /// This guarantees that the most expensive product is purchased at full price.
20 MostExpensive,
21}