use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountTransactionUpdate {
#[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
pub symbol: Option<String>,
#[serde(rename = "transactionType")]
pub transaction_type: models::TransactionType,
#[serde(rename = "amountE9")]
pub amount_e9: String,
#[serde(rename = "assetSymbol", skip_serializing_if = "Option::is_none")]
pub asset_symbol: Option<String>,
#[serde(rename = "tradeId", skip_serializing_if = "Option::is_none")]
pub trade_id: Option<String>,
#[serde(rename = "executedAtMillis")]
pub executed_at_millis: i64,
}
impl AccountTransactionUpdate {
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,
}
}
}