dhan_rs/types/profile.rs
1#![allow(missing_docs)]
2//! User profile types.
3
4use serde::Deserialize;
5
6/// Response from `GET /v2/profile`.
7///
8/// Used to validate access token and check account setup.
9#[derive(Debug, Clone, Deserialize)]
10#[serde(rename_all = "camelCase")]
11pub struct UserProfile {
12 /// User-specific identification generated by Dhan.
13 pub dhan_client_id: String,
14 /// Validity date and time for the access token.
15 pub token_validity: String,
16 /// All active segments in the user's account (comma-separated).
17 #[serde(default)]
18 pub active_segment: Option<String>,
19 /// DDPI status (`Active` / `Deactive`).
20 #[serde(default)]
21 pub ddpi: Option<String>,
22 /// MTF consent status (`Active` / `Deactive`).
23 #[serde(default)]
24 pub mtf: Option<String>,
25 /// Data API subscription status (`Active` / `Deactive`).
26 #[serde(default)]
27 pub data_plan: Option<String>,
28 /// Validity date and time for the Data API subscription.
29 #[serde(default)]
30 pub data_validity: Option<String>,
31}