bluefin_api 1.8.0

Bluefin API
Documentation
/*
 * Bluefin API
 *
 * Bluefin API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AccountTransactionUpdate : Details about a transaction in the account.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountTransactionUpdate {
    /// The symbol of the market.
    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
    pub symbol: Option<String>,
    #[serde(rename = "transactionType")]
    pub transaction_type: models::TransactionType,
    /// The amount of the transaction in scientific notation with 9 decimal places.
    #[serde(rename = "amountE9")]
    pub amount_e9: String,
    /// The symbol of the asset.
    #[serde(rename = "assetSymbol", skip_serializing_if = "Option::is_none")]
    pub asset_symbol: Option<String>,
    /// The trade ID associated with the transaction.
    #[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")]
    pub trade_id: Option<String>,
    /// The timestamp when the transaction was executed in milliseconds.
    #[serde(rename = "executedAtMillis")]
    pub executed_at_millis: i64,
}

impl AccountTransactionUpdate {
    /// Details about a transaction in the account.
    pub fn new(transaction_type: models::TransactionType, amount_e9: String, executed_at_millis: i64) -> AccountTransactionUpdate {
        AccountTransactionUpdate {
            symbol: None,
            transaction_type,
            amount_e9,
            asset_symbol: None,
            trade_id: None,
            executed_at_millis,
        }
    }
}