marlowe_client 0.0.5

HTTP client for the Marlowe Runtime REST API
Documentation
/*
 * Marlowe Runtime REST API
 *
 * REST API for Marlowe Runtime
 *
 * The version of the OpenAPI document: 0.0.5.1
 *
 * Generated by: https://openapi-generator.tech
 */

/// Payment : A Marlowe payment.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Payment {
    #[serde(rename = "amount")]
    pub amount: i32,
    #[serde(rename = "payment_from")]
    pub payment_from: Box<crate::models::Party>,
    #[serde(rename = "to")]
    pub to: Box<crate::models::Payee>,
    #[serde(rename = "token")]
    pub token: Box<crate::models::Token>,
}

impl Payment {
    /// A Marlowe payment.
    pub fn new(
        amount: i32,
        payment_from: crate::models::Party,
        to: crate::models::Payee,
        token: crate::models::Token,
    ) -> Payment {
        Payment {
            amount,
            payment_from: Box::new(payment_from),
            to: Box::new(to),
            token: Box::new(token),
        }
    }
}