square_api_client/models/catalog_modifier.rs
1//! Model struct for CatalogModifier type.
2
3use serde::{Deserialize, Serialize};
4
5use super::Money;
6
7/// A modifier applicable to items at the time of sale.
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
9pub struct CatalogModifier {
10 /// The modifier name. This is a searchable attribute for use in applicable query filters, and
11 /// its value length is of Unicode code points.
12 ///
13 /// Max Length 255
14 pub name: Option<String>,
15 /// The modifier price.
16 pub price_money: Option<Money>,
17 /// Determines where this `CatalogModifier` appears in the `CatalogModifierList`.
18 pub ordinal: Option<i32>,
19 /// The ID of the `CatalogModifierList` associated with this modifier.
20 pub modifier_list_id: Option<String>,
21 /// The IDs of images associated with this `CatalogModifier` instance. Currently these images
22 /// are not displayed by Square, but are free to be displayed in 3rd party applications.
23 pub image_ids: Option<Vec<String>>,
24 /// If `true`, this `CatalogModifier` should be selected by default for this `CatalogItem`.
25 pub on_by_default: Option<bool>,
26}