Skip to main content

autogen_squareup/models/
business_appointment_settings_alignment_time.rs

1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BusinessAppointmentSettingsAlignmentTime : Time units of a service duration for bookings.
15/// Time units of a service duration for bookings.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum BusinessAppointmentSettingsAlignmentTime {
18    #[serde(rename = "SERVICE_DURATION")]
19    ServiceDuration,
20    #[serde(rename = "QUARTER_HOURLY")]
21    QuarterHourly,
22    #[serde(rename = "HALF_HOURLY")]
23    HalfHourly,
24    #[serde(rename = "HOURLY")]
25    Hourly,
26
27}
28
29impl std::fmt::Display for BusinessAppointmentSettingsAlignmentTime {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::ServiceDuration => write!(f, "SERVICE_DURATION"),
33            Self::QuarterHourly => write!(f, "QUARTER_HOURLY"),
34            Self::HalfHourly => write!(f, "HALF_HOURLY"),
35            Self::Hourly => write!(f, "HOURLY"),
36        }
37    }
38}
39
40impl Default for BusinessAppointmentSettingsAlignmentTime {
41    fn default() -> BusinessAppointmentSettingsAlignmentTime {
42        Self::ServiceDuration
43    }
44}
45