ynab_api_async_fork/models/
transaction_detail_all_of.rs

1/*
2 * YNAB API Endpoints
3 *
4 * 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.ynab.com
5 *
6 * The version of the OpenAPI document: 1.72.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TransactionDetailAllOf {
16    #[serde(rename = "account_name")]
17    pub account_name: String,
18    #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
19    pub payee_name: Option<String>,
20    /// The name of the category.  If a split transaction, this will be 'Split'.
21    #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
22    pub category_name: Option<String>,
23    /// If a split transaction, the subtransactions.
24    #[serde(rename = "subtransactions")]
25    pub subtransactions: Vec<crate::models::SubTransaction>,
26}
27
28impl TransactionDetailAllOf {
29    pub fn new(account_name: String, subtransactions: Vec<crate::models::SubTransaction>) -> TransactionDetailAllOf {
30        TransactionDetailAllOf {
31            account_name,
32            payee_name: None,
33            category_name: None,
34            subtransactions,
35        }
36    }
37}
38
39