btcpay_client/models/
webhook_delivery_data.rs

1/*
2 * BTCPay Greenfield API
3 *
4 * A full API to use your BTCPay Server
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct WebhookDeliveryData {
16    /// The id of the delivery
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    /// Timestamp of when the delivery got broadcasted
20    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
21    pub timestamp: Option<f32>,
22    /// HTTP code received by the remote service, if any.
23    #[serde(rename = "httpCode", skip_serializing_if = "Option::is_none")]
24    pub http_code: Option<f32>,
25    /// User friendly error message, if any.
26    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
27    pub error_message: Option<String>,
28    /// Whether the delivery failed or not (possible values are: `Failed`, `HttpError`, `HttpSuccess`)
29    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30    pub status: Option<String>,
31}
32
33impl WebhookDeliveryData {
34    pub fn new() -> WebhookDeliveryData {
35        WebhookDeliveryData {
36            id: None,
37            timestamp: None,
38            http_code: None,
39            error_message: None,
40            status: None,
41        }
42    }
43}
44
45