square_api_client/models/
calculate_order_request.rs

1//! Model struct for CalculateOrderRequest type
2
3use serde::Serialize;
4
5use super::{Order, OrderReward};
6
7/// This is a model struct for CalculateOrderRequest type
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct CalculateOrderRequest {
10    /// The order to be calculated. Expects the entire order, not a sparse update.
11    pub order: Order,
12    /// Identifies one or more loyalty reward tiers to apply during the order calculation. The
13    /// discounts defined by the reward tiers are added to the order only to preview the effect of
14    /// applying the specified rewards. The rewards do not correspond to actual redemptions; that
15    /// is, no `reward`s are created. Therefore, the reward `id`s are random strings used only to
16    /// reference the reward tier.
17    pub proposed_rewards: Option<Vec<OrderReward>>,
18}