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};

/// The details of a delivery contract. Includes the type of good, units needed, and the destination.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContractDeliverGood {
    /// The symbol of the trade good to deliver.
    #[serde(rename = "tradeSymbol")]
    pub trade_symbol: String,
    /// The destination where goods need to be delivered.
    #[serde(rename = "destinationSymbol")]
    pub destination_symbol: String,
    /// The number of units that need to be delivered on this contract.
    #[serde(rename = "unitsRequired")]
    pub units_required: i32,
    /// The number of units fulfilled on this contract.
    #[serde(rename = "unitsFulfilled")]
    pub units_fulfilled: i32,
}

impl ContractDeliverGood {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(
        trade_symbol: String,
        destination_symbol: String,
        units_required: i32,
        units_fulfilled: i32,
    ) -> ContractDeliverGood {
        ContractDeliverGood {
            trade_symbol,
            destination_symbol,
            units_required,
            units_fulfilled,
        }
    }
}