fireblocks_sdk/models/create_webhook_request.rs
1// Fireblocks API
2//
3// 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)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10 crate::models,
11 serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateWebhookRequest {
16 /// The url of the webhook where notifications will be sent. URL must be
17 /// valid, unique and https.
18 #[serde(rename = "url")]
19 pub url: String,
20 /// description of the webhook. should not contain special characters.
21 #[serde(rename = "description")]
22 pub description: String,
23 /// event types the webhook will subscribe to
24 #[serde(rename = "events")]
25 pub events: Vec<models::WebhookEvent>,
26 /// The status of the webhook. If false, the webhook will not receive
27 /// notifications.
28 #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
29 pub enabled: Option<bool>,
30}
31
32impl CreateWebhookRequest {
33 pub fn new(
34 url: String,
35 description: String,
36 events: Vec<models::WebhookEvent>,
37 ) -> CreateWebhookRequest {
38 CreateWebhookRequest {
39 url,
40 description,
41 events,
42 enabled: None,
43 }
44 }
45}