#![allow(missing_docs)]
//! User profile types.
use serde::Deserialize;
/// Response from `GET /v2/profile`.
///
/// Used to validate access token and check account setup.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UserProfile {
/// User-specific identification generated by Dhan.
pub dhan_client_id: String,
/// Validity date and time for the access token.
pub token_validity: String,
/// All active segments in the user's account (comma-separated).
#[serde(default)]
pub active_segment: Option<String>,
/// DDPI status (`Active` / `Deactive`).
#[serde(default)]
pub ddpi: Option<String>,
/// MTF consent status (`Active` / `Deactive`).
#[serde(default)]
pub mtf: Option<String>,
/// Data API subscription status (`Active` / `Deactive`).
#[serde(default)]
pub data_plan: Option<String>,
/// Validity date and time for the Data API subscription.
#[serde(default)]
pub data_validity: Option<String>,
}