fireblocks-sdk 2.1.0

Rust implementation of the Fireblocks SDK
Documentation
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateWebhookRequest {
    /// The url of the webhook where notifications will be sent. URL must be
    /// valid, unique and https.
    #[serde(rename = "url")]
    pub url: String,
    /// description of the webhook. should not contain special characters.
    #[serde(rename = "description")]
    pub description: String,
    /// event types the webhook will subscribe to
    #[serde(rename = "events")]
    pub events: Vec<models::WebhookEvent>,
    /// The status of the webhook. If false, the webhook will not receive
    /// notifications.
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
}

impl CreateWebhookRequest {
    pub fn new(
        url: String,
        description: String,
        events: Vec<models::WebhookEvent>,
    ) -> CreateWebhookRequest {
        CreateWebhookRequest {
            url,
            description,
            events,
            enabled: None,
        }
    }
}