dodopayments_rust 2.2.2

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PatchWebhookRequest {
    /// Description of the webhook
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// To Disable the endpoint, set it to true.
    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
    pub disabled: Option<bool>,
    /// Filter events to the endpoint.  Webhook event will only be sent for events in the list.
    #[serde(rename = "filter_types", skip_serializing_if = "Option::is_none")]
    pub filter_types: Option<Vec<models::EventType>>,
    /// Metadata
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    /// Rate limit
    #[serde(rename = "rate_limit", skip_serializing_if = "Option::is_none")]
    pub rate_limit: Option<i32>,
    /// Url endpoint
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
}

impl PatchWebhookRequest {
    pub fn new() -> PatchWebhookRequest {
        PatchWebhookRequest {
            description: None,
            disabled: None,
            filter_types: None,
            metadata: None,
            rate_limit: None,
            url: None,
        }
    }
}