deriv_api_schema/set_self_exclusion_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/set_self_exclusion/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9use chrono::{DateTime, Utc};
10
11// Import required types from the *same* crate
12
13/// Set Self-Exclusion (this call should be used in conjunction with `get_self_exclusion`)
14#[derive(Debug, Clone, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub struct SetSelfExclusionRequest {
17 /// [Optional] Exclude me from the website (for a minimum of 6 months, up to a maximum of 5 years). Note: uplifting this self-exclusion may require contacting the company.\n
18 // Correct serde attribute construction - Use helper
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub exclude_until: Option<Value>,
21 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
22 // Correct serde attribute construction - Use helper
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub loginid: Option<String>,
25 /// [Optional] 7-day limit on deposits.\n
26 // Correct serde attribute construction - Use helper
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub max_30day_deposit: Option<Value>,
29 /// [Optional] 30-day limit on losses.\n
30 // Correct serde attribute construction - Use helper
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub max_30day_losses: Option<Value>,
33 /// [Optional] 30-day turnover limit.\n
34 // Correct serde attribute construction - Use helper
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub max_30day_turnover: Option<Value>,
37 /// [Optional] 7-day limit on deposits.\n
38 // Correct serde attribute construction - Use helper
39 #[serde(skip_serializing_if = "Option::is_none")]
40 pub max_7day_deposit: Option<Value>,
41 /// [Optional] 7-day limit on losses.\n
42 // Correct serde attribute construction - Use helper
43 #[serde(skip_serializing_if = "Option::is_none")]
44 pub max_7day_losses: Option<Value>,
45 /// [Optional] 7-day turnover limit.\n
46 // Correct serde attribute construction - Use helper
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub max_7day_turnover: Option<Value>,
49 /// [Optional] Maximum account cash balance.\n
50 // Correct serde attribute construction - Use helper
51 #[serde(skip_serializing_if = "Option::is_none")]
52 pub max_balance: Option<Value>,
53 /// [Optional] Daily deposit limit.\n
54 // Correct serde attribute construction - Use helper
55 #[serde(skip_serializing_if = "Option::is_none")]
56 pub max_deposit: Option<Value>,
57 /// [Optional] Daily limit on losses.\n
58 // Correct serde attribute construction - Use helper
59 #[serde(skip_serializing_if = "Option::is_none")]
60 pub max_losses: Option<Value>,
61 /// [Optional] Maximum number of open positions.\n
62 // Correct serde attribute construction - Use helper
63 #[serde(skip_serializing_if = "Option::is_none")]
64 pub max_open_bets: Option<i64>,
65 /// [Optional] Daily turnover limit.\n
66 // Correct serde attribute construction - Use helper
67 #[serde(skip_serializing_if = "Option::is_none")]
68 pub max_turnover: Option<Value>,
69 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
70 // Correct serde attribute construction - Use helper
71 #[serde(skip_serializing_if = "Option::is_none")]
72 pub passthrough: Option<Value>,
73 /// [Optional] Used to map request to response.\n
74 // Correct serde attribute construction - Use helper
75 #[serde(skip_serializing_if = "Option::is_none")]
76 pub req_id: Option<i64>,
77 /// [Optional] Session duration limit, in minutes.\n
78 // Correct serde attribute construction - Use helper
79 #[serde(skip_serializing_if = "Option::is_none")]
80 pub session_duration_limit: Option<i64>,
81 /// Must be `1`\n
82 // Correct serde attribute construction - Use helper
83
84 pub set_self_exclusion: i64,
85 /// [Optional] Exclude me from the website (for up to 6 weeks). Requires time in epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted automatically at the expiry of the timeout period.\n
86 // Correct serde attribute construction - Use helper
87 #[serde(skip_serializing_if = "Option::is_none")]
88 pub timeout_until: Option<DateTime<Utc>>,
89}
90