oanda_v20_openapi/models/order.rs
1/*
2 * OANDA v20 API
3 *
4 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
5 *
6 * The version of the OpenAPI document: 0.2.1
7 * Contact: jmicoud02@gmail.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Order : The base Order definition specifies the properties that are common to all Orders.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Order {
17 /// The Order's identifier, unique within the Order's Account.
18 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19 pub id: Option<i32>,
20 /// A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
21 #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
22 pub create_time: Option<String>,
23 #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
24 pub state: Option<models::OrderState>,
25 #[serde(rename = "clientExtensions", skip_serializing_if = "Option::is_none")]
26 pub client_extensions: Option<Box<models::ClientExtensions>>,
27}
28
29impl Order {
30 /// The base Order definition specifies the properties that are common to all Orders.
31 pub fn new() -> Order {
32 Order {
33 id: None,
34 create_time: None,
35 state: None,
36 client_extensions: None,
37 }
38 }
39}
40