deriv_api_schema/
exchange_verification_code_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/exchange_verification_code/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
12
13/// Verifies the code and returns a new code if verification is successful
14#[derive(Debug, Clone, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub struct ExchangeVerificationCodeRequest {
17    /// Must be `1`\n
18    // Correct serde attribute construction - Use helper
19    
20    pub exchange_verification_code: i64,
21    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
22    // Correct serde attribute construction - Use helper
23    #[serde(skip_serializing_if = "Option::is_none")] 
24    pub passthrough: Option<Value>,
25    /// [Optional] Used to map request to response.\n
26    // Correct serde attribute construction - Use helper
27    #[serde(skip_serializing_if = "Option::is_none")] 
28    pub req_id: Option<i64>,
29    /// [Optional] Purpose of the token exchange.\n
30    // Correct serde attribute construction - Use helper
31    #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 
32    pub type_: Option<String>,
33    /// Email verification code (received from a `verify_email` call which must be done first).\n
34    // Correct serde attribute construction - Use helper
35    
36    pub verification_code: String,
37}
38