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

/// QuoteHomeConversionFactors : QuoteHomeConversionFactors represents the factors that can be used used to convert quantities of a Price's Instrument's quote currency into the Account's home currency.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QuoteHomeConversionFactors {
    /// The factor used to convert a positive amount of the Price's Instrument's quote currency into a positive amount of the Account's home currency.  Conversion is performed by multiplying the quote units by the conversion factor.
    #[serde(rename = "positiveUnits", skip_serializing_if = "Option::is_none")]
    pub positive_units: Option<f64>,
    /// The factor used to convert a negative amount of the Price's Instrument's quote currency into a negative amount of the Account's home currency.  Conversion is performed by multiplying the quote units by the conversion factor.
    #[serde(rename = "negativeUnits", skip_serializing_if = "Option::is_none")]
    pub negative_units: Option<f64>,
}

impl QuoteHomeConversionFactors {
    /// QuoteHomeConversionFactors represents the factors that can be used used to convert quantities of a Price's Instrument's quote currency into the Account's home currency.
    pub fn new() -> QuoteHomeConversionFactors {
        QuoteHomeConversionFactors {
            positive_units: None,
            negative_units: None,
        }
    }
}