Skip to main content

autogen_squareup/models/
labor_shift_updated_event.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/// LaborShiftUpdatedEvent : Published when a [Shift](entity:Shift) is updated.  Deprecated at Square API version 2025-05-21. Replaced by `labor.timecard.updated`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct LaborShiftUpdatedEvent {
17    /// The ID of the merchant associated with the event.
18    #[serde(rename = "merchant_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub merchant_id: Option<Option<String>>,
20    /// The type of event. For this event, the value is `labor.shift.updated`.
21    #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub r#type: Option<Option<String>>,
23    /// The unique ID for the event.
24    #[serde(rename = "event_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub event_id: Option<Option<String>>,
26    /// The timestamp of when the event was created, in RFC 3339 format.
27    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
28    pub created_at: Option<String>,
29    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
30    pub data: Option<Box<models::LaborShiftUpdatedEventData>>,
31}
32
33impl LaborShiftUpdatedEvent {
34    /// Published when a [Shift](entity:Shift) is updated.  Deprecated at Square API version 2025-05-21. Replaced by `labor.timecard.updated`.
35    pub fn new() -> LaborShiftUpdatedEvent {
36        LaborShiftUpdatedEvent {
37            merchant_id: None,
38            r#type: None,
39            event_id: None,
40            created_at: None,
41            data: None,
42        }
43    }
44}
45