ynab_api_async_fork/models/save_account.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 SaveAccount {
16 /// The name of the account
17 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(rename = "type")]
20 pub _type: crate::models::AccountType,
21 /// The current balance of the account in milliunits format
22 #[serde(rename = "balance")]
23 pub balance: i64,
24}
25
26impl SaveAccount {
27 pub fn new(name: String, _type: crate::models::AccountType, balance: i64) -> SaveAccount {
28 SaveAccount {
29 name,
30 _type,
31 balance,
32 }
33 }
34}
35
36