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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClosePositionRequest {
    /// Either \"ALL\", \"NONE\", or a DecimalNumber reflection a partial unit
    #[serde(rename = "longUnits", skip_serializing_if = "Option::is_none")]
    pub long_units: Option<String>,
    #[serde(rename = "longClientExtensions", skip_serializing_if = "Option::is_none")]
    pub long_client_extensions: Option<Box<models::ClientExtensions>>,
    /// Either \"ALL\", \"NONE\", or a DecimalNumber reflection a partial unit
    #[serde(rename = "shortUnits", skip_serializing_if = "Option::is_none")]
    pub short_units: Option<String>,
    #[serde(rename = "shortClientExtensions", skip_serializing_if = "Option::is_none")]
    pub short_client_extensions: Option<Box<models::ClientExtensions>>,
}

impl ClosePositionRequest {
    pub fn new() -> ClosePositionRequest {
        ClosePositionRequest {
            long_units: None,
            long_client_extensions: None,
            short_units: None,
            short_client_extensions: None,
        }
    }
}