space_traders/models/
contract_payment.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// Payments for the contract.
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
9pub struct ContractPayment {
10    /// The amount of credits received up front for accepting the contract.
11    #[serde(rename = "onAccepted")]
12    pub on_accepted: i32,
13    /// The amount of credits received when the contract is fulfilled.
14    #[serde(rename = "onFulfilled")]
15    pub on_fulfilled: i32,
16}
17
18impl ContractPayment {
19    /// Create value with optional fields set to `None`.
20    #[allow(clippy::too_many_arguments)]
21    pub fn new(on_accepted: i32, on_fulfilled: i32) -> ContractPayment {
22        ContractPayment {
23            on_accepted,
24            on_fulfilled,
25        }
26    }
27}