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};

/// CreateWebhook : Register a new webhook endpoint to receive event callbacks.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateWebhook {
    /// Event types this webhook subscribes to.
    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
    pub events: Option<Vec<String>>,
    /// Webhook callback URL.
    #[serde(rename = "url")]
    pub url: String,
}

impl CreateWebhook {
    /// Register a new webhook endpoint to receive event callbacks.
    pub fn new(url: String) -> CreateWebhook {
        CreateWebhook {
            events: None,
            url,
        }
    }
}