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 OutgoingWebhook {
    #[serde(rename = "business_id")]
    pub business_id: String,
    /// The latest data at the time of delivery attempt
    #[serde(rename = "data")]
    pub data: Box<models::OutgoingWebhookData>,
    /// The timestamp of when the event occurred (not necessarily the same of when it was delivered)
    #[serde(rename = "timestamp")]
    pub timestamp: String,
    #[serde(rename = "type")]
    pub r#type: models::EventType,
}

impl OutgoingWebhook {
    pub fn new(business_id: String, data: models::OutgoingWebhookData, timestamp: String, r#type: models::EventType) -> OutgoingWebhook {
        OutgoingWebhook {
            business_id,
            data: Box::new(data),
            timestamp,
            r#type,
        }
    }
}