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