deriv_api_schema/account_item.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/transfer_between_accounts/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_type::AccountType;
13use crate::product::Product;
14use crate::sub_account_type::SubAccountType;
15use crate::transfers::Transfers;
16use crate::market_type::MarketType;
17use crate::demo_account::DemoAccount;
18use crate::account_category::AccountCategory;
19
20// It's a struct
21#[derive(Debug, Clone, Serialize, Deserialize)]
22#[serde(rename_all = "snake_case")]
23pub struct AccountItem {
24 /// Category of the account.\n
25 // Correct serde attribute construction - Use helper
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub account_category: Option<AccountCategory>,
28 /// Type of the account.\n
29 // Correct serde attribute construction - Use helper
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub account_type: Option<AccountType>,
32 /// Account balance.\n
33 // Correct serde attribute construction - Use helper
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub balance: Option<String>,
36 /// Default account currency.\n
37 // Correct serde attribute construction - Use helper
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub currency: Option<String>,
40 /// 0 for real accounts; 1 for virtual/demo accounts.\n
41 // Correct serde attribute construction - Use helper
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub demo_account: Option<DemoAccount>,
44 /// Landing company shortcode of the Trading account.\n
45 // Correct serde attribute construction - Use helper
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub landing_company_short: Option<String>,
48 /// Account identifier used for system transfers.\n
49 // Correct serde attribute construction - Use helper
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub loginid: Option<String>,
52 /// Market type of account.\n
53 // Correct serde attribute construction - Use helper
54 #[serde(skip_serializing_if = "Option::is_none")]
55 pub market_type: Option<MarketType>,
56 /// The group of mt5 account.\n
57 // Correct serde attribute construction - Use helper
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub mt5_group: Option<String>,
60 /// Product name that Deriv offer\n
61 // Correct serde attribute construction - Use helper
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub product: Option<Product>,
64 /// The status of account.\n
65 // Correct serde attribute construction - Use helper
66 #[serde(skip_serializing_if = "Option::is_none")]
67 pub status: Option<Value>,
68 /// Sub account type\n
69 // Correct serde attribute construction - Use helper
70 #[serde(skip_serializing_if = "Option::is_none")]
71 pub sub_account_type: Option<SubAccountType>,
72 /// Type of transfers allowed between the account and the currently authorized account.\n
73 // Correct serde attribute construction - Use helper
74 #[serde(skip_serializing_if = "Option::is_none")]
75 pub transfers: Option<Transfers>,
76}
77