autogen_squareup/models/customer_custom_attribute_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/// CustomerCustomAttributeUpdatedEvent : Published when a customer [custom attribute](entity:CustomAttribute) owned by the subscribing application is created or updated. Custom attributes are owned by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application. This event is replaced by [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CustomerCustomAttributeUpdatedEvent {
17 /// The ID of the seller associated with the event that triggered the event notification.
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 this event. The value is `\"customer.custom_attribute.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 /// A unique ID for the event notification.
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 that indicates when the event notification 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::CustomAttributeEventData>>,
31}
32
33impl CustomerCustomAttributeUpdatedEvent {
34 /// Published when a customer [custom attribute](entity:CustomAttribute) owned by the subscribing application is created or updated. Custom attributes are owned by the application that created the corresponding [custom attribute definition](entity:CustomAttributeDefinition). Custom attributes whose `visibility` is `VISIBILITY_READ_WRITE_VALUES` can be created or updated by any application. This event is replaced by [customer.custom_attribute.owned.updated](webhook:customer.custom_attribute.owned.updated).
35 pub fn new() -> CustomerCustomAttributeUpdatedEvent {
36 CustomerCustomAttributeUpdatedEvent {
37 merchant_id: None,
38 r#type: None,
39 event_id: None,
40 created_at: None,
41 data: None,
42 }
43 }
44}
45