deriv_api_schema/
identity_verification_document_add_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/identity_verification_document_add/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/// Adds document information such as issuing country, id and type for identity verification processes.
14#[derive(Debug, Clone, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub struct IdentityVerificationDocumentAddRequest {
17    /// [Optional] Additional info required by some document types.\n
18    // Correct serde attribute construction - Use helper
19    #[serde(skip_serializing_if = "Option::is_none")] 
20    pub document_additional: Option<String>,
21    /// The identification number of the document.\n
22    // Correct serde attribute construction - Use helper
23    
24    pub document_number: String,
25    /// The type of the document based on provided `issuing_country` (can obtained from `residence_list` call).\n
26    // Correct serde attribute construction - Use helper
27    
28    pub document_type: String,
29    /// Must be `1`\n
30    // Correct serde attribute construction - Use helper
31    
32    pub identity_verification_document_add: i64,
33    /// 2-letter country code (can obtained from `residence_list` call).\n
34    // Correct serde attribute construction - Use helper
35    
36    pub issuing_country: String,
37    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
38    // Correct serde attribute construction - Use helper
39    #[serde(skip_serializing_if = "Option::is_none")] 
40    pub loginid: Option<String>,
41    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
42    // Correct serde attribute construction - Use helper
43    #[serde(skip_serializing_if = "Option::is_none")] 
44    pub passthrough: Option<Value>,
45    /// [Optional] Used to map request to response.\n
46    // Correct serde attribute construction - Use helper
47    #[serde(skip_serializing_if = "Option::is_none")] 
48    pub req_id: Option<i64>,
49}
50