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

/// InitSessionResponse : Subscriber session token and initial counts.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InitSessionResponse {
    /// Whether the project's plan allows removing Enbbox branding. `true` for Pro+ plans, `false` for Free.
    #[serde(rename = "remove_branding")]
    pub remove_branding: bool,
    /// Short-lived JWT for authenticating subsequent inbox requests.
    #[serde(rename = "token")]
    pub token: String,
    /// Current total unread notification count.
    #[serde(rename = "total_unread_count")]
    pub total_unread_count: i64,
}

impl InitSessionResponse {
    /// Subscriber session token and initial counts.
    pub fn new(remove_branding: bool, token: String, total_unread_count: i64) -> InitSessionResponse {
        InitSessionResponse {
            remove_branding,
            token,
            total_unread_count,
        }
    }
}