space_traders/models/
ship_modification_transaction.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// Result of a transaction for a ship modification, such as installing a mount or a module.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ShipModificationTransaction {
10    /// The symbol of the waypoint where the transaction took place.
11    #[serde(rename = "waypointSymbol")]
12    pub waypoint_symbol: String,
13    /// The symbol of the ship that made the transaction.
14    #[serde(rename = "shipSymbol")]
15    pub ship_symbol: String,
16    /// The symbol of the trade good.
17    #[serde(rename = "tradeSymbol")]
18    pub trade_symbol: String,
19    /// The total price of the transaction.
20    #[serde(rename = "totalPrice")]
21    pub total_price: u32,
22    /// The timestamp of the transaction.
23    #[serde(rename = "timestamp")]
24    pub timestamp: String,
25}
26
27impl ShipModificationTransaction {
28    /// Create value with optional fields set to `None`.
29    #[allow(clippy::too_many_arguments)]
30    pub fn new(
31        waypoint_symbol: String,
32        ship_symbol: String,
33        trade_symbol: String,
34        total_price: u32,
35        timestamp: String,
36    ) -> ShipModificationTransaction {
37        ShipModificationTransaction {
38            waypoint_symbol,
39            ship_symbol,
40            trade_symbol,
41            total_price,
42            timestamp,
43        }
44    }
45}