Skip to main content

autogen_squareup/models/
customer_created_event_data.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/// CustomerCreatedEventData : The data associated with the event.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CustomerCreatedEventData {
17    /// The type of object affected by the event. For this event, the value is `customer`.
18    #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub r#type: Option<Option<String>>,
20    /// The ID of the new customer.
21    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22    pub id: Option<String>,
23    #[serde(rename = "object", skip_serializing_if = "Option::is_none")]
24    pub object: Option<Box<models::CustomerCreatedEventObject>>,
25}
26
27impl CustomerCreatedEventData {
28    /// The data associated with the event.
29    pub fn new() -> CustomerCreatedEventData {
30        CustomerCreatedEventData {
31            r#type: None,
32            id: None,
33            object: None,
34        }
35    }
36}
37