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 ReplaceOrderResponse {
    /// The code of the error that has occurred. This field may not be returned for some errors.
    #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")]
    pub error_code: Option<String>,
    /// The human-readable description of the error that has occurred.
    #[serde(rename = "errorMessage", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<String>,
    /// The ID of the most recent Transaction created for the Account
    #[serde(rename = "lastTransactionID", skip_serializing_if = "Option::is_none")]
    pub last_transaction_id: Option<String>,
    /// The IDs of all Transactions that were created while satisfying the request.
    #[serde(rename = "relatedTransactionIDs", skip_serializing_if = "Option::is_none")]
    pub related_transaction_ids: Option<Vec<i32>>,
    #[serde(rename = "orderCancelTransaction", skip_serializing_if = "Option::is_none")]
    pub order_cancel_transaction: Option<Box<models::OrderCancelTransaction>>,
    #[serde(rename = "orderCreateTransaction", skip_serializing_if = "Option::is_none")]
    pub order_create_transaction: Option<Box<models::Transaction>>,
    #[serde(rename = "orderFillTransaction", skip_serializing_if = "Option::is_none")]
    pub order_fill_transaction: Option<Box<models::OrderFillTransaction>>,
    #[serde(rename = "orderReissueTransaction", skip_serializing_if = "Option::is_none")]
    pub order_reissue_transaction: Option<Box<models::Transaction>>,
    #[serde(rename = "orderReissueRejectTransaction", skip_serializing_if = "Option::is_none")]
    pub order_reissue_reject_transaction: Option<Box<models::Transaction>>,
    #[serde(rename = "replacingOrderCancelTransaction", skip_serializing_if = "Option::is_none")]
    pub replacing_order_cancel_transaction: Option<Box<models::OrderCancelTransaction>>,
}

impl ReplaceOrderResponse {
    pub fn new() -> ReplaceOrderResponse {
        ReplaceOrderResponse {
            error_code: None,
            error_message: None,
            last_transaction_id: None,
            related_transaction_ids: None,
            order_cancel_transaction: None,
            order_create_transaction: None,
            order_fill_transaction: None,
            order_reissue_transaction: None,
            order_reissue_reject_transaction: None,
            replacing_order_cancel_transaction: None,
        }
    }
}