oanda-v20-openapi 0.2.1

The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
Documentation
/*
 * OANDA v20 API
 *
 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
 *
 * The version of the OpenAPI document: 0.2.1
 * Contact: jmicoud02@gmail.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// MarketOrderDelayedTradeClose : Details for the Market Order extensions specific to a Market Order placed with the intent of fully closing a specific open trade that should have already been closed but wasn't due to halted market conditions
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MarketOrderDelayedTradeClose {
    /// The ID of the Trade being closed
    #[serde(rename = "tradeID", skip_serializing_if = "Option::is_none")]
    pub trade_id: Option<i32>,
    /// The Client ID of the Trade being closed
    #[serde(rename = "clientTradeID", skip_serializing_if = "Option::is_none")]
    pub client_trade_id: Option<String>,
    /// The Transaction ID of the DelayedTradeClosure transaction to which this Delayed Trade Close belongs to
    #[serde(rename = "sourceTransactionID", skip_serializing_if = "Option::is_none")]
    pub source_transaction_id: Option<i32>,
}

impl MarketOrderDelayedTradeClose {
    /// Details for the Market Order extensions specific to a Market Order placed with the intent of fully closing a specific open trade that should have already been closed but wasn't due to halted market conditions
    pub fn new() -> MarketOrderDelayedTradeClose {
        MarketOrderDelayedTradeClose {
            trade_id: None,
            client_trade_id: None,
            source_transaction_id: None,
        }
    }
}