deriv_api_schema/new_account_real_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/new_account_real/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::tnc_acceptance::TncAcceptance;
13use crate::fatca_declaration::FatcaDeclaration;
14use crate::account_turnover::AccountTurnover;
15use crate::tin_skipped::TinSkipped;
16use crate::client_type::ClientType;
17
18/// This call opens a new real-money account. This call can be made from a virtual-money or a real-money account. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(rename_all = "snake_case")]
21pub struct NewAccountRealRequest {
22 /// Field 'account_opening_reason' mapped to Value due to complexity/potential issues.\n
23 // Correct serde attribute construction - Use helper
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub account_opening_reason: Option<Value>,
26 /// [Optional] The anticipated account turnover.\n
27 // Correct serde attribute construction - Use helper
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub account_turnover: Option<AccountTurnover>,
30 /// [Optional] Within 100 characters.\n
31 // Correct serde attribute construction - Use helper
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub address_city: Option<String>,
34 /// Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-\n
35 // Correct serde attribute construction - Use helper
36 #[serde(skip_serializing_if = "Option::is_none")]
37 pub address_line_1: Option<String>,
38 /// Field 'address_line_2' mapped to Value due to complexity/potential issues.\n
39 // Correct serde attribute construction - Use helper
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub address_line_2: Option<Value>,
42 /// [Optional] Within 20 characters and may not contain '+'.\n
43 // Correct serde attribute construction - Use helper
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub address_postcode: Option<String>,
46 /// [Optional] Possible value receive from `states_list` call.\n
47 // Correct serde attribute construction - Use helper
48 #[serde(skip_serializing_if = "Option::is_none")]
49 pub address_state: Option<String>,
50 /// [Optional] Affiliate token, within 32 characters.\n
51 // Correct serde attribute construction - Use helper
52 #[serde(skip_serializing_if = "Option::is_none")]
53 pub affiliate_token: Option<String>,
54 /// [Optional] The phone's calling country code. Don't include the `+` sign. Up to 4 digits.\n
55 // Correct serde attribute construction - Use helper
56 #[serde(skip_serializing_if = "Option::is_none")]
57 pub calling_country_code: Option<Value>,
58 /// [Optional] Country of legal citizenship, 2-letter country code.\n
59 // Correct serde attribute construction - Use helper
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub citizen: Option<Value>,
62 /// [Optional] Indicates whether this is for a client requesting an account with professional status.\n
63 // Correct serde attribute construction - Use helper
64 #[serde(skip_serializing_if = "Option::is_none")]
65 pub client_type: Option<ClientType>,
66 /// [Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.\n
67 // Correct serde attribute construction - Use helper
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub currency: Option<String>,
70 /// Date of birth format: `yyyy-mm-dd`.\n
71 // Correct serde attribute construction - Use helper
72 #[serde(skip_serializing_if = "Option::is_none")]
73 pub date_of_birth: Option<String>,
74 /// Employment Status.\n
75 // Correct serde attribute construction - Use helper
76 #[serde(skip_serializing_if = "Option::is_none")]
77 pub employment_status: Option<String>,
78 /// [Optional] Indicates client's self-declaration of FATCA.\n
79 // Correct serde attribute construction - Use helper
80 #[serde(skip_serializing_if = "Option::is_none")]
81 pub fatca_declaration: Option<FatcaDeclaration>,
82 /// [Optional] The version of the financial information form.\n
83 // Correct serde attribute construction - Use helper
84 #[serde(skip_serializing_if = "Option::is_none")]
85 pub financial_information_version: Option<String>,
86 /// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.\n
87 // Correct serde attribute construction - Use helper
88 #[serde(skip_serializing_if = "Option::is_none")]
89 pub first_name: Option<String>,
90 /// Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.\n
91 // Correct serde attribute construction - Use helper
92 #[serde(skip_serializing_if = "Option::is_none")]
93 pub last_name: Option<String>,
94 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
95 // Correct serde attribute construction - Use helper
96 #[serde(skip_serializing_if = "Option::is_none")]
97 pub loginid: Option<String>,
98 /// Must be `1`\n
99 // Correct serde attribute construction - Use helper
100
101 pub new_account_real: i64,
102 /// [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates).\n
103 // Correct serde attribute construction - Use helper
104 #[serde(skip_serializing_if = "Option::is_none")]
105 pub non_pep_declaration: Option<i64>,
106 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
107 // Correct serde attribute construction - Use helper
108 #[serde(skip_serializing_if = "Option::is_none")]
109 pub passthrough: Option<Value>,
110 /// [Optional] The phone's national format, don't include the `+` sign nor the calling country code. Up to 15 digits are allowed.\n
111 // Correct serde attribute construction - Use helper
112 #[serde(skip_serializing_if = "Option::is_none")]
113 pub phone: Option<Value>,
114 /// [Optional] Place of birth, 2-letter country code.\n
115 // Correct serde attribute construction - Use helper
116 #[serde(skip_serializing_if = "Option::is_none")]
117 pub place_of_birth: Option<String>,
118 /// [Optional] Used to map request to response.\n
119 // Correct serde attribute construction - Use helper
120 #[serde(skip_serializing_if = "Option::is_none")]
121 pub req_id: Option<i64>,
122 /// 2-letter country code, possible value receive from `residence_list` call.\n
123 // Correct serde attribute construction - Use helper
124 #[serde(skip_serializing_if = "Option::is_none")]
125 pub residence: Option<String>,
126 /// [Optional] Accept any value in enum list.\n
127 // Correct serde attribute construction - Use helper
128 #[serde(skip_serializing_if = "Option::is_none")]
129 pub salutation: Option<String>,
130 /// [Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client open another account.\n
131 // Correct serde attribute construction - Use helper
132 #[serde(skip_serializing_if = "Option::is_none")]
133 pub secret_answer: Option<String>,
134 /// [Optional] Accept any value in enum list. Required for new account and existing client details will be used if client open another account.\n
135 // Correct serde attribute construction - Use helper
136 #[serde(skip_serializing_if = "Option::is_none")]
137 pub secret_question: Option<String>,
138 /// [Optional] Tax identification number. Only applicable for real money account. Required for `maltainvest` landing company.\n
139 // Correct serde attribute construction - Use helper
140 #[serde(skip_serializing_if = "Option::is_none")]
141 pub tax_identification_number: Option<String>,
142 /// [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
143 // Correct serde attribute construction - Use helper
144 #[serde(skip_serializing_if = "Option::is_none")]
145 pub tax_residence: Option<String>,
146 /// [Optional] Whether the client has skipped the TIN form. Only applicable for real money account.\n
147 // Correct serde attribute construction - Use helper
148 #[serde(skip_serializing_if = "Option::is_none")]
149 pub tin_skipped: Option<TinSkipped>,
150 /// The tnc acceptance status of the user.\n
151 // Correct serde attribute construction - Use helper
152 #[serde(skip_serializing_if = "Option::is_none")]
153 pub tnc_acceptance: Option<TncAcceptance>,
154}
155