deriv_api_schema/confirm_email_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/confirm_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::created_for::CreatedFor;
13
14/// Verifies the email for the user using verification code passed in the request object
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct ConfirmEmailRequest {
18 /// Must be `1`\n
19 // Correct serde attribute construction - Use helper
20
21 pub confirm_email: i64,
22 /// [Optional] Purpose of the email verification. If set to 'account_opening', the API will only return the verification response without updating the user's email verification status.\n
23 // Correct serde attribute construction - Use helper
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub created_for: Option<CreatedFor>,
26 /// Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.\n
27 // Correct serde attribute construction - Use helper
28
29 pub email_consent: String,
30 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
31 // Correct serde attribute construction - Use helper
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub passthrough: Option<Value>,
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 /// Email verification code (received from a `verify_email` call, which must be done first).\n
39 // Correct serde attribute construction - Use helper
40
41 pub verification_code: String,
42}
43