oanda_v20_openapi/models/trade_client_extensions_modify_transaction.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/// TradeClientExtensionsModifyTransaction : A TradeClientExtensionsModifyTransaction represents the modification of a Trade's Client Extensions.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TradeClientExtensionsModifyTransaction {
17 /// The Transaction's Identifier.
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 = "time", skip_serializing_if = "Option::is_none")]
22 pub time: Option<String>,
23 /// The ID of the user that initiated the creation of the Transaction.
24 #[serde(rename = "userID", skip_serializing_if = "Option::is_none")]
25 pub user_id: Option<i32>,
26 /// The Account's identifier
27 #[serde(rename = "accountID", skip_serializing_if = "Option::is_none")]
28 pub account_id: Option<String>,
29 /// The ID of the \"batch\" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
30 #[serde(rename = "batchID", skip_serializing_if = "Option::is_none")]
31 pub batch_id: Option<i32>,
32 /// The Request ID of the request which generated the transaction.
33 #[serde(rename = "requestID", skip_serializing_if = "Option::is_none")]
34 pub request_id: Option<String>,
35 #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
36 pub r#type: Option<models::TransactionType>,
37 /// The ID of the Trade who's client extensions are to be modified.
38 #[serde(rename = "tradeID", skip_serializing_if = "Option::is_none")]
39 pub trade_id: Option<i32>,
40 /// The original Client ID of the Trade who's client extensions are to be modified.
41 #[serde(rename = "clientTradeID", skip_serializing_if = "Option::is_none")]
42 pub client_trade_id: Option<String>,
43 #[serde(rename = "tradeClientExtensionsModify", skip_serializing_if = "Option::is_none")]
44 pub trade_client_extensions_modify: Option<Box<models::ClientExtensions>>,
45}
46
47impl TradeClientExtensionsModifyTransaction {
48 /// A TradeClientExtensionsModifyTransaction represents the modification of a Trade's Client Extensions.
49 pub fn new() -> TradeClientExtensionsModifyTransaction {
50 TradeClientExtensionsModifyTransaction {
51 id: None,
52 time: None,
53 user_id: None,
54 account_id: None,
55 batch_id: None,
56 request_id: None,
57 r#type: None,
58 trade_id: None,
59 client_trade_id: None,
60 trade_client_extensions_modify: None,
61 }
62 }
63}
64