space-traders 0.1.1

Async SpaceTraders API client for Rust.
Documentation
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`

use serde::{Deserialize, Serialize};

/// Result of a transaction for a ship modification, such as installing a mount or a module.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShipModificationTransaction {
    /// The symbol of the waypoint where the transaction took place.
    #[serde(rename = "waypointSymbol")]
    pub waypoint_symbol: String,
    /// The symbol of the ship that made the transaction.
    #[serde(rename = "shipSymbol")]
    pub ship_symbol: String,
    /// The symbol of the trade good.
    #[serde(rename = "tradeSymbol")]
    pub trade_symbol: String,
    /// The total price of the transaction.
    #[serde(rename = "totalPrice")]
    pub total_price: u32,
    /// The timestamp of the transaction.
    #[serde(rename = "timestamp")]
    pub timestamp: String,
}

impl ShipModificationTransaction {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        waypoint_symbol: String,
        ship_symbol: String,
        trade_symbol: String,
        total_price: u32,
        timestamp: String,
    ) -> ShipModificationTransaction {
        ShipModificationTransaction {
            waypoint_symbol,
            ship_symbol,
            trade_symbol,
            total_price,
            timestamp,
        }
    }
}