deriv_api_schema/
verify_email_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/verify_email/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::type_::Type;
13use crate::url_parameters::UrlParameters;
14
15/// Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct VerifyEmailRequest {
19    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
20    // Correct serde attribute construction - Use helper
21    #[serde(skip_serializing_if = "Option::is_none")] 
22    pub loginid: Option<String>,
23    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub passthrough: Option<Value>,
27    /// [Optional] Used to map request to response.\n
28    // Correct serde attribute construction - Use helper
29    #[serde(skip_serializing_if = "Option::is_none")] 
30    pub req_id: Option<i64>,
31    /// Purpose of email verification, request_email and reset_password are the only two types restricted from all unoffical apps\n
32    // Correct serde attribute construction - Use helper
33    #[serde(rename = "type")] 
34    pub type_: Type,
35    /// [Optional] Extra parameters that can be attached to the verify email link URL.\n
36    // Correct serde attribute construction - Use helper
37    #[serde(skip_serializing_if = "Option::is_none")] 
38    pub url_parameters: Option<UrlParameters>,
39    /// Email address to be verified.\n
40    // Correct serde attribute construction - Use helper
41    
42    pub verify_email: String,
43}
44