deriv_api_schema/
trading_platform_password_reset_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/trading_platform_password_reset/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12use crate::platform::Platform;
13
14/// Reset the password of a Trading Platform Account
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct TradingPlatformPasswordResetRequest {
18    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
19    // Correct serde attribute construction - Use helper
20    #[serde(skip_serializing_if = "Option::is_none")] 
21    pub loginid: Option<String>,
22    /// New password of the account. For validation (Accepts any printable ASCII character. DerivX: Must be within 8-25 characters, include numbers, lowercase, uppercase letters. Must not be the same as the user's email address). Accepts any printable ASCII character. MT5: Must be within 8-16 characters, include numbers, lowercase, uppercase letters and special characters. Must not be the same as the user's email address.\n
23    // Correct serde attribute construction - Use helper
24    
25    pub new_password: String,
26    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
27    // Correct serde attribute construction - Use helper
28    #[serde(skip_serializing_if = "Option::is_none")] 
29    pub passthrough: Option<Value>,
30    /// Name of trading platform.\n
31    // Correct serde attribute construction - Use helper
32    
33    pub platform: Platform,
34    /// [Optional] Used to map request to response.\n
35    // Correct serde attribute construction - Use helper
36    #[serde(skip_serializing_if = "Option::is_none")] 
37    pub req_id: Option<i64>,
38    /// Must be `1`\n
39    // Correct serde attribute construction - Use helper
40    
41    pub trading_platform_password_reset: i64,
42    /// Email verification code (received from a `verify_email` call, which must be done first)\n
43    // Correct serde attribute construction - Use helper
44    
45    pub verification_code: String,
46}
47