/*
 * Thalex RPC API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionHistoryParams {
    /// Max results to return.
    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
    pub limit: Option<i32>,
    /// Start time (Unix timestamp) defaults to zero.
    #[serde(rename = "time_low", skip_serializing_if = "Option::is_none")]
    pub time_low: Option<i64>,
    /// End time (Unix timestamp) defaults to now.
    #[serde(rename = "time_high", skip_serializing_if = "Option::is_none")]
    pub time_high: Option<i64>,
    /// Set to bookmark from previous call to get next page.
    #[serde(rename = "bookmark", skip_serializing_if = "Option::is_none")]
    pub bookmark: Option<String>,
    #[serde(rename = "sort", skip_serializing_if = "Option::is_none")]
    pub sort: Option<models::SortEnum>,
    /// Comma-separated list of instrument names to request transaction history for. If omitted, transaction history for all instruments is returned.
    #[serde(rename = "instrument_names", skip_serializing_if = "Option::is_none")]
    pub instrument_names: Option<String>,
    /// Optional comma-separated list of asset names to request transaction history for.
    #[serde(rename = "assets", skip_serializing_if = "Option::is_none")]
    pub assets: Option<String>,
    #[serde(rename = "types", skip_serializing_if = "Option::is_none")]
    pub types: Option<models::TypesEnum>,
}

impl TransactionHistoryParams {
    pub fn new() -> TransactionHistoryParams {
        TransactionHistoryParams {
            limit: None,
            time_low: None,
            time_high: None,
            bookmark: None,
            sort: None,
            instrument_names: None,
            assets: None,
            types: None,
        }
    }
}
