lighter-rust 0.2.0

A comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration
/*
 *
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DepositHistoryItem {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "amount")]
    pub amount: String,
    #[serde(rename = "timestamp")]
    pub timestamp: i64,
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "l1_tx_hash")]
    pub l1_tx_hash: String,
}

impl DepositHistoryItem {
    pub fn new(
        id: String,
        amount: String,
        timestamp: i64,
        status: Status,
        l1_tx_hash: String,
    ) -> DepositHistoryItem {
        DepositHistoryItem {
            id,
            amount,
            timestamp,
            status,
            l1_tx_hash,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "claimable")]
    Claimable,
}

impl Default for Status {
    fn default() -> Status {
        Self::Failed
    }
}