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