aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/transaction_detail_all_of.rs
blob: 68f2ebfd7d2fcbc5f39a19be685fb1a28578512c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * YNAB API Endpoints
 *
 * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body.  API Documentation is at https://api.youneedabudget.com
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */



#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionDetailAllOf {
    #[serde(rename = "account_name")]
    pub account_name: String,
    #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
    pub payee_name: Option<String>,
    #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
    pub category_name: Option<String>,
    /// If a split transaction, the subtransactions.
    #[serde(rename = "subtransactions")]
    pub subtransactions: Vec<crate::models::SubTransaction>,
}

impl TransactionDetailAllOf {
    pub fn new(account_name: String, subtransactions: Vec<crate::models::SubTransaction>) -> TransactionDetailAllOf {
        TransactionDetailAllOf {
            account_name: account_name,
            payee_name: None,
            category_name: None,
            subtransactions: subtransactions,
        }
    }
}