squareup/models/checkout_location_settings_tipping.rs
1//! Model struct for CheckoutLocationSettingsTipping type
2
3use crate::models::Money;
4use serde::{Deserialize, Serialize};
5
6#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
7pub struct CheckoutLocationSettingsTipping {
8 /// Set three custom percentage amounts that buyers can select at checkout. If Smart Tip is
9 /// enabled, this only applies to transactions totaling $10 or more.
10 /// Max Length 3
11 pub percentages: Option<Vec<String>>,
12 /// Enables Smart Tip Amounts. If Smart Tip Amounts is enabled, tipping works as follows: If a
13 /// transaction is less than $10, the available tipping options include No Tip, $1, $2, or $3.
14 /// If a transaction is $10 or more, the available tipping options include No Tip, 15%, 20%, or
15 /// 25%. You can set custom percentage amounts with the percentages field.
16 pub smart_tipping_enabled: Option<bool>,
17 /// Set the pre-selected percentage amounts that appear at checkout. If Smart Tip is enabled,
18 /// this only applies to transactions totaling $10 or more.
19 pub default_percent: Option<i32>,
20 /// Show the Smart Tip Amounts for this location.
21 pub smart_tips: Option<Vec<Money>>,
22 /// Set the pre-selected whole amount that appears at checkout when Smart Tip is enabled and
23 /// the transaction amount is less than $10.
24 pub default_smart_tip: Option<Money>,
25}