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 SimpleOrder {
    #[serde(rename = "order_index")]
    pub order_index: i64,
    #[serde(rename = "order_id")]
    pub order_id: String,
    #[serde(rename = "owner_account_index")]
    pub owner_account_index: i64,
    #[serde(rename = "initial_base_amount")]
    pub initial_base_amount: String,
    #[serde(rename = "remaining_base_amount")]
    pub remaining_base_amount: String,
    #[serde(rename = "price")]
    pub price: String,
    #[serde(rename = "order_expiry")]
    pub order_expiry: i64,
}

impl SimpleOrder {
    pub fn new(
        order_index: i64,
        order_id: String,
        owner_account_index: i64,
        initial_base_amount: String,
        remaining_base_amount: String,
        price: String,
        order_expiry: i64,
    ) -> SimpleOrder {
        SimpleOrder {
            order_index,
            order_id,
            owner_account_index,
            initial_base_amount,
            remaining_base_amount,
            price,
            order_expiry,
        }
    }
}