autogen_squareup/models/subscription_test_result.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/// SubscriptionTestResult : Represents the details of a webhook subscription, including notification URL, event types, and signature key.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SubscriptionTestResult {
17 /// A Square-generated unique ID for the subscription test result.
18 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19 pub id: Option<String>,
20 /// The status code returned by the subscription notification URL.
21 #[serde(rename = "status_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub status_code: Option<Option<i32>>,
23 /// An object containing the payload of the test event. For example, a `payment.created` event.
24 #[serde(rename = "payload", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25 pub payload: Option<Option<String>>,
26 /// The timestamp of when the subscription was created, in RFC 3339 format. For example, \"2016-09-04T23:59:33.123Z\".
27 #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
28 pub created_at: Option<String>,
29 /// The timestamp of when the subscription was updated, in RFC 3339 format. For example, \"2016-09-04T23:59:33.123Z\". Because a subscription test result is unique, this field is the same as the `created_at` field.
30 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
31 pub updated_at: Option<String>,
32}
33
34impl SubscriptionTestResult {
35 /// Represents the details of a webhook subscription, including notification URL, event types, and signature key.
36 pub fn new() -> SubscriptionTestResult {
37 SubscriptionTestResult {
38 id: None,
39 status_code: None,
40 payload: None,
41 created_at: None,
42 updated_at: None,
43 }
44 }
45}
46