enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// DeliveryStatusWebhook : Inbound webhook payload for delivery status updates.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeliveryStatusWebhook {
    #[serde(rename = "detail", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub detail: Option<Option<serde_json::Value>>,
    #[serde(rename = "message_id")]
    pub message_id: String,
    #[serde(rename = "provider")]
    pub provider: String,
    /// Current status.
    #[serde(rename = "status")]
    pub status: String,
}

impl DeliveryStatusWebhook {
    /// Inbound webhook payload for delivery status updates.
    pub fn new(message_id: String, provider: String, status: String) -> DeliveryStatusWebhook {
        DeliveryStatusWebhook {
            detail: None,
            message_id,
            provider,
            status,
        }
    }
}