deriv_api_schema/
set_settings_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/set_settings/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::trading_hub::TradingHub;
13use crate::feature_flag::FeatureFlag;
14use crate::tin_skipped::TinSkipped;
15
16/// Set User Settings (this call should be used in conjunction with `get_settings`)
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(rename_all = "snake_case")]
19pub struct SetSettingsRequest {
20    /// Field 'account_opening_reason' mapped to Value due to complexity/potential issues.\n
21    // Correct serde attribute construction - Use helper
22    #[serde(skip_serializing_if = "Option::is_none")] 
23    pub account_opening_reason: Option<Value>,
24    /// [Optional] Note: not applicable for virtual account. Required field for real money account.\n
25    // Correct serde attribute construction - Use helper
26    #[serde(skip_serializing_if = "Option::is_none")] 
27    pub address_city: Option<String>,
28    /// [Optional] Note: not applicable for virtual account. Required field for real money account.\n
29    // Correct serde attribute construction - Use helper
30    #[serde(skip_serializing_if = "Option::is_none")] 
31    pub address_line_1: Option<String>,
32    /// Field 'address_line_2' mapped to Value due to complexity/potential issues.\n
33    // Correct serde attribute construction - Use helper
34    #[serde(skip_serializing_if = "Option::is_none")] 
35    pub address_line_2: Option<Value>,
36    /// [Optional] Note: not applicable for virtual account. Optional field for real money account.\n
37    // Correct serde attribute construction - Use helper
38    #[serde(skip_serializing_if = "Option::is_none")] 
39    pub address_postcode: Option<String>,
40    /// [Optional] Note: not applicable for virtual account. Optional field for real money account.\n
41    // Correct serde attribute construction - Use helper
42    #[serde(skip_serializing_if = "Option::is_none")] 
43    pub address_state: Option<String>,
44    /// [Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.\n
45    // Correct serde attribute construction - Use helper
46    #[serde(skip_serializing_if = "Option::is_none")] 
47    pub allow_copiers: Option<String>,
48    /// [Optional] The phone's calling country code. Don't include the `+` sign. Up to 4 digits.\n
49    // Correct serde attribute construction - Use helper
50    #[serde(skip_serializing_if = "Option::is_none")] 
51    pub calling_country_code: Option<Value>,
52    /// [Optional] Country of legal citizenship, 2-letter country code.\n
53    // Correct serde attribute construction - Use helper
54    #[serde(skip_serializing_if = "Option::is_none")] 
55    pub citizen: Option<Value>,
56    /// [Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).\n
57    // Correct serde attribute construction - Use helper
58    #[serde(skip_serializing_if = "Option::is_none")] 
59    pub date_of_birth: Option<String>,
60    /// Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.\n
61    // Correct serde attribute construction - Use helper
62    #[serde(skip_serializing_if = "Option::is_none")] 
63    pub dxtrade_user_exception: Option<String>,
64    /// [Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing\n
65    // Correct serde attribute construction - Use helper
66    #[serde(skip_serializing_if = "Option::is_none")] 
67    pub email_consent: Option<String>,
68    /// [Optional] Employment Status.\n
69    // Correct serde attribute construction - Use helper
70    #[serde(skip_serializing_if = "Option::is_none")] 
71    pub employment_status: Option<String>,
72    /// [Optional] Enable or disable one or multiple features.\n
73    // Correct serde attribute construction - Use helper
74    #[serde(skip_serializing_if = "Option::is_none")] 
75    pub feature_flag: Option<FeatureFlag>,
76    /// [Optional] The version of the financial information\n
77    // Correct serde attribute construction - Use helper
78    #[serde(skip_serializing_if = "Option::is_none")] 
79    pub financial_information_version: Option<String>,
80    /// [Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).\n
81    // Correct serde attribute construction - Use helper
82    #[serde(skip_serializing_if = "Option::is_none")] 
83    pub first_name: Option<String>,
84    /// [Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).\n
85    // Correct serde attribute construction - Use helper
86    #[serde(skip_serializing_if = "Option::is_none")] 
87    pub last_name: Option<String>,
88    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
89    // Correct serde attribute construction - Use helper
90    #[serde(skip_serializing_if = "Option::is_none")] 
91    pub loginid: Option<String>,
92    /// [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.\n
93    // Correct serde attribute construction - Use helper
94    #[serde(skip_serializing_if = "Option::is_none")] 
95    pub non_pep_declaration: Option<i64>,
96    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
97    // Correct serde attribute construction - Use helper
98    #[serde(skip_serializing_if = "Option::is_none")] 
99    pub passthrough: Option<Value>,
100    /// [Optional] The phone's national format, don't include the `+` sign nor the calling country code. Up to 15 digits are allowed.\n
101    // Correct serde attribute construction - Use helper
102    #[serde(skip_serializing_if = "Option::is_none")] 
103    pub phone: Option<Value>,
104    /// [Optional] Place of birth, 2-letter country code.\n
105    // Correct serde attribute construction - Use helper
106    #[serde(skip_serializing_if = "Option::is_none")] 
107    pub place_of_birth: Option<String>,
108    /// [Optional] User's preferred language, ISO standard language code\n
109    // Correct serde attribute construction - Use helper
110    #[serde(skip_serializing_if = "Option::is_none")] 
111    pub preferred_language: Option<Value>,
112    /// [Optional] Used to map request to response.\n
113    // Correct serde attribute construction - Use helper
114    #[serde(skip_serializing_if = "Option::is_none")] 
115    pub req_id: Option<i64>,
116    /// [Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.\n
117    // Correct serde attribute construction - Use helper
118    #[serde(skip_serializing_if = "Option::is_none")] 
119    pub request_professional_status: Option<i64>,
120    /// [Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.\n
121    // Correct serde attribute construction - Use helper
122    #[serde(skip_serializing_if = "Option::is_none")] 
123    pub residence: Option<Value>,
124    /// [Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).\n
125    // Correct serde attribute construction - Use helper
126    #[serde(skip_serializing_if = "Option::is_none")] 
127    pub salutation: Option<String>,
128    /// [Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.\n
129    // Correct serde attribute construction - Use helper
130    #[serde(skip_serializing_if = "Option::is_none")] 
131    pub secret_answer: Option<String>,
132    /// [Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.\n
133    // Correct serde attribute construction - Use helper
134    #[serde(skip_serializing_if = "Option::is_none")] 
135    pub secret_question: Option<String>,
136    /// Must be `1`\n
137    // Correct serde attribute construction - Use helper
138    
139    pub set_settings: i64,
140    /// [Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.\n
141    // Correct serde attribute construction - Use helper
142    #[serde(skip_serializing_if = "Option::is_none")] 
143    pub tax_identification_number: Option<String>,
144    /// [Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.\n
145    // Correct serde attribute construction - Use helper
146    #[serde(skip_serializing_if = "Option::is_none")] 
147    pub tax_residence: Option<String>,
148    /// [Optional] Whether the client has skipped the TIN form. Only applicable for real money account.\n
149    // Correct serde attribute construction - Use helper
150    #[serde(skip_serializing_if = "Option::is_none")] 
151    pub tin_skipped: Option<TinSkipped>,
152    /// [Optional] Enable/Disable Trading Hub dashboard\n
153    // Correct serde attribute construction - Use helper
154    #[serde(skip_serializing_if = "Option::is_none")] 
155    pub trading_hub: Option<TradingHub>,
156}
157