deriv_api_schema/authorize.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/authorize/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import shared types from the *same* crate
12use crate::account_list_item::AccountListItem;
13use crate::linked_to_item::LinkedToItem;
14
15// It's a struct
16/// Account information for the holder of the token.
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(rename_all = "snake_case")]
19pub struct Authorize {
20 /// List of accounts for current user. This is also available from the `account_list` call.\n
21 // Correct serde attribute construction - Use helper
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub account_list: Option<Vec<AccountListItem>>,
24 /// Cash balance of the account.\n
25 // Correct serde attribute construction - Use helper
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub balance: Option<f64>,
28 /// 2-letter country code (ISO standard).\n
29 // Correct serde attribute construction - Use helper
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub country: Option<String>,
32 /// Currency of the account.\n
33 // Correct serde attribute construction - Use helper
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub currency: Option<String>,
36 /// User email.\n
37 // Correct serde attribute construction - Use helper
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub email: Option<String>,
40 /// User's full name. Will be empty for virtual accounts.\n
41 // Correct serde attribute construction - Use helper
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub fullname: Option<String>,
44 /// Boolean value: 1 or 0, indicating whether the account is a virtual-money account.\n
45 // Correct serde attribute construction - Use helper
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub is_virtual: Option<String>,
48 /// Landing company name the account belongs to.\n
49 // Correct serde attribute construction - Use helper
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub landing_company_fullname: Option<String>,
52 /// Landing company shortcode the account belongs to.\n
53 // Correct serde attribute construction - Use helper
54 #[serde(skip_serializing_if = "Option::is_none")]
55 pub landing_company_name: Option<String>,
56 /// Details of the list of Trading accounts linked to the Wallet account.\n
57 // Correct serde attribute construction - Use helper
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub linked_to: Option<Vec<LinkedToItem>>,
60 /// Currencies in client's residence country\n
61 // Correct serde attribute construction - Use helper
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub local_currencies: Option<Value>,
64 /// The account ID that the token was issued for.\n
65 // Correct serde attribute construction - Use helper
66 #[serde(skip_serializing_if = "Option::is_none")]
67 pub loginid: Option<String>,
68 /// User's preferred language, ISO standard code of language\n
69 // Correct serde attribute construction - Use helper
70 #[serde(skip_serializing_if = "Option::is_none")]
71 pub preferred_language: Option<Value>,
72 /// Scopes available to the token.\n
73 // Correct serde attribute construction - Use helper
74 #[serde(skip_serializing_if = "Option::is_none")]
75 pub scopes: Option<Vec<String>>,
76 /// List of landing company shortcodes the account can upgrade to.\n
77 // Correct serde attribute construction - Use helper
78 #[serde(skip_serializing_if = "Option::is_none")]
79 pub upgradeable_landing_companies: Option<Vec<Value>>,
80 /// The internal user ID for this account.\n
81 // Correct serde attribute construction - Use helper
82 #[serde(skip_serializing_if = "Option::is_none")]
83 pub user_id: Option<i64>,
84}
85