deriv_api_schema/profit_table_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/profit_table/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12use crate::contract_type_item::ContractTypeItem;
13use crate::description::Description;
14use crate::sort::Sort;
15
16/// Retrieve a summary of account Profit Table, according to given search criteria
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(rename_all = "snake_case")]
19pub struct ProfitTableRequest {
20 /// Return only contracts of the specified types\n
21 // Correct serde attribute construction - Use helper
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub contract_type: Option<Vec<ContractTypeItem>>,
24 /// [Optional] Start date (epoch or YYYY-MM-DD)\n
25 // Correct serde attribute construction - Use helper
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub date_from: Option<String>,
28 /// [Optional] End date (epoch or YYYY-MM-DD)\n
29 // Correct serde attribute construction - Use helper
30 #[serde(skip_serializing_if = "Option::is_none")]
31 pub date_to: Option<String>,
32 /// [Optional] If set to 1, will return full contracts description.\n
33 // Correct serde attribute construction - Use helper
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub description: Option<Description>,
36 /// [Optional] Apply upper limit to count of transactions received.\n
37 // Correct serde attribute construction - Use helper
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub limit: Option<f64>,
40 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
41 // Correct serde attribute construction - Use helper
42 #[serde(skip_serializing_if = "Option::is_none")]
43 pub loginid: Option<String>,
44 /// [Optional] Number of transactions to skip.\n
45 // Correct serde attribute construction - Use helper
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub offset: Option<i64>,
48 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
49 // Correct serde attribute construction - Use helper
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub passthrough: Option<Value>,
52 /// Field 'profit_table' mapped to Value due to complexity/potential issues.\n
53 // Correct serde attribute construction - Use helper
54
55 pub profit_table: Value,
56 /// [Optional] Used to map request to response.\n
57 // Correct serde attribute construction - Use helper
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub req_id: Option<i64>,
60 /// [Optional] Sort direction.\n
61 // Correct serde attribute construction - Use helper
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub sort: Option<Sort>,
64}
65