deriv_api_schema/
cfd_frequency.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/new_account_maltainvest/send.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize}; 
7
8
9
10
11// Import shared types from the *same* crate
12
13/// How many CFD trades have you placed in the past 12 months?
14#[derive(Debug, Clone, Serialize, Deserialize)] // Enums should also derive Serialize/Deserialize
15#[serde(rename_all = "snake_case")]
16pub enum CfdFrequency {
17    No_Transactions_In_The_Past_12_Months,
18    _1__5_Transactions_In_The_Past_12_Months,
19    _6__10_Transactions_In_The_Past_12_Months,
20    _11__39_Transactions_In_The_Past_12_Months,
21    _40_Transactions_Or_More_In_The_Past_12_Months,
22}
23
24// Optional: Derive Default for enums, defaulting to the first variant? Or require explicit handling?
25// For now, DO NOT derive Default for enums automatically. Structs needing them must handle it.
26
27/* // Example: Deriving Default for Enum (use with caution)
28impl Default for CfdFrequency {
29    fn default() -> Self {
30        // Default to the first variant found
31        Self::No_Transactions_In_The_Past_12_Months
32    }
33}
34*/
35