longbridge/grid/requests/
get_grid_order_detail.rs1use serde::Serialize;
2
3#[derive(Debug, Serialize, Clone)]
5pub struct GetGridOrderDetailOptions {
6 order_id: String,
7 #[serde(skip_serializing_if = "Option::is_none")]
9 history_id: Option<String>,
10 #[serde(skip_serializing_if = "Option::is_none")]
11 limit: Option<i32>,
12}
13
14impl GetGridOrderDetailOptions {
15 #[inline]
17 pub fn new(order_id: impl Into<String>) -> Self {
18 Self {
19 order_id: order_id.into(),
20 history_id: None,
21 limit: None,
22 }
23 }
24
25 #[inline]
27 #[must_use]
28 pub fn history_id(self, history_id: impl Into<String>) -> Self {
29 Self {
30 history_id: Some(history_id.into()),
31 ..self
32 }
33 }
34
35 #[inline]
37 #[must_use]
38 pub fn limit(self, limit: i32) -> Self {
39 Self {
40 limit: Some(limit),
41 ..self
42 }
43 }
44}