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};

/// MarketOrderTradeClose : A MarketOrderTradeClose specifies the extensions to a Market Order that has been created specifically to close a Trade.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MarketOrderTradeClose {
    /// The ID of the Trade requested to be closed
    #[serde(rename = "tradeID", skip_serializing_if = "Option::is_none")]
    pub trade_id: Option<i32>,
    /// The client ID of the Trade requested to be closed
    #[serde(rename = "clientTradeID", skip_serializing_if = "Option::is_none")]
    pub client_trade_id: Option<String>,
    /// Either \"ALL\", or a positive DecimalNumber reflection a partial unit
    #[serde(rename = "units", skip_serializing_if = "Option::is_none")]
    pub units: Option<String>,
}

impl MarketOrderTradeClose {
    /// A MarketOrderTradeClose specifies the extensions to a Market Order that has been created specifically to close a Trade.
    pub fn new() -> MarketOrderTradeClose {
        MarketOrderTradeClose {
            trade_id: None,
            client_trade_id: None,
            units: None,
        }
    }
}