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 DependentTradeOrdersRequest {
    #[serde(rename = "takeProfit", skip_serializing_if = "Option::is_none")]
    pub take_profit: Option<Box<models::TakeProfitDetails>>,
    #[serde(rename = "stopLoss", skip_serializing_if = "Option::is_none")]
    pub stop_loss: Option<Box<models::StopLossDetails>>,
    #[serde(rename = "trailingStopLoss", skip_serializing_if = "Option::is_none")]
    pub trailing_stop_loss: Option<Box<models::TrailingStopLossDetails>>,
}

impl DependentTradeOrdersRequest {
    pub fn new() -> DependentTradeOrdersRequest {
        DependentTradeOrdersRequest {
            take_profit: None,
            stop_loss: None,
            trailing_stop_loss: None,
        }
    }
}