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 terms to fulfill the contract.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContractTerms {
    /// The deadline for the contract.
    #[serde(rename = "deadline")]
    pub deadline: String,
    #[serde(rename = "payment")]
    pub payment: crate::models::ContractPayment,
    /// The cargo that needs to be delivered to fulfill the contract.
    #[serde(rename = "deliver", skip_serializing_if = "Option::is_none")]
    pub deliver: Option<Vec<crate::models::ContractDeliverGood>>,
}

impl ContractTerms {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(deadline: String, payment: crate::models::ContractPayment) -> ContractTerms {
        ContractTerms {
            deadline,
            payment,
            deliver: None,
        }
    }
}