ynab_api_async_fork/models/
budget_summary.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 BudgetSummary {
16    #[serde(rename = "id")]
17    pub id: String,
18    #[serde(rename = "name")]
19    pub name: String,
20    /// The last time any changes were made to the budget from either a web or mobile client
21    #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")]
22    pub last_modified_on: Option<String>,
23    /// The earliest budget month
24    #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")]
25    pub first_month: Option<String>,
26    /// The latest budget month
27    #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")]
28    pub last_month: Option<String>,
29    #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")]
30    pub date_format: Option<crate::models::DateFormat>,
31    #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")]
32    pub currency_format: Option<crate::models::CurrencyFormat>,
33    /// The budget accounts (only included if `include_accounts=true` specified as query parameter)
34    #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
35    pub accounts: Option<Vec<crate::models::Account>>,
36}
37
38impl BudgetSummary {
39    pub fn new(id: String, name: String) -> BudgetSummary {
40        BudgetSummary {
41            id,
42            name,
43            last_modified_on: None,
44            first_month: None,
45            last_month: None,
46            date_format: None,
47            currency_format: None,
48            accounts: None,
49        }
50    }
51}
52
53