deriv_api_schema/
new_account_virtual_request.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/new_account_virtual/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::type_::Type;
13use crate::signup_device::SignupDevice;
14
15/// Create a new virtual-money account.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct NewAccountVirtualRequest {
19    /// [Optional] Affiliate token, within 100 characters.\n
20    // Correct serde attribute construction - Use helper
21    #[serde(skip_serializing_if = "Option::is_none")] 
22    pub affiliate_token: Option<String>,
23    /// Password (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub client_password: Option<String>,
27    /// [Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.\n
28    // Correct serde attribute construction - Use helper
29    #[serde(skip_serializing_if = "Option::is_none")] 
30    pub date_first_contact: Option<String>,
31    /// [Optional] Email address for signup.\n
32    // Correct serde attribute construction - Use helper
33    #[serde(skip_serializing_if = "Option::is_none")] 
34    pub email: Option<String>,
35    /// [Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.\n
36    // Correct serde attribute construction - Use helper
37    #[serde(skip_serializing_if = "Option::is_none")] 
38    pub email_consent: Option<String>,
39    /// [Optional] Google Click Identifier to track source.\n
40    // Correct serde attribute construction - Use helper
41    #[serde(skip_serializing_if = "Option::is_none")] 
42    pub gclid_url: Option<String>,
43    /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
44    // Correct serde attribute construction - Use helper
45    #[serde(skip_serializing_if = "Option::is_none")] 
46    pub loginid: Option<String>,
47    /// Field 'new_account_virtual' mapped to Value due to complexity/potential issues.\n
48    // Correct serde attribute construction - Use helper
49    
50    pub new_account_virtual: Value,
51    /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
52    // Correct serde attribute construction - Use helper
53    #[serde(skip_serializing_if = "Option::is_none")] 
54    pub passthrough: Option<Value>,
55    /// [Optional] Used to map request to response.\n
56    // Correct serde attribute construction - Use helper
57    #[serde(skip_serializing_if = "Option::is_none")] 
58    pub req_id: Option<i64>,
59    /// 2-letter country code (obtained from `residence_list` call).\n
60    // Correct serde attribute construction - Use helper
61    #[serde(skip_serializing_if = "Option::is_none")] 
62    pub residence: Option<String>,
63    /// [Optional] Show whether user has used mobile or desktop.\n
64    // Correct serde attribute construction - Use helper
65    #[serde(skip_serializing_if = "Option::is_none")] 
66    pub signup_device: Option<SignupDevice>,
67    /// Account type\n
68    // Correct serde attribute construction - Use helper
69    #[serde(rename = "type", skip_serializing_if = "Option::is_none")] 
70    pub type_: Option<Type>,
71    /// [Optional] Identifier of particular ad. Value must match Regex pattern to be recorded\n
72    // Correct serde attribute construction - Use helper
73    #[serde(skip_serializing_if = "Option::is_none")] 
74    pub utm_ad_id: Option<Value>,
75    /// [Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded\n
76    // Correct serde attribute construction - Use helper
77    #[serde(skip_serializing_if = "Option::is_none")] 
78    pub utm_adgroup_id: Option<Value>,
79    /// [Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded\n
80    // Correct serde attribute construction - Use helper
81    #[serde(skip_serializing_if = "Option::is_none")] 
82    pub utm_adrollclk_id: Option<Value>,
83    /// [Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded\n
84    // Correct serde attribute construction - Use helper
85    #[serde(skip_serializing_if = "Option::is_none")] 
86    pub utm_campaign: Option<Value>,
87    /// [Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded\n
88    // Correct serde attribute construction - Use helper
89    #[serde(skip_serializing_if = "Option::is_none")] 
90    pub utm_campaign_id: Option<Value>,
91    /// [Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded\n
92    // Correct serde attribute construction - Use helper
93    #[serde(skip_serializing_if = "Option::is_none")] 
94    pub utm_content: Option<Value>,
95    /// [Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded\n
96    // Correct serde attribute construction - Use helper
97    #[serde(skip_serializing_if = "Option::is_none")] 
98    pub utm_fbcl_id: Option<Value>,
99    /// [Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded\n
100    // Correct serde attribute construction - Use helper
101    #[serde(skip_serializing_if = "Option::is_none")] 
102    pub utm_gl_client_id: Option<Value>,
103    /// [Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded\n
104    // Correct serde attribute construction - Use helper
105    #[serde(skip_serializing_if = "Option::is_none")] 
106    pub utm_medium: Option<Value>,
107    /// [Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded\n
108    // Correct serde attribute construction - Use helper
109    #[serde(skip_serializing_if = "Option::is_none")] 
110    pub utm_msclk_id: Option<Value>,
111    /// [Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded\n
112    // Correct serde attribute construction - Use helper
113    #[serde(skip_serializing_if = "Option::is_none")] 
114    pub utm_source: Option<Value>,
115    /// [Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded\n
116    // Correct serde attribute construction - Use helper
117    #[serde(skip_serializing_if = "Option::is_none")] 
118    pub utm_term: Option<Value>,
119    /// Email verification code (received from a `verify_email` call, which must be done first).\n
120    // Correct serde attribute construction - Use helper
121    #[serde(skip_serializing_if = "Option::is_none")] 
122    pub verification_code: Option<String>,
123}
124